/* Diseño de piezas que se cargan al final (ventanas, avisos, etc.); va después de rediseno.css. */
/* ligeros: contador, texto brillante, galería coverflow, reseñas en marquee, carrusel redondo */
.impact { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 44px); margin-top: clamp(24px, 3.5vw, 44px); padding-top: 26px; border-top: 1px solid var(--line-light); }
.impact b { display: block; font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1; color: var(--leaf); }
.impact span { display: block; margin-top: 8px; font-size: .98rem; color: rgba(242,235,220,.8); }
@media (max-width: 640px) { .impact { gap: 12px; } .impact span { font-size: .84rem; } }
@keyframes shiny { from { background-position: 150% 0; } to { background-position: -50% 0; } }
html.fx .mission blockquote.in, html.fx .mission blockquote.in em { color: transparent; -webkit-text-fill-color: transparent; background-clip: text; -webkit-background-clip: text; background-size: 250% 100%; animation: shiny 5.5s ease-in-out 1.2s infinite; }
html.fx .mission blockquote.in { background-image: linear-gradient(105deg, var(--paper) 42%, #ffffff 50%, var(--paper) 58%); }
html.fx .mission blockquote.in em { background-image: linear-gradient(105deg, var(--leaf) 42%, #f3ffd0 50%, var(--leaf) 58%); }
.gallery.cf { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; perspective: 1100px; padding: 22px calc(50% - var(--cw) / 2); scrollbar-width: none; --cw: clamp(190px, 30vw, 320px); }
.gallery.cf::-webkit-scrollbar { display: none; }
.gallery.cf button { flex: 0 0 var(--cw); width: var(--cw); aspect-ratio: 4 / 5; scroll-snap-align: center; transition: transform .12s linear, opacity .12s linear; box-shadow: 0 14px 30px rgba(28, 34, 19, .28); }
.cfnav { display: flex; justify-content: center; gap: 12px; margin-top: 8px; }
.cfnav button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); font-size: 1.2rem; color: var(--ink); }
.cfnav button:hover { background: var(--ink); color: var(--paper); }
.rgrid.marq { display: block; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.mrow { display: flex; gap: 18px; width: max-content; animation: mq 80s linear infinite; padding-block: 6px; }
.mrow + .mrow { margin-top: 12px; animation-direction: reverse; }
.mrow .rcard { width: 320px; flex: none; }
.rgrid.marq:hover .mrow { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }
.rc { height: 150px; margin-top: 8px; perspective: 900px; position: relative; touch-action: pan-y; cursor: grab; }
.rc-ring { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform-style: preserve-3d; }
.rc-ring img { position: absolute; object-fit: cover; border-radius: 14px; backface-visibility: hidden; box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
@media (min-width: 901px) { .accordion.has-rc { height: calc(clamp(700px, 76vh, 780px) + 160px); } }
@media (prefers-reduced-motion: reduce) { .mrow { animation: none; } }

/* pestañas en tarjetas: cada grupo abre en una ventana */
.tabcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tcard { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; border-radius: 24px; overflow: hidden; text-align: left; color: var(--paper); padding: 22px; background: var(--forest); isolation: isolate; transition: transform .35s var(--ease); }
.tcard:hover { transform: translateY(-5px); }
.tcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .8s var(--ease); }
.tcard:hover img { transform: scale(1.06); }
.tcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(28, 34, 19, .92) 0%, rgba(28, 34, 19, .45) 55%, rgba(28, 34, 19, .1) 100%); }
.tc-t { font-family: var(--display); font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.1; }
.tc-s { margin-top: 8px; font-size: .98rem; color: rgba(242, 235, 220, .88); max-width: 28ch; }
@media (max-width: 900px) { .tabcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tcard { min-height: 220px; } }
@media (max-width: 480px) { .tabcards { gap: 12px; } .tcard { min-height: 190px; padding: 16px; } .tc-s { font-size: .86rem; } }
.grp { position: fixed; inset: 0; z-index: 120; background: var(--paper); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.grp[hidden] { display: none; }
.grp-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top, 0px)) 18px 12px; background: var(--deep, #232A1B); color: var(--paper); }
.grp-t { font-family: var(--display); font-size: 1.3rem; }
.grp-x { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-light); color: var(--paper); font-size: 1.1rem; }
.grp-x:hover { background: var(--paper); color: var(--deep, #232A1B); }
.grp > section { margin-top: 0 !important; border-radius: 0 !important; }

/* pestañas: Scroll Reveal, Depth Carousel, Accordion Gallery y Holo Card (ligeros) */
.sr { color: transparent; -webkit-text-fill-color: transparent; background-image: linear-gradient(to bottom, var(--ink, #232A1B) calc(var(--p, 0) * 100%), rgba(35, 42, 27, .2) calc(var(--p, 0) * 100% + 12%)); -webkit-background-clip: text; background-clip: text; }
.vgrid.dc { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; perspective: 1000px; padding: 26px calc(50% - var(--vw) / 2); scrollbar-width: none; --vw: clamp(170px, 22vw, 230px); }
.vgrid.dc::-webkit-scrollbar { display: none; }
.vgrid.dc .vcard { flex: 0 0 var(--vw); width: var(--vw); scroll-snap-align: center; transition: transform .12s linear, opacity .12s linear; box-shadow: 0 16px 34px rgba(0, 0, 0, .35); }
.dcnav { display: flex; justify-content: center; gap: 12px; margin-top: 6px; }
.dcnav button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-light); font-size: 1.2rem; color: var(--paper); }
.dcnav button:hover { background: var(--paper); color: var(--deep); }
@media (min-width: 901px) and (hover: hover) {
  .wings-art.acc { display: flex; gap: 10px; height: 440px; align-items: stretch; }
  .wings-art.acc .wa, .wings-art.acc .wa.a1, .wings-art.acc .wa.a2, .wings-art.acc .wa.a3, .wings-art.acc .wa.a4, .wings-art.acc .wa.a5 { grid-column: auto; margin-top: 0; flex: 1 1 0; min-width: 0; transition: flex-grow .6s var(--ease); }
  .wings-art.acc .wa.on { flex-grow: 4.5; }
  .wings-art.acc .wa .wa-ph, .wings-art.acc .wa.a4 .wa-ph, .wings-art.acc .wa.a5 .wa-ph { height: 100%; aspect-ratio: auto; border-radius: 22px; }
  .wings-art.acc .wa:hover .wa-ph { transform: none; }
  .wings-art.acc .wa figcaption { opacity: 0; transition: opacity .4s; left: 14px; transform: none; bottom: 14px; }
  .wings-art.acc .wa.on figcaption { opacity: 1; }
}
.holo { position: relative; transform-style: preserve-3d; transition: transform .25s var(--ease); will-change: transform; }
.holo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--hx, 50%) var(--hy, 50%), rgba(255, 255, 255, .55), rgba(186, 230, 253, .22) 35%, rgba(244, 190, 255, .18) 60%, transparent 75%); mix-blend-mode: soft-light; }
.holo.hot::after { opacity: 1; }
@media (hover: none) { .market .arch.holo::after { opacity: 1; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); background-size: 250% 100%; animation: holoSweep 5s ease-in-out infinite; mix-blend-mode: soft-light; } }
/* Comunidad en cuadrícula bento: cada bloque es una tarjeta */
#g-comunidad .market-grid, #g-comunidad .school-grid { gap: 14px; align-items: stretch; }
#g-comunidad .bt { background: #FBF7EC; border: 1px solid var(--line); border-radius: 26px; padding: clamp(18px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; }
#g-comunidad .bt-cta { align-items: flex-start; }
#g-comunidad #escuelas .bt-head h2 { margin: 10px 0 14px; }
#g-comunidad .bt-cta .chips { margin-top: 0; }
#g-comunidad .bt-cta .when { margin-top: 0; padding-top: 0; border-top: 0; }
#g-comunidad .market .arch.tall { border-radius: 26px; max-width: none; }
#g-comunidad .market .when { margin: 0; padding: clamp(18px, 3vw, 34px); border: 0; border-radius: 26px; background: var(--forest); color: var(--paper); align-content: center; }
#g-comunidad .market .when .label { color: var(--mist); }
@media (min-width: 641px) {
  #g-comunidad .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #g-comunidad .market .arch.tall { aspect-ratio: auto; min-height: 300px; position: relative; }
  #g-comunidad .market .arch.tall img, #g-comunidad .school-grid > .arch img { position: absolute; inset: 0; }
  #g-comunidad .market .when, #g-comunidad .market .bt-cta { grid-column: 1 / -1; }
}
@media (min-width: 901px) {
  #g-comunidad .market-grid, #g-comunidad .school-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #g-comunidad .market .arch.tall { grid-column: 1; grid-row: 1 / 3; }
  #g-comunidad .market .bt-head { grid-column: 2 / 5; }
  #g-comunidad .market .when { grid-column: 2 / 4; }
  #g-comunidad .market .bt-cta { grid-column: 4; }
  #g-comunidad .school-grid .bt-head { grid-column: 1 / 4; grid-row: 1; }
  #g-comunidad .school-grid .bt-cta { grid-column: 2 / 4; grid-row: 2; }
  #g-comunidad .school-grid > .arch:nth-of-type(3) { grid-column: 4; grid-row: 1 / 3; min-height: 420px; }
  #g-comunidad .school-grid > .arch:nth-of-type(4) { grid-column: 1; grid-row: 2; }
}
@media (max-width: 640px) {
  #g-comunidad .market-grid { gap: 10px; }
  #g-comunidad .market .bt-head { padding: 16px; align-self: stretch; }
  #g-comunidad .market .when { margin: 0; padding: 6px 18px; }
  #g-comunidad .market .when .wp { border-bottom-color: rgba(242, 235, 220, .2); }
  #g-comunidad .market .bt-cta { display: contents; }
  #g-comunidad .market .btn { margin-top: 8px; }
  #g-comunidad .school-grid { gap: 10px; }
}
@keyframes holoSweep { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) { .vgrid.dc .vcard, .wings-art.acc .wa { transition: none; } .market .arch.holo::after { animation: none !important; } }

/* ronda de diseño: portadas de pestaña con neblina, Ken Burns, precios y tipografía */
.grp-hero { position: relative; height: clamp(240px, 42vh, 420px); overflow: hidden; background: var(--forest); }
.grp-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; animation: kb 18s ease-in-out infinite alternate; }
.grp-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(28, 34, 19, .88) 0%, rgba(28, 34, 19, .35) 55%, rgba(28, 34, 19, .1) 100%); }
.mist { position: absolute; inset: -20%; z-index: 1; pointer-events: none; opacity: .5; background: radial-gradient(40% 35% at 20% 60%, rgba(242, 235, 220, .35), transparent 70%), radial-gradient(45% 40% at 75% 30%, rgba(214, 230, 181, .3), transparent 70%), radial-gradient(35% 30% at 55% 80%, rgba(242, 235, 220, .25), transparent 70%); animation: mistMove 26s ease-in-out infinite alternate; }
@keyframes mistMove { from { transform: translate3d(-4%, 0, 0) scale(1); } to { transform: translate3d(5%, -3%, 0) scale(1.12); } }
.grp-hero-txt { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 max(var(--gutter, 20px), 24px) clamp(20px, 4vw, 40px); max-width: 1180px; margin-inline: auto; color: var(--paper); }
.grp-hero-txt h2 { font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1; margin: 0; text-shadow: 0 2px 18px rgba(0, 0, 0, .4); }
.grp-hero-txt p { margin: 10px 0 0; font-size: clamp(1rem, 1.5vw, 1.2rem); max-width: 40ch; color: rgba(242, 235, 220, .92); text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
@keyframes kb { from { transform: scale(1) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); } }
.panel.open > img { animation: kb 16s ease-in-out infinite alternate; }
.panel.open .info .ptag { font-size: 1.02rem; padding: 12px 20px; letter-spacing: .06em; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }
.faqs { display: grid; gap: 10px; max-width: 820px; }
.faqs details { background: rgba(255, 255, 255, .55); border: 1px solid var(--line); border-radius: 16px; padding: 4px 20px; transition: background .25s; }
.faqs details[open] { background: #fff; }
.faqs summary { cursor: pointer; list-style: none; padding: 16px 0; font-family: var(--sans); font-weight: 600; font-size: 1rem; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px; }
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after { content: "+"; font-size: 1.4rem; line-height: 1; transition: transform .25s var(--ease); }
.faqs details[open] summary::after { transform: rotate(45deg); }
.faqs p { margin: 0 0 16px; max-width: 62ch; }
/* tipografía y contraste */
.head h2, .con-head h2 { letter-spacing: -.015em; line-height: 1.04; }
.lead { color: #3a4328; }
.dark .lead, .dark p { color: rgba(242, 235, 220, .9); }
.label { letter-spacing: .2em; font-weight: 700; }
.btn:focus-visible, .tcard:focus-visible, .grp-x:focus-visible, .faqs summary:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
.btn.primary { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .grp-hero > img, .mist, .panel.open > img { animation: none; } }
