/* =========================================================
   TOKENS · BASE · HELPERS
========================================================= */
:root{
  /* Colors */
  --bg:#f6f8fb; --bg-soft:#fff;
  --txt:#22313a; --txt-soft:#5b6b77;
  --brand:#3E6C3E; --brand-2:#2b502b; --accent:#1b8f7a;
  --muted:#e8edf2;

  /* Effects */
  --shadow: 0 10px 28px rgba(16,24,40,.10);
  --shadow-sm: 0 6px 16px rgba(16,24,40,.08);

  /* Radii & spacing */
  --radius:18px; --radius-sm:12px;
  --gap: clamp(16px, 3vw, 28px);

  /* Breakpoints */
  --bp-sm:560px; --bp-md:700px; --bp-lg:900px; --bp-xl:980px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--txt);
  font-family:"Montserrat",system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  line-height:1.5;
}
img{max-width:100%; display:block}
.wrap{width:min(1180px,92%); margin-inline:auto}
.seccion{padding: clamp(54px, 7vw, 96px) 0}
.section-head{margin-bottom:22px}
.section-title{margin:0 0 6px; font-size:clamp(24px,2.6vw,36px); line-height:1.2}
.section-sub{color:var(--txt-soft); font-size:clamp(14px,1.2vw,16px)}
.sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Grids */
.grid{display:grid; gap:var(--gap)}
.grid-2,.grid-3{grid-template-columns:1fr}
@media (min-width: var(--bp-lg)){
  .grid-2{grid-template-columns:1fr 1fr}
  .grid-3{grid-template-columns:repeat(3,1fr)}
}

/* Focus accesible */
:where(a,button,[role="button"],input,select,textarea):focus-visible{
  outline:3px solid color-mix(in oklab, var(--brand) 35%, #fff 65%);
  outline-offset:2px; border-radius:10px;
}

/* =========================================================
   COMPONENTES: Cards · Botones · Badges
========================================================= */
.card{background:var(--bg-soft); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden}
.card-body{padding:20px}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 18px; border-radius:999px; border:0; cursor:pointer;
  background:var(--brand); color:#fff; font-weight:700; text-decoration:none;
  box-shadow:var(--shadow-sm);
  transition:transform .15s ease, box-shadow .15s ease, background .2s ease;
}
.btn:hover{transform:translateY(-1px); background:var(--brand-2)}
.btn:active{transform:translateY(0)}
.btn-outline{background:#fff; color:var(--brand); border:2px solid var(--brand)}
.btn-outline:hover{background:var(--brand); color:#fff}
.btn-min,.btn.sml{padding:8px 12px}

.badge{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px; font-size:12px; font-weight:800;
}
.badge-etapa{background:#eef2ff; color:#3841a2}
.badge-legal{background:#e7f6ee; color:#107a4a}
.etapa-construccion{background:#fff7ed; color:#b45309}

/* =========================================================
   HEADER
========================================================= */
.site-header{position:sticky; top:0; z-index:50; background:#fff; box-shadow:0 2px 10px rgba(16,24,40,.06)}
.header-wrap{display:flex; align-items:center; justify-content:space-between; min-height:64px; gap:12px}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:inherit}
.brand-logo{height:40px; object-fit:contain}
.brand-name{display:none; font-weight:800}
@media (min-width: var(--bp-md)){ .brand-name{display:inline-block} }
.nav ul{display:flex; gap:14px; list-style:none; margin:0; padding:0}
.nav a{color:var(--brand); text-decoration:none; font-weight:700; padding:8px 10px; border-radius:8px}
.nav a:hover{background:rgba(62,108,62,.08)}

/* =========================================================
   HERO + GLASS
========================================================= */
.hero{
  margin-top:70px; position:relative; overflow:hidden;
  min-height:clamp(480px, 68vh, 760px);
  display:flex; align-items:center;
  background:
    radial-gradient(1100px 600px at 12% 20%, rgba(62,108,62,.12), transparent 60%),
    radial-gradient(900px 500px at 88% 30%, rgba(27,143,122,.10), transparent 60%),
    var(--bg);

  /* Glass layout vars (fáciles de ajustar) */
  --glass-left:  clamp(120px, 10vw, 220px);
  --glass-right: clamp(180px, 18vw, 320px);
  --fade-width:  clamp(80px, 10vw, 150px);
}
.hero-media{position:absolute; inset:0; z-index:0}
.hero-media :is(img,video){width:100%; height:100%; object-fit:cover; opacity:.85}
.hero-overlay{position:absolute; inset:0; z-index:1; background:linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.45))}
.hero-grid{position:relative; z-index:3; display:grid; gap:20px; grid-template-columns:1fr; align-items:center; padding:clamp(18px, 2.5vw, 30px) 0}
@media (min-width:980px){ .hero-grid{grid-template-columns:1.1fr .9fr} }

.hero-left{color:#fff; max-width:680px}
.hero-title{font-size:clamp(36px, 6vw, 62px); font-weight:900; line-height:1.05; margin:0 0 10px; text-shadow:0 2px 12px rgba(0,0,0,.35)}
.hero-title span{color:#e7f6ee}
.hero-sub{font-size:clamp(15px,1.4vw,18px); margin:0 0 16px; color:#fff; text-shadow:0 1px 10px rgba(0,0,0,.28)}
.hero-badges{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 14px; padding:0; list-style:none}
.hero-cta{display:flex; gap:10px; flex-wrap:wrap}
.hero-right{display:grid; place-items:center; position:relative; z-index:3}
.hero-mark{width:min(420px,58vw); opacity:.95; filter:drop-shadow(0 8px 24px rgba(0,0,0,.25))}

/* Glass panel + fade hacia el logo */
.hero::after{
  content:""; position:absolute; top:clamp(12px, 2.5vw, 32px); bottom:clamp(12px, 2.5vw, 32px);
  left:var(--glass-left); right:var(--glass-right);
  border-radius:clamp(12px, 2vw, 24px);
  background:rgba(18,18,20,.22);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 24px 80px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter:blur(12px) saturate(135%) contrast(.98);
  -webkit-backdrop-filter:blur(12px) saturate(135%) contrast(.98);
  pointer-events:none; z-index:2;
}
.hero::before{
  content:""; position:absolute; top:clamp(12px, 2.5vw, 32px); bottom:clamp(12px, 2.5vw, 32px);
  right:var(--glass-right); width:var(--fade-width);
  border-radius:0 clamp(24px,2vw,28px) clamp(24px,2vw,28px) 0;
  background:linear-gradient(to right, rgba(18,18,20,.18) 0%, rgba(18,18,20,.10) 60%, rgba(18,18,20,0) 100%);
  backdrop-filter:blur(8px) saturate(120%); -webkit-backdrop-filter:blur(8px) saturate(120%);
  pointer-events:none; z-index:2;
}
@media (max-width:900px){
  .hero::after{ left:clamp(12px,3vw,24px); right:clamp(12px,3vw,24px) }
  .hero::before{ display:none }
}

/* =========================================================
   PROYECTOS
========================================================= */
.proyectos-grid .proyecto-card{overflow:hidden}
.proyecto-card .card-media{position:relative; aspect-ratio:16/9; overflow:hidden}
.proyecto-card .card-media img{width:100%; height:100%; object-fit:cover; transform:scale(1.02); transition:transform .6s ease}
.proyecto-card:hover .card-media img{transform:scale(1.06)}
.media-badges{position:absolute; top:12px; left:12px; display:flex; gap:8px; flex-wrap:wrap; z-index:2}
.btn-ghost{
  position:absolute; right:12px; bottom:12px; border:1px solid rgba(16,24,40,.12);
  background:rgba(255,255,255,.95); color:var(--txt); border-radius:12px; padding:8px 12px; cursor:pointer;
  backdrop-filter:saturate(120%) blur(4px)
}
.card-title{margin:0 0 6px; font-size:clamp(18px, 1.6vw, 20px)}
.card-text{color:var(--txt-soft); margin:0 0 12px}
.mini-features{display:flex; flex-wrap:wrap; gap:10px; margin:0 0 12px; padding:0; list-style:none}
.mini-features li{background:#f2f5f7; color:#51606d; padding:6px 10px; border-radius:8px; font-size:12px}
.card-cta{display:flex; gap:10px; flex-wrap:wrap}

/* =========================================================
   MODELOS (slider)
========================================================= */
.modelos .intro-sep{display:block; width:64px; height:4px; background:var(--brand); border-radius:4px; margin:8px 0 0}
.modelos-slider{position:relative}
.ms-arrow{position:absolute; top:50%; transform:translateY(-50%); background:#fff; border:0; width:36px; height:36px; border-radius:50%; box-shadow:var(--shadow-sm); cursor:pointer; z-index:2}
.ms-prev{left:-6px} .ms-next{right:-6px}
.ms-track{display:flex; gap:16px; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch; padding:6px}
.ms-track::-webkit-scrollbar{display:none}
.modelo{
  flex:0 0 auto; width:clamp(280px,72vw,360px); scroll-snap-align:start;
  background:#fff; border-radius:16px; box-shadow:var(--shadow); overflow:hidden; padding-bottom:10px;
}
.modelo .horizontal{aspect-ratio:16/9; width:100%; object-fit:cover}
.modelo .nombre{margin:10px 12px 0; font-size:18px; color:var(--brand); font-weight:800}
.modelo .ubi{margin:0 12px 8px; color:var(--txt-soft)}
.modelo .property-features{display:flex; flex-wrap:wrap; gap:8px; margin:8px 12px 12px; padding:0; list-style:none; color:#51606d}
.modelo .mini{display:flex; gap:8px; overflow:auto; padding:0 12px 10px}
.modelo .mini img{width:56px; height:56px; border-radius:8px; object-fit:cover; box-shadow:var(--shadow-sm)}
.modelo .btn-galeria{margin:0 12px 12px}

/* =========================================================
   GALERÍA / LIGHTBOX (overlay)
========================================================= */
.gal-overlay[hidden]{display:none}
.gal-overlay{position:fixed; inset:0; display:grid; place-items:center; padding:24px; z-index:1200; background:rgba(15,23,42,.75)}
.gal-dialog{
  position:relative; background:#fff; border-radius:18px; box-shadow:0 20px 60px rgba(0,0,0,.25);
  width:min(1100px,96vw); height:min(86vh,760px);
  display:grid; grid-template-rows:auto 1fr auto; overflow:hidden;
}
.gal-close{
  position:absolute; top:10px; right:12px; width:36px; height:36px; border-radius:50%;
  border:0; background:#fff; box-shadow:var(--shadow-sm); cursor:pointer; font-size:20px;
}
.gal-head{display:flex; align-items:baseline; gap:10px; padding:14px 16px; border-bottom:1px solid var(--muted)}
.gal-head h4{margin:0; color:var(--brand)}
.gal-main{
  position:relative; background:#000; display:flex; align-items:center; justify-content:center; min-height:clamp(320px,62vh,680px); padding:0;
}
.gal-main img{width:100%; height:100%; object-fit:contain; background:#fff}
.gal-main .nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:40px; height:40px; display:grid; place-items:center;
  border:0; border-radius:999px; background:#fff; box-shadow:var(--shadow-sm); cursor:pointer;
}
.gal-main .prev{left:12px} .gal-main .next{right:12px}
.gal-foot{padding:10px 12px; background:#fff}
.gal-thumbs{display:flex; gap:10px; overflow:auto; height:74px; align-items:center}
.gal-thumbs img{height:56px; width:auto; aspect-ratio:4/3; object-fit:cover; border-radius:10px; box-shadow:var(--shadow-sm)}

/* Lightbox — móvil: que mande la imagen y sin franjas negras */
@media (max-width: 768px){
  #galeria .gal-dialog{width:100%; height:100svh; margin:0; border-radius:0; grid-template-rows:auto 1fr auto}
  #galeria .gal-head{padding:12px 14px}
  #galeria .gal-main{
    height:auto !important; min-height:0; background:transparent; padding:0;
    display:flex; align-items:center; justify-content:center;
  }
  #galeria #gal-img{
    display:block; width:100%; height:auto; object-fit:contain; border-radius:inherit;
    max-height: calc(100svh - var(--gal-head,110px) - var(--gal-foot,90px));
  }
  #galeria .gal-foot{padding:8px 10px max(10px, env(safe-area-inset-bottom))}
  #galeria .gal-thumbs{height:64px; gap:8px}
  #galeria .gal-thumbs img{height:52px}
}

/* =========================================================
   NOSOTROS
========================================================= */
.nosotros-grid{display:grid; gap:var(--gap); grid-template-columns:1fr}
@media (min-width: var(--bp-xl)){ .nosotros-grid{grid-template-columns:1fr 1.2fr; align-items:stretch} }
.stats{align-self:start}
.stats .stat{background:#fff; border-radius:14px; padding:18px; text-align:center; box-shadow:var(--shadow-sm)}
.stat-num{font-size:clamp(28px, 4.5vw, 42px); font-weight:900; color:#f59e0b; display:block; line-height:1}
.stat-label{color:var(--txt-soft); font-weight:600}
.about-card{display:grid; grid-template-columns:1fr; gap:0; height:100%}
.about-media{max-height:320px; overflow:hidden}
@media (min-width: var(--bp-xl)){ .about-media{max-height:none} }
.about-media img{width:100%; height:100%; object-fit:cover}
.about-body{padding:20px}
.about-points{margin:14px 0; padding:0; list-style:none; display:grid; gap:8px}
.about-points li{padding:8px 12px; border-radius:10px; background:#f2f6f2; font-weight:700; color:var(--brand-2)}
.about-cta{display:flex; gap:10px; flex-wrap:wrap}

/* Variante “nosotros-right” y contadores en columna */
.nosotros-grid.nosotros-right{grid-template-columns:1.2fr .8fr}
@media (max-width: calc(var(--bp-xl) - 1px)){ .nosotros-grid.nosotros-right{grid-template-columns:1fr} }
.stats-vertical{display:grid; grid-template-columns:1fr; gap:16px; align-content:start}
.stats-vertical .stat{ text-align:left; padding:18px 16px; border-radius:14px; background:#fff; box-shadow:var(--shadow-sm) }
.stats-vertical .stat-num{ font-size: clamp(28px, 4.5vw, 42px); color:#f59e0b; font-weight:900; line-height:1.05; margin-bottom:6px }
.stats-vertical .stat-label{ color:var(--txt-soft); font-weight:700 }

/* =========================================================
   TRANSPARENCIA & RESPALDO
========================================================= */
.legal-grid .legal-card{overflow:hidden}
.legal-head{display:flex; align-items:center; justify-content:space-between; padding:16px 18px; border-bottom:1px solid var(--muted)}
.legal-list{margin:0; padding:0}
.legal-row{
  display:grid; grid-template-columns:1fr auto auto; gap:12px; align-items:center;
  padding:12px 16px; border-bottom:1px dashed #e2e8f0;
  background:linear-gradient(180deg,#fff,#fff) padding-box,
             radial-gradient(circle at top left, rgba(62,108,62,.08), transparent 70%) border-box;
  list-style:none;
}
.legal-row:last-child{border-bottom:0}
.doc-name{font-weight:800; color:#2f3f2f}
.doc-meta{color:#6b7a86; font-size:14px}
.doc-cta{display:flex; gap:10px; justify-self:end}
.legal-note{display:flex; align-items:center; gap:12px; margin-top:var(--gap); padding:14px 16px}
.icon-shield{width:26px; height:26px; fill:var(--brand)}
.legal-note p{margin:0; color:var(--txt-soft)}

/* Variante simple */
.legal-card.simple .legal-checks{list-style:none; margin:0; padding:16px; display:grid; gap:10px}
.legal-card.simple .legal-checks li{
  background:#f7faf7; border:1px dashed #dce7dc; border-radius:12px; padding:12px 14px 12px 40px;
  font-weight:800; color:#2f3f2f; position:relative;
}
.legal-card.simple .legal-checks li::before{
  content:"✓"; position:absolute; left:12px; top:50%; transform:translateY(-50%);
  background:#e7f6ee; color:#107a4a; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-weight:900;
}
.legal-card.simple :is(.legal-list,.legal-row){display:none!important}

/* =========================================================
   TESTIMONIOS (slider compacto)
========================================================= */
.testimonios{background:var(--bg)}
.testi-viewport{position:relative}
.testi-rail{
  display:flex; gap:16px; overflow-x:auto; scroll-snap-type:x mandatory; -webkit-overflow-scrolling:touch;
  padding:2px 6px 10px;
}
.testi-rail::-webkit-scrollbar{display:none}
.testi{
  flex:0 0 auto; width: clamp(280px, 68vw, 340px); scroll-snap-align:start;
  display:flex; flex-direction:column; justify-content:space-between;
}
.testi-body{display:grid; gap:14px}
.testi-top{display:flex; align-items:center; gap:12px}
.testi-avatar{width:48px; height:48px; border-radius:12px; object-fit:cover; flex-shrink:0}
.testi-name{margin:0; font-size:15px; font-weight:800}
.testi-stars{color:#fbbf24; font-size:14px; line-height:1}
.testi-text{font-size:14px; color:var(--txt-soft)}
.testi-footer{display:flex; justify-content:space-between; align-items:center}
.testi-quote{margin-top:var(--gap); padding:20px; font-style:italic; background:#fff; color:var(--txt); border-left:4px solid var(--brand)}
.testi-quote p{margin:0 0 6px}
.testi-quote cite{display:block; font-size:14px; color:var(--txt-soft)}
.testi-nav{position:absolute; top:50%; transform:translateY(-50%); z-index:2; background:#fff; border:0; width:36px; height:36px; border-radius:50%; box-shadow:var(--shadow-sm); cursor:pointer}
.testi-nav.left{left:-6px} .testi-nav.right{right:-6px}

/* Grid/carrusel compacto (t-) */
:root{ --t-gap:16px; --t-radius:16px; --t-media-ratio:4/5; }
.t-section{max-width:1200px; margin:0 auto; padding:24px 16px}
.t-head{text-align:center; margin-bottom:14px}
.t-head h2{margin:0 0 6px; font-weight:800; font-size:clamp(1.4rem, 1.4rem + 1.2vw, 2rem); color:#000}
.t-head .t-sub{margin:0 auto; max-width:720px; color:#6b7280; font-size:clamp(.92rem, .88rem + .2vw, 1rem)}

.t-grid{
  display:flex; gap:24px; overflow-x:auto; scroll-snap-type:x mandatory; scroll-padding:0;
  -ms-overflow-style:none; scrollbar-width:none;
  padding:4px 8px 12px;
}
.t-grid::-webkit-scrollbar{display:none}
.t-card{
  background:#fff; border:1px solid #e5e7eb; border-radius:var(--t-radius); overflow:hidden;
  box-shadow:0 6px 16px rgba(0,0,0,.05);
  display:flex; flex-direction:column; margin:0 auto;
  flex:0 0 var(--t-card-w, calc((100% - 48px)/3)); scroll-snap-align:start;
  max-width:320px; user-select:none;
}
@media (max-width:900px){ .t-card{ flex-basis:var(--t-card-w, calc((100% - 24px)/2)) } }
@media (max-width:600px){ .t-card{ flex-basis:var(--t-card-w, 100%) } }
.t-media{ width:100%; aspect-ratio:var(--t-media-ratio); cursor:pointer }
.t-media img{ width:100%; height:100%; object-fit:cover }
.t-quote{ padding:12px 14px 14px; display:grid; gap:6px }
.t-title{ margin:0; font-size:.98rem; font-weight:800; color:#3E6C3E }
.t-text{ margin:0; color:#374151; line-height:1.55; font-size:.92rem }
.t-meta{ margin-top:4px; display:grid; gap:2px; font-size:.82rem; color:#6b7280 }
.t-meta strong{ color:#111827 }

/* =========================================================
   MODALES GENERALES
========================================================= */
.modal[hidden]{display:none}
.modal{position:fixed; inset:0; display:grid; place-items:center; background:rgba(15,23,42,.55); z-index:1200; padding:22px}
.modal-card{
  position:relative; width:min(980px,96%); background:#fff; border-radius:20px; overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.18); display:grid; grid-template-rows:auto 1fr;
}
.modal-media{background:#000}
.modal-body{padding:20px}
.modal-close{position:absolute; top:10px; right:14px; width:36px; height:36px; border-radius:999px; border:0; background:#fff; box-shadow:var(--shadow-sm); cursor:pointer; font-size:20px}

/* Carriles horizontales sin barras visibles */
.mini,.ms-track,[data-slider],.testi-rail{-ms-overflow-style:none; scrollbar-width:none}
.mini::-webkit-scrollbar,.ms-track::-webkit-scrollbar,[data-slider]::-webkit-scrollbar,.testi-rail::-webkit-scrollbar{display:none}
html,body{overflow-x:hidden}
.mini{cursor:grab; user-select:none; -webkit-user-select:none}
.mini.dragging{cursor:grabbing}

/* Modelos: pista propia + sin flechas */
.ms-arrow{display:none!important}
#msTrack{
  display:flex; gap:24px; overflow-x:auto; scroll-snap-type:x mandatory;
  padding:4px 8px 12px; -ms-overflow-style:none; scrollbar-width:none; cursor:grab; user-select:none;
}
#msTrack::-webkit-scrollbar{display:none}
#msTrack.dragging{cursor:grabbing}
#msTrack .modelo{flex:0 0 350px!important; scroll-snap-align:start}

/* =========================================================
   FOOTER · WHATSAPP
========================================================= */
.site-footer{background:#fff; border-top:1px solid var(--muted)}
.footer-wrap{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 0}
.site-footer nav{display:flex; gap:14px}
.site-footer a{color:var(--brand); text-decoration:none; font-weight:700}
.site-footer a:hover{text-decoration:underline}

.btn-wsp-footer{
  display:inline-block; margin-top:15px; padding:10px 20px;
  background:#25D366; color:#fff; border-radius:20px; text-decoration:none; font-weight:700;
  transition:background-color .3s;
}
.btn-wsp-footer:hover{background:#1ebe5d}

.whatsapp-float{
  position:fixed; bottom:20px; right:20px; z-index:9999; width:55px; height:55px;
  background:#fff; border-radius:50%; display:flex; place-content:center; place-items:center;
  box-shadow:0 4px 10px rgba(0,0,0,.3); transition:transform .3s ease;
}
.whatsapp-float:hover{transform:scale(1.1)}
.whatsapp-float img{width:28px; height:28px}

/* =========================================================
   PREFERENCIAS & MODO OSCURO
========================================================= */
@media (prefers-reduced-motion:reduce){
  *{animation:none!important; transition:none!important; scroll-behavior:auto}
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#0f172a; --bg-soft:#0b1222; --txt:#e6edf3; --txt-soft:#9fb3c8; --muted:#16213a;
    --shadow:0 10px 28px rgba(0,0,0,.35); --shadow-sm:0 6px 16px rgba(0,0,0,.25);
  }
  .badge-etapa{background:#1c2542; color:#c7d2fe}
  .badge-legal{background:#0f2a20; color:#81e6a8}
  .testi-quote{background:#0b1222; border-left-color:var(--brand)}
}

/* Contenedor de proyectos: 1 col en móvil, 2 cols en desktop */
.proyectos-grid{
  display:grid;
  gap:24px;               /* separación entre tarjetas */
  grid-template-columns: 1fr;     /* móvil */
}

@media (min-width: 900px){
  .proyectos-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* 2 columnas */
  }
}

/* Asegura que la tarjeta estire bien */
.proyecto-card{
  height:100%;
  display:flex;
  flex-direction:column;
}
.proyecto-card .card-media{ aspect-ratio:16/9; overflow:hidden; }
.proyecto-card .card-media img{ width:100%; height:100%; object-fit:cover; }


/* Tamaño controlado para video vertical */
.video-portrait{
  /* ajusta estos límites a tu gusto */
  --vp-min: 260px;
  --vp-ideal: 30vw;
  --vp-max: 420px;

  width: clamp(var(--vp-min), var(--vp-ideal), var(--vp-max));
  aspect-ratio: 9 / 16;                 /* vertical, sin deformar */
  margin: 10px auto 0;
  background:#000;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;                         /* para que el figcaption “pegue” abajo si lo usas */
  align-content: start;
  gap: 8px;
}

.vp-media{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;                     /* llena el marco; si quieres ver TODO el cuadro: contain */
}

/* Texto opcional bajo el video */
.vp-caption{
  margin: 6px 6px 10px;
  color: var(--txt-soft);
  font-size: .9rem;
  text-align: center;
}

/* Un pelín más ancho en móvil, sin pasarse */
@media (max-width: 600px){
  .video-portrait{
    --vp-ideal: 70vw;
    --vp-max: 440px;
  }
}

.nosotros-grid.nosotros-right{
  display:grid; gap:var(--gap);
  grid-template-columns: 1.2fr 0.8fr; /* texto izq, stats der */
  align-items:stretch;
}
@media (max-width: 979px){
  .nosotros-grid.nosotros-right{ grid-template-columns: 1fr; }
}

/* contadores en columna */
.stats-vertical{ display:grid; grid-template-columns:1fr; gap:16px; align-content:start }
.stats-vertical .stat{ text-align:left; padding:18px 16px; border-radius:14px; background:#fff; box-shadow:var(--shadow-sm) }
.stats-vertical .stat-num{ font-size: clamp(28px, 4.5vw, 42px); color:#f59e0b; font-weight:900; display:block; line-height:1.05; margin-bottom:6px }
.stats-vertical .stat-label{ color:var(--txt-soft); font-weight:700 }

/* =========================================================
   FALLBACK (sin soporte de blur en hero glass)
========================================================= */
@supports not (backdrop-filter:blur(1px)){
  .hero::after{background:rgba(18,18,20,.45)}
  .hero::before{background:linear-gradient(to right, rgba(18,18,20,.35) 0%, rgba(18,18,20,0) 100%)}
}

/* === Proyectos: 3 tarjetas en desktop / 2 en tablet / 1 en móvil === */
.proyectos-grid.layout-3{
  display:grid;
  gap: var(--gap);
  grid-template-columns: repeat(3, minmax(0,1fr));
  align-items: stretch;
}
@media (max-width:1100px){
  .proyectos-grid.layout-3{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width:680px){
  .proyectos-grid.layout-3{ grid-template-columns: 1fr; }
}

/* Tarjeta consistente y “elevada” */
.proyecto-card{
  background:#fff;
  border-radius:16px;
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;               /* igualamos alturas */
  flex-direction:column;
}
.proyecto-card .card-media{
  position:relative;
  aspect-ratio:16/9;          /* misma proporción de imagen */
  overflow:hidden;
}
.proyecto-card .card-media img{
  width:100%; height:100%;
  object-fit:cover;
  transform: scale(1.02);
  transition: transform .6s ease;
}
.proyecto-card:hover .card-media img{ transform: scale(1.06); }

.media-badges{
  position:absolute; top:12px; left:12px;
  display:flex; gap:8px; z-index:2;
}
.proyecto-card .card-body{
  display:flex; flex-direction:column; gap:10px;
  padding:16px;
  flex:1;                     /* empuja el CTA abajo */
}
.card-title{ margin:0; font-weight:800; font-size: clamp(18px,1.6vw,20px); }
.card-text{ margin:0; color:var(--txt-soft); }
.mini-features{ margin:0; padding:0; list-style:none; display:flex; flex-wrap:wrap; gap:8px; }
.mini-features li{ background:#f2f5f7; color:#51606d; padding:6px 10px; border-radius:8px; font-size:12px; }

.card-cta{ margin-top:auto; display:flex; gap:10px; flex-wrap:wrap; }

/* Proyectos: 3-2-1 en desktop/tablet (ya lo tienes) */
.proyectos-grid.layout-3{
  display:grid;
  gap: var(--gap);
  grid-template-columns: repeat(3, minmax(0,1fr));
  align-items: stretch;
}
@media (max-width:1100px){
  .proyectos-grid.layout-3{ grid-template-columns: repeat(2,1fr); }
}

/* === MÓVIL: carrusel horizontal que se desplaza a la izquierda === */
@media (max-width:680px){
  .proyectos-grid.layout-3{
    display:flex;                  /* de grid → flex rail */
    gap:16px;
    overflow-x:auto;               /* scroll horizontal */
    scroll-snap-type:x mandatory;  /* snap por tarjeta */
    scroll-padding-left:12px;      /* margen al alinearse a la izquierda */
    padding: 4px 12px 10px;        /* respiro a los lados */
    align-items: stretch;
    -ms-overflow-style:none;       /* IE/Edge */
    scrollbar-width:none;          /* Firefox */
  }
  .proyectos-grid.layout-3::-webkit-scrollbar{ display:none; } /* WebKit */

  /* cada tarjeta ocupa ~90% del ancho y “encaja” al inicio */
  .proyectos-grid.layout-3 > .proyecto-card{
    flex: 0 0 90%;
    scroll-snap-align:start;       /* se alinea a la izquierda */
    scroll-snap-stop:always;       /* mejor feeling al soltar */
  }
}

/* ====== Layout base ====== */
.t-wrap{ width:min(1180px, 92%); margin:40px auto; }
.t-title{ margin:0 0 14px; font:800 clamp(22px,2.2vw,28px)/1.2 system-ui,Segoe UI,Roboto; color:#111; }
.t-grid{
  display:grid; gap:20px;
  grid-template-columns: 0.9fr 1.1fr; /* video | galería */
  align-items:start;
}

/* ====== Video vertical ====== */
.t-left{ display:grid; }
.v-frame{
  aspect-ratio: 9 / 16;         /* vertical */
  max-height: 76vh;             /* controla alto máximo */
  border-radius:16px;
  overflow:hidden;
  background:#000;
  box-shadow:0 10px 28px rgba(0,0,0,.12);
}
.v-frame video{
  width:100%; height:100%;
  object-fit: cover;            /* ocupa todo sin barras */
}

/* ====== Galería ====== */
.t-right{ display:grid; gap:10px; }

/* Imagen grande horizontal */
.viewer{
  position:relative;
  aspect-ratio: 16 / 9;         /* horizontal */
  border-radius:16px;
  overflow:hidden;
  background:#000;
  box-shadow:0 10px 28px rgba(0,0,0,.10);
  display:grid; place-items:center;
}
.viewer img{
  width:100%; height:100%;
  object-fit: cover;             /* usa 'contain' si prefieres ver todo */
}

/* Flechas */
.viewer .nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:42px; height:42px; border:0; cursor:pointer;
  border-radius:50%; color:#111; background:#fff;
  box-shadow:0 6px 16px rgba(0,0,0,.18);
  display:grid; place-items:center; font-size:28px; line-height:0;
  opacity:.9;
}
.viewer .prev{ left:10px; }
.viewer .next{ right:10px; }
.viewer:hover .nav{ opacity:1; }

/* Miniaturas */
.thumbs{
  display:grid; grid-auto-flow:column; gap:10px;
  grid-auto-columns: minmax(86px, 1fr);
  overflow:auto; padding-bottom:2px;
  scrollbar-width:thin;
}
.thumbs::-webkit-scrollbar{ height:6px; }
.thumbs::-webkit-scrollbar-thumb{ background:#c7ccd1; border-radius:8px; }
.thumb{
  border:0; padding:0; background:none; cursor:pointer;
  border-radius:10px; overflow:hidden; line-height:0;
  position:relative; box-shadow:0 2px 10px rgba(0,0,0,.08);
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.thumb::after{
  content:""; position:absolute; inset:0; border:2px solid transparent; border-radius:10px;
}
.thumb.is-active::after{ border-color:#3E6C3E; }

/* ====== Responsive ====== */
@media (max-width: 980px){
  .t-grid{ grid-template-columns: 1fr; }
  .v-frame{ max-height: 70vh; }
}

/* =============================
   TESTIMONIOS – ajustes finales
==============================*/
/* ===== Testimonios: layout ordenado ===== */
.testi{ max-width: 1200px; margin: 0 auto; padding: 10px 16px 24px; }
.t-head{ text-align:center; margin: 0 0 clamp(14px,2.2vw,24px); }
.t-head h2{ margin:0; font-weight:900; letter-spacing:-.02em; font-size:clamp(28px,3.2vw,42px); }
.t-head .t-sub{ margin:6px auto 0; max-width:60ch; color:var(--txt-soft,#5b6b77); font-size:clamp(14px,1.2vw,18px); }

:root{
  --col-gap: clamp(16px,2.4vw,28px);
  --video-col: 40%;
  --galeria-col: 60%;
  --viewer-ratio: 16/9;       /* relación del visor grande */
  --shadow-ok: 0 10px 28px rgba(16,24,40,.10);
  --shadow-sm-ok: 0 6px 16px rgba(16,24,40,.08);
  --brand-ok: #3E6C3E;
}
.card{ background:#fff; border-radius:16px; box-shadow:var(--shadow, var(--shadow-ok)); padding:12px; }

/* 2 columnas con alturas parejas y ordenado */
.t-layout{
  display:grid;
  grid-template-columns: minmax(320px,var(--video-col)) minmax(420px,var(--galeria-col));
  gap: var(--col-gap);
  align-items: start;
}

/* Video vertical, tamaño moderado y sin franjas */
.t-video{ display:grid; place-items:center; }
.t-video video{
  width: 200px;;
  height:auto;
  aspect-ratio: 9/16;
  display:block;
  border-radius:12px;
  background:#000;
  box-shadow: var(--shadow-sm, var(--shadow-sm-ok));
}

/* Visor grande ajustado, sin desbordes */
.viewer{
  position:relative;
  width:100%;
  aspect-ratio: var(--viewer-ratio);
  border-radius:12px;
  overflow:hidden;
  background:#000;
  box-shadow: var(--shadow-sm, var(--shadow-sm-ok));
}
.viewer img{ width:100%; height:100%; object-fit:cover; display:block; }

/* Flechas centradas */
.viewer .nav{
  position:absolute; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border-radius:50%; border:0;
  background:#fff; box-shadow: var(--shadow-sm, var(--shadow-sm-ok));
  cursor:pointer; font-size:26px; line-height:38px; text-align:center;
}
.viewer .prev{ left:10px; } .viewer .next{ right:10px; }

/* Miniaturas uniformes (mismo tamaño) */
:root{
  --thumb-h: clamp(90px, 12vw, 116px);
  --thumb-ratio: 16/9;
}
.thumbs{
  margin-top:12px;
  display:grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(var(--thumb-h) * (var(--thumb-ratio)));
  gap:12px;
  overflow:auto;
  padding-bottom:2px;
  -ms-overflow-style:none; scrollbar-width:none;
}
.thumbs::-webkit-scrollbar{ display:none; }

.thumb{
  display:block; padding:0; border:0; cursor:pointer;
  width: calc(var(--thumb-h) * (var(--thumb-ratio)));
  height: var(--thumb-h);
  aspect-ratio: var(--thumb-ratio);
  border-radius:12px; overflow:hidden; background:#fff;
  box-shadow: var(--shadow-sm, var(--shadow-sm-ok));
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.thumb.is-active{ outline:3px solid var(--brand, var(--brand-ok)); outline-offset:2px; }

/* Responsive: apilar en una columna si no hay ancho suficiente */
@media (max-width: 980px){
  .t-layout{ grid-template-columns: 1fr; }
  .viewer{ aspect-ratio: 16/9; }
}
/* === Testimonios centrado + proporciones (galería 40% más ancha) === */
.testi{ 
  width:min(1280px, 92%);
  margin-inline:auto;            /* centra todo el bloque */
  padding-inline: 0;
}

.t-head{ text-align:center; }    /* título y subtítulo centrados */

/* Relación de columnas: video = 1, galería = 1.4  →  41.666% / 58.333% */
:root{
  --video-col: 41.6667%;
  --galeria-col: 58.3333%;
}

.t-layout{
  display:grid;
  grid-template-columns: minmax(320px, var(--video-col)) minmax(420px, var(--galeria-col));
  gap: clamp(16px, 2.4vw, 28px);
  align-items:start;
  margin-inline:auto;            /* refuerza centrado del grid */
}

/* Video (izquierda) – vertical moderado */
.t-video{ display:grid; place-items:center; }
.t-video video{
  width:100%;
  height:auto;
  aspect-ratio: 9/16;
  border-radius:12px;
  background:#000;
}

/* Visor (derecha) */
.viewer{
  width:100%;
  aspect-ratio: 16/9;
  border-radius:12px;
  overflow:hidden;
  background:#000;
}
.viewer img{ width:100%; height:100%; object-fit:cover; }

/* Miniaturas: mismas dimensiones, un poco más grandes si quieres */
:root{
  /* si quieres aún más grandes, sube estos valores */
  --thumb-h: clamp(110px, 13vw, 140px);
  --thumb-ratio: 16/9;
}
.thumbs{
  margin-top:12px;
  display:grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(var(--thumb-h) * (var(--thumb-ratio)));
  gap:12px;
  overflow:auto;
  -ms-overflow-style:none; scrollbar-width:none;
}
.thumbs::-webkit-scrollbar{ display:none; }
.thumb{
  width: calc(var(--thumb-h) * (var(--thumb-ratio)));
  height: var(--thumb-h);
  border-radius:12px; overflow:hidden; padding:0; border:0; cursor:pointer;
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

/* En pantallas chicas: apila y ocupa 100% */
@media (max-width: 980px){
  .t-layout{ grid-template-columns: 1fr; }
  .viewer{ aspect-ratio: 16/9; }
}

/* —— Estilos compactos —— */
.t-gallery{background:#fff;border-radius:16px;box-shadow:0 10px 24px rgba(0,0,0,.08);padding:12px}
.t-hero{position:relative;aspect-ratio:16/9;overflow:hidden;border-radius:12px}
.t-hero img{width:100%;height:100%;object-fit:cover;display:block;transition:opacity .25s ease}
.t-nav{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;border:0;border-radius:50%;
       background:#fff;box-shadow:0 6px 16px rgba(0,0,0,.15);cursor:pointer;font-size:22px;line-height:40px}
.t-nav.prev{left:10px} .t-nav.next{right:10px}
.t-thumbs{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:10px}
.t-thumbs img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:10px;cursor:pointer;opacity:.85;transition:.2s}
.t-thumbs img:hover{opacity:1;transform:translateY(-1px)}
.t-thumbs img.is-active{outline:3px solid #3E6C3E;outline-offset:2px;opacity:1}
@media (max-width:720px){.t-thumbs{grid-template-columns:repeat(4,1fr)}}

.dunas-gallery img { pointer-events: none; }
  