/* Comparador Antes / Ahora */
.cmp { position: relative; overflow: hidden; border-radius: 1.25rem; aspect-ratio: 16 / 10; background: #e2e8f0; user-select: none; contain: layout style; }
.cmp:focus-within { outline: 3px solid #E09F3E; outline-offset: 3px; }
.cmp input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 5; touch-action: pan-y; }
.cmp-handle { position: absolute; top: 0; bottom: 0; width: 3px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); z-index: 4; pointer-events: none; transform: translateX(-50%); }
.cmp-knob { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; border-radius: 999px; background: #fff; transform: translate(-50%, -50%); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); color: #265813; }

/* Teléfono Showcase idéntico a referencia Pinterest/Canva (5 tarjetas rectas + 2 badges inclinados + drag H) */
.phone-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: 18px; cursor: grab; user-select: none; touch-action: pan-y; }
.phone-stage.is-dragging { cursor: grabbing; }
.phone-stage.is-dragging .reel-side-card,
.phone-stage.is-dragging .phone { transition: none !important; }
.phone-stage.is-dragging .reel-side-card:hover { transform: none; }
.phone-stage.is-dragging .phone-screen { scroll-snap-type: none; scroll-behavior: auto; }
.phone-stage img { -webkit-user-drag: none; user-drag: none; }
.phone {
  width: 294px; padding: 10px; border-radius: 52px; flex: none; position: relative; z-index: 6;
  background: linear-gradient(145deg, #525b68 0%, #1c2028 24%, #0b0e14 52%, #3a414d 82%, #141820 100%);
  box-shadow: 0 36px 70px -18px rgba(15, 23, 42, .62), 0 0 0 1px rgba(255,255,255,.22) inset, 0 0 0 3px #0a0d13 inset;
}
.phone-btn { position: absolute; width: 3.5px; border-radius: 2px; background: linear-gradient(180deg, #64748b, #1e293b, #475569); box-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; }
.phone-btn-action { left: -3.5px; top: 104px; height: 24px; }
.phone-btn-vol1 { left: -3.5px; top: 146px; height: 46px; }
.phone-btn-vol2 { left: -3.5px; top: 204px; height: 46px; }
.phone-btn-power { right: -3.5px; top: 168px; height: 68px; }
.phone-screen-wrap { position: relative; border-radius: 42px; overflow: hidden; background: #000; box-shadow: 0 0 0 2px #000; }
.phone-statusbar {
  position: absolute; top: 0; left: 0; right: 0; height: 40px; z-index: 12; pointer-events: none;
  display: flex; align-items: center; justify-content: space-between; padding: 8px 20px 0;
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .01em; text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.phone-island {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 88px; height: 24px;
  border-radius: 999px; background: #000; box-shadow: 0 0 0 1px rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: flex-end; padding-right: 7px;
}
.phone-island::after {
  content: ""; width: 10px; height: 10px; border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #38bdf8 0%, #1e3a8a 42%, #020617 75%);
  box-shadow: inset 0 0 2px rgba(255,255,255,.35);
}
.phone-home-bar {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); z-index: 12; pointer-events: none;
  width: 106px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.82);
}
.phone-screen { height: 576px; display: flex; flex-direction: row; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; background: #000; position: relative; }
@media (max-width: 1023px) {
  .phone-stage { touch-action: pan-x; }
  .phone-screen { flex-direction: column; overflow-x: hidden; overflow-y: auto; scroll-snap-type: y mandatory; }
}
.phone-screen::-webkit-scrollbar { display: none; }
.reel { flex: 0 0 100%; width: 100%; height: 576px; scroll-snap-align: start; scroll-snap-stop: always; position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 16px 16px 60px; color: #fff; overflow: hidden; }
.reel-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 8; background: #000; }
.reel-stop {
  position: absolute; top: 44px; right: 12px; z-index: 14; display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.72); color: #fff; font-size: 11px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px); cursor: pointer;
}
.phone.is-playing .phone-bottom-nav { opacity: 0; pointer-events: none; }
.phone-bottom-nav {
  position: absolute; left: 0; right: 0; bottom: 0; height: 54px; z-index: 6; transition: opacity .22s ease;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.92) 38%);
  display: flex; align-items: center; justify-content: space-around; padding: 0 14px 10px; color: rgba(255,255,255,.88); font-size: 10px; pointer-events: none;
}
.reel-side-card {
  width: 192px; height: 396px; border-radius: 24px; overflow: hidden; position: relative; flex: none;
  box-shadow: 0 18px 36px -14px rgba(15, 23, 42, .28);
  transition: transform .38s cubic-bezier(.22, 1, .36, 1), box-shadow .32s ease, filter .32s ease;
  will-change: transform;
}
.reel-side-card:hover { transform: translate3d(0, -8px, 0) scale(1.03); box-shadow: 0 26px 46px -14px rgba(38, 88, 19, .32); z-index: 5; }
.reel-side-card.edge-left { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.12) 0%, #000 58%); mask-image: linear-gradient(90deg, rgba(0,0,0,.12) 0%, #000 58%); }
.reel-side-card.edge-right { -webkit-mask-image: linear-gradient(270deg, rgba(0,0,0,.12) 0%, #000 58%); mask-image: linear-gradient(270deg, rgba(0,0,0,.12) 0%, #000 58%); }
.phone-kpi-pill {
  position: absolute; z-index: 10; border-radius: 16px; padding: 12px 16px;
  background: rgba(235, 245, 231, .95); border: 1px solid rgba(100, 149, 82, .35);
  box-shadow: 0 18px 34px -10px rgba(38, 88, 19, .32); backdrop-filter: blur(8px);
}
.phone-kpi-left { left: -74px; top: 96px; transform: rotate(6deg); }
.phone-kpi-right { right: -64px; bottom: 58px; transform: rotate(-7deg); }

/* Galería Dual-Row Automated Slider (GPU translate3d) */
.marquee-wrap { overflow: hidden; position: relative; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; will-change: transform; animation: marqueeLeft 38s linear infinite; }
.marquee-track.reverse { animation: marqueeRight 42s linear infinite; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marqueeLeft { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes marqueeRight { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0, 0, 0); } }

/* Modales nativos: contención de scroll + animación top-layer (@starting-style) */
dialog:modal { overscroll-behavior: contain; }
dialog#media-modal, dialog#lightbox, dialog#vr-modal {
  border: 0; padding: 0; background: transparent; width: 100%;
  opacity: 0;
  transition-property: opacity, transform, display, overlay;
  transition-duration: .28s;
  transition-timing-function: cubic-bezier(.22, 1, .36, 1);
  transition-behavior: allow-discrete;
}
dialog#media-modal { max-width: min(960px, 94vw); }
dialog#lightbox { max-width: min(860px, 94vw); }
dialog#vr-modal { max-width: min(980px, 95vw); }
dialog#media-modal[open], dialog#lightbox[open], dialog#vr-modal[open] { opacity: 1; }
dialog#media-modal::backdrop, dialog#lightbox::backdrop, dialog#vr-modal::backdrop {
  overflow: hidden; overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0); backdrop-filter: blur(0px);
  transition-property: background-color, backdrop-filter, display, overlay;
  transition-duration: .28s;
  transition-timing-function: ease-out;
  transition-behavior: allow-discrete;
}
dialog#media-modal[open]::backdrop, dialog#lightbox[open]::backdrop, dialog#vr-modal[open]::backdrop {
  background: rgba(15, 23, 42, .84); backdrop-filter: blur(4px);
}
@media (prefers-reduced-motion: no-preference) {
  dialog#media-modal, dialog#lightbox, dialog#vr-modal { transform: scale(0.95) translate3d(0, 10px, 0); }
  dialog#media-modal[open], dialog#lightbox[open], dialog#vr-modal[open] { transform: scale(1) translate3d(0, 0, 0); }
  @starting-style {
    dialog#media-modal[open], dialog#lightbox[open], dialog#vr-modal[open] { opacity: 0; transform: scale(0.95) translate3d(0, 10px, 0); }
    dialog#media-modal[open]::backdrop, dialog#lightbox[open]::backdrop, dialog#vr-modal[open]::backdrop { background: rgba(15, 23, 42, 0); backdrop-filter: blur(0px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  dialog#media-modal, dialog#lightbox, dialog#vr-modal { transition-duration: .1s; }
}

/* Línea de tiempo y barras (Legado) */
.tl { position: relative; }
.tl-item { position: relative; padding-left: 2.5rem; }
.tl-item::before { content: ""; position: absolute; left: .6875rem; top: 1.5rem; bottom: -2rem; width: 2px; background: #cbd5e1; }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: .25rem; width: 1.5rem; height: 1.5rem; border-radius: 999px; background: #265813; border: 4px solid #fff; box-shadow: 0 0 0 2px #649552; }
@media (min-width: 1024px) {
  .tl-item { padding-left: 0; padding-top: 2.5rem; }
  .tl-dot { top: 0; left: 0; }
  .tl-item::before { left: 1.5rem; right: -1.75rem; top: calc(.75rem - 1px); bottom: auto; width: auto; height: 2px; }
  .tl-item:last-child::before { display: none; }
}
.bar { transition: width 1.1s cubic-bezier(.2,.8,.2,1); }

/* Acordeones <details> con transición suave al abrir/cerrar */
@supports (interpolate-size: allow-keywords) {
  details { interpolate-size: allow-keywords; }
  details::details-content {
    opacity: 0; block-size: 0; overflow: clip;
    transition: block-size .32s cubic-bezier(.22, 1, .36, 1), opacity .28s ease, content-visibility .32s allow-discrete;
  }
  details[open]::details-content { opacity: 1; block-size: auto; }
}

/* Cuadrícula simétrica 4x2 de sectores (uno al costado de otro y debajo, nunca columna única) */
.sectores-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (max-width: 900px) {
  .sectores-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }
}
@media (max-width: 440px) {
  .sectores-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem;
  }
}

/* Tarjeta de reconocimientos con contexto claro y visualización equilibrada */
.rec-card-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  align-items: center;
}
@media (max-width: 900px) {
  .rec-card-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}
.rec-img-wrap {
  width: 100%;
  height: 220px;
  border-radius: 1.15rem;
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.rec-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.15rem;
  transition: transform .5s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .rec-img-wrap:hover img {
    transform: scale(1.03);
  }
}
.rec-context-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
@media (max-width: 640px) {
  .rec-context-box {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* Carrusel de Blog y Medios (Chosica en pantalla) al 50% y 100% */
.screen-carousel-wrap {
  position: relative;
  overflow: hidden;
  margin-top: 1.75rem;
  padding: 0.5rem 0.25rem 1rem;
}
.screen-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  gap: 1.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.25rem;
}
.screen-carousel-track::-webkit-scrollbar {
  display: none;
}
.screen-card-slide {
  flex: 0 0 calc((100% - 3rem) / 3);
  min-width: 320px;
  max-width: 440px;
  scroll-snap-align: start;
}
@media (min-width: 1536px) {
  .screen-card-slide {
    flex: 0 0 calc((100% - 4.5rem) / 4);
    min-width: 330px;
  }
}
@media (max-width: 1024px) {
  .screen-card-slide {
    flex: 0 0 calc((100% - 1.5rem) / 2);
    min-width: 290px;
  }
}
@media (max-width: 640px) {
  .screen-card-slide {
    flex: 0 0 88vw;
    min-width: 260px;
  }
}

/* Transición suave para los detalles del comparador (Antes y Ahora) */
.cmp-aside-content,
.cmp-aside-footer,
#cmp-caption {
  transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1), transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.cmp-switching .cmp-aside-content,
.cmp-switching .cmp-aside-footer,
#cmp-caption.cmp-switching {
  opacity: 0;
  transform: translateY(6px);
}
#cmp-before,
#cmp-after {
  transition: opacity 0.26s ease;
}
#cmp.cmp-switching #cmp-before,
#cmp.cmp-switching #cmp-after {
  opacity: 0.4;
}

/* Tarjetas mejoradas de Ejes del Legado */
.eje-card { position: relative; overflow: hidden; transition: transform .34s cubic-bezier(.22, 1, .36, 1), box-shadow .34s ease, border-color .3s ease; }
.eje-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, #265813, #649552, #E09F3E, #265813); background-size: 220% 100%;
  opacity: .75; transition: opacity .3s ease; animation: textGradFlow 6s ease-in-out infinite;
}
.eje-card:hover { transform: translate3d(0, -6px, 0); box-shadow: 0 24px 44px -18px rgba(38, 88, 19, .26); border-color: rgba(100, 149, 82, .55); }
.eje-card:hover::before { opacity: 1; }

/* Infografía viva: Las Praderas (nubes reales, pájaros, árboles con brisa y etiquetas siempre activas/visibles) */
.praderas-scene { position: relative; overflow: hidden; opacity: 1 !important; transform: none !important; }
.praderas-sky { position: absolute; left: 36%; right: 0; top: 0; height: 24%; pointer-events: none; overflow: hidden; }
.praderas-sky-real { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; will-change: transform; -webkit-mask-image: radial-gradient(ellipse 20% 13% at 89% 11%, #000 45%, transparent 72%); mask-image: radial-gradient(ellipse 20% 13% at 89% 11%, #000 45%, transparent 72%); animation: realCloudDrift 14s ease-in-out infinite; }
.praderas-bird { position: absolute; color: rgba(15, 23, 42, .68); pointer-events: none; will-change: transform; animation: birdFly var(--dur, 18s) linear infinite; animation-delay: var(--del, 0s); }
.praderas-bird svg { animation: birdFlap .65s ease-in-out infinite alternate; transform-origin: center; }
.praderas-tree { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; will-change: transform; animation: treeSway var(--dur, 4s) ease-in-out infinite; animation-delay: var(--del, 0s); }
.praderas-tree-right { -webkit-mask-image: radial-gradient(ellipse 14% 21% at 91% 30%, #000 54%, transparent 76%); mask-image: radial-gradient(ellipse 14% 21% at 91% 30%, #000 54%, transparent 76%); transform-origin: 90% 45%; }
.praderas-tree-mid { -webkit-mask-image: radial-gradient(ellipse 9% 16% at 82% 43%, #000 50%, transparent 74%); mask-image: radial-gradient(ellipse 9% 16% at 82% 43%, #000 50%, transparent 74%); transform-origin: 83% 55%; }
.praderas-tree-left { -webkit-mask-image: radial-gradient(ellipse 8% 18% at 35% 38%, #000 50%, transparent 74%); mask-image: radial-gradient(ellipse 8% 18% at 35% 38%, #000 50%, transparent 74%); transform-origin: 35% 53%; }
.praderas-tree-back { -webkit-mask-image: radial-gradient(ellipse 7% 12% at 62% 33%, #000 48%, transparent 72%); mask-image: radial-gradient(ellipse 7% 12% at 62% 33%, #000 48%, transparent 72%); transform-origin: 62% 43%; }
.praderas-plant-r { -webkit-mask-image: radial-gradient(ellipse 11% 11% at 79% 56%, #000 48%, transparent 74%); mask-image: radial-gradient(ellipse 11% 11% at 79% 56%, #000 48%, transparent 74%); transform-origin: 79% 65%; }
.praderas-plant-l { -webkit-mask-image: radial-gradient(ellipse 7% 10% at 33% 62%, #000 48%, transparent 74%); mask-image: radial-gradient(ellipse 7% 10% at 33% 62%, #000 48%, transparent 74%); transform-origin: 33% 70%; }
.praderas-leaf { position: absolute; width: 7px; height: 4px; border-radius: 999px 0 999px 0; pointer-events: none; will-change: transform, opacity; animation: leafFloat var(--dur, 6.5s) ease-in-out infinite; animation-delay: var(--del, 0s); }
.praderas-reveal { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; z-index: 4; will-change: clip-path; }
.praderas-rev-pistas { clip-path: inset(75% 36.5% 25% 51.2%); transition: clip-path .85s cubic-bezier(.22, 1, .36, 1) .15s; }
.praderas-rev-veredas { clip-path: inset(76.2% 22.4% 23.8% 64%); transition: clip-path .85s cubic-bezier(.22, 1, .36, 1) .55s; }
.praderas-rev-areas { clip-path: inset(56% .8% 44% 80.2%); transition: clip-path .85s cubic-bezier(.22, 1, .36, 1) .95s; }
.praderas-scene.is-visible .praderas-rev-pistas { clip-path: inset(57.8% 36.5% 25% 51.2%); }
.praderas-scene.is-visible .praderas-rev-veredas { clip-path: inset(58.8% 22.4% 23.8% 64%); }
.praderas-scene.is-visible .praderas-rev-areas { clip-path: inset(56% .8% 21% 80.2%); }
@keyframes realCloudDrift { 0%, 100% { transform: translate3d(-8px, 0, 0); } 50% { transform: translate3d(10px, -2px, 0); } }
@keyframes birdFly { 0% { transform: translate3d(-40px, 12px, 0); opacity: 0; } 10% { opacity: .85; } 50% { transform: translate3d(210px, -8px, 0); } 90% { opacity: .85; } 100% { transform: translate3d(460px, 6px, 0); opacity: 0; } }
@keyframes birdFlap { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
@keyframes treeSway { 0%, 100% { transform: rotate(-2.1deg) skewX(-1.4deg); } 50% { transform: rotate(2.2deg) skewX(1.5deg); } }
@keyframes leafFloat {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  15% { opacity: .9; }
  85% { opacity: .8; }
  100% { transform: translate3d(-48px, 64px, 0) rotate(220deg); opacity: 0; }
}
