/*
  Paleta y ajustes generales
*/
:root{
  --bg: #F9F5E8;
  --bg-soft:#FBF7F1;
  --card:#FFFFFF;

  --text:#24211C;
  --muted:#6A6358;
  --line:#A9A297;

  --brand:#B5714D;
  --brand-2:#9C8D6D;
  --accent:#53381D;

  --cta:#CEB34D;

  --radius:18px;
  --shadow: 0 8px 24px rgba(25,35,30,.10);
  --maxw: 1100px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1000px 500px at 90% -10%, #E6D8C6 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #E8EFE9 0%, transparent 65%),
    var(--bg);
  color:var(--text);
}

/* HEADER / MENÚ SUPERIOR */
header{
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(8px);
  background:#573d1a;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.nav{
  max-width:var(--maxw); margin:auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  gap:12px;
}
.logo{
  display:flex; align-items:center;
  font-weight:800; letter-spacing:.3px;
}
.logo-img{
  height:42px;
  width:auto;
  display:block;
  object-fit:contain;
}

.logo-link{
  display:inline-flex;
  align-items:center;
  line-height:0;
  text-decoration:none;
}
.logo-link:focus-visible{
  outline:2px solid #feae41;
  outline-offset:4px;
  border-radius:10px;
}


/* Links del menú */
.nav a{
  color:#fff; text-decoration:none; font-weight:700; font-size:14px;
  padding:8px 10px; border-radius:10px; transition:none;
  font-family:"Open Sans", sans-serif;
}
.nav a:hover{ color:#fff; background:transparent; }

/* MENÚ HAMBURGUESA (solo mobile) */
.hamburger{
  display:none;
  width:42px;
  height:36px;
  background:transparent;
  border:0;
  padding:6px;
  cursor:pointer;

  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:6px;
}
.hamburger span{
  display:block;
  width:26px;
  height:3px;
  background:#fff;
  border-radius:999px;
  box-shadow:0 1px 0 rgba(0,0,0,.25);
  transition:transform .25s ease, opacity .25s ease;
}

/* Menú principal (desktop) */
.menu{
  display:flex;
  gap:6px;
  align-items:center;
}

/* Botón CTA del menú */
.nav-cta{
  background:#feae41;
  color:#24211C;
  padding:8px 14px;
  border-radius:999px;
  font-weight:800;
  font-size:13px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  box-shadow:0 6px 14px rgba(254,174,65,.35);
  border:0;
  white-space:nowrap;
}
.nav-cta:hover{ background:#feae41; color:#24211C; transform:none; }

/* LAYOUT GENERAL */
.wrap{ max-width:var(--maxw); margin:auto; padding:0 18px; }
section{ padding:56px 0; }
.section-head{
  display:flex; align-items:end; justify-content:space-between;
  gap:12px; margin-bottom:18px;
}
h2{
  margin:0; font-size:28px; letter-spacing:.2px;
  font-family:"Quicksand", sans-serif;
  font-weight:700;
  color:var(--accent);
}
p.lead{
  margin:6px 0 0; color:var(--muted);
  max-width:720px; font-size:16px;
}

/* HERO FULL WIDTH con degradado */
.hero{
  padding:52px 0 26px;
  background:
    linear-gradient(
      to bottom,
      #d7e2fd 0%,
      #d7e2fd 20%,
      transparent 100%
    );
}

.hero-grid{
  display:grid;
  grid-template-columns:1fr 1fr; /* 50% / 50% */
  gap:18px;
  align-items:center;
}
.hero-card{
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.7)),
              var(--bg-soft);
  border:1px solid rgba(36,33,28,.10);
  border-radius:calc(var(--radius) + 6px);
  box-shadow:var(--shadow);
  padding:24px;
  min-height:320px;
  display:grid; grid-template-rows:auto auto 1fr auto; gap:12px;
}
.hero-eyebrow{
  color:var(--brand); font-weight:800;
  letter-spacing:.6px; font-size:12px; text-transform:uppercase;
  font-family:"Open Sans", sans-serif;
}
h1{
  margin:0; font-size:38px; line-height:1.08;
  font-family:"Quicksand", sans-serif;
  font-weight:700;
  color:var(--accent);
}

/* VIDEO HERO (YouTube como fondo con overlay) */
.hero-video{
  border-radius:calc(var(--radius) + 6px);
  overflow:hidden;
  box-shadow:var(--shadow);
  border:1px solid rgba(36,33,28,.10);
  background:#000;
}
.video-wrapper{
  position:relative;
  width:100%;
  padding-top:56.25%; /* 16:9 */
}
.video-wrapper iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  object-fit:cover;
}
.video-overlay{
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(
    135deg,
    rgba(0,0,0,.45),
    rgba(0,0,0,.20)
  );
}

/* GRID BASE (luego se sobreescribe en carrusel) */
.grid{
  display:grid; gap:14px;
  grid-template-columns:repeat(3, minmax(0,1fr));
}
@media (max-width:900px){
  .hero-grid{ grid-template-columns:1fr; }
  .grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width:768px){
  .grid{ grid-template-columns:1fr; }
}

/* TARJETAS (sin sombra) */
.card{
  opacity:1;
  transform:none;

  background:var(--card);
  border:1px solid rgba(36,33,28,.12);
  border-radius:var(--radius);
  overflow:hidden;
  display:grid;
  grid-template-rows:170px auto;

  transition: transform .2s ease, border-color .2s ease;
  will-change: transform;
}
.card:hover{
  transform:translateY(-3px);
  border-color:rgba(181,113,77,.55);
}
.card img{
  width:100%; height:170px; object-fit:cover; display:block;
  filter:saturate(1.02) contrast(1.02);
}
.card-body{ padding:14px 15px; display:grid; gap:6px; }

/* Tag */
.tag{
  font-size:11px;
  font-weight:800;
  color:#fff;
  background:var(--brand-2);
  padding:4px 8px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  letter-spacing:.2px;
  line-height:1.1;
  font-family:"Open Sans", sans-serif;
  align-self:flex-start;
}

.card h3{
  margin:0; font-size:17px;
  font-family:"Quicksand", sans-serif;
  font-weight:700;
  color:var(--accent);
}
.card p{
  margin:0; color:var(--muted);
  font-size:14px; line-height:1.55;
}

/* Distancia */
.distance{
  margin-top:10px;
  padding-top:8px;
  border-top:1px solid rgba(83,56,29,.12);

  font-size:12px;
  font-weight:700;
  color:var(--accent);
  opacity:.75;

  display:flex;
  align-items:flex-start;
  gap:6px;
}
.distance::before{
  content:"";
  width:14px; height:14px;
  flex:0 0 14px;
  margin-top:1px;
  background-color:currentColor;

  -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22black%22%3E%3Cpath%20d%3D%22M12%202C8.134%202%205%205.134%205%209c0%205.25%207%2013%207%2013s7-7.75%207-13c0-3.866-3.134-7-7-7zm0%209.5A2.5%202.5%200%201%201%2012%206a2.5%202.5%200%200%201%200%205.5z%22/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22black%22%3E%3Cpath%20d%3D%22M12%202C8.134%202%205%205.134%205%209c0%205.25%207%2013%207%2013s7-7.75%207-13c0-3.866-3.134-7-7-7zm0%209.5A2.5%202.5%200%201%201%2012%206a2.5%202.5%200%200%201%200%205.5z%22/%3E%3C/svg%3E");
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-size:contain;
  mask-size:contain;
  -webkit-mask-position:center;
  mask-position:center;
}

/* FOOTER */
footer{
  padding:28px 0 60px;
  color:#fff;
  font-size:14px;
  border-top:1px solid rgba(36,33,28,.10);
  background:#232323;
}
.foot{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
  text-align:center;
}
.foot-main{
  font-size: clamp(10px, 2.6vw, 12px);
  line-height:1.3;
}

.footer-source{
  flex:0 0 100%;
  width:100%;
  text-align:center;
  margin-top:14px;
  padding:10px 12px;
  background:#573d1a;
  color:#fff;
  border-radius:8px;
  font-size: clamp(10px, 2.6vw, 12px);
  line-height: 1.4;
  font-family:"Open Sans", sans-serif;
  overflow-wrap:anywhere;
}
.footer-source a{
  color:#fff;
  text-decoration: underline;
  text-underline-offset:2px;
  font-weight:700;
}
.footer-source a:hover{ opacity:.9; }

/* MOBILE: menú hamburguesa desplegable */
@media (max-width:560px){
  h1{ font-size:32px; }
  h2{ font-size:24px; }

  .nav{
    position:relative;
    flex-direction:row;
    justify-content:space-between;
    align-items:center;
    gap:8px;
    padding:12px 14px;
  }
  .logo{
    flex:1;
    display:flex;
    justify-content:center;
  }
  .logo-img{
    margin:0 auto;
    height:28px;
  }

  .hamburger{ display:flex; }

  header nav.menu{
    position:absolute;
    top:100%;
    left:0;
    right:0;

    display:flex;
    flex-direction:column;
    align-items:stretch;

    background:#573d1a;
    border-top:1px solid rgba(255,255,255,.12);
    box-shadow:0 10px 24px rgba(0,0,0,.18);
    padding:6px 0;

    max-height:0;
    opacity:0;
    transform: translateY(-6px);
    overflow:hidden;
    pointer-events:none;

    transition:
      max-height .45s ease,
      opacity .35s ease,
      transform .35s ease;
  }

  header nav.menu.open{
    max-height:420px;
    opacity:1;
    transform: translateY(0);
    pointer-events:auto;
  }

  header nav.menu a{
    width:100%;
    text-align:left;
    padding:12px 18px;
    font-size:15px;
    border-radius:0;
    border-bottom:1px solid rgba(255,255,255,.10);
  }
  header nav.menu a:last-of-type{
    border-bottom:none;
  }

  header nav.menu .nav-cta{
    margin:12px 18px 6px;
    width:calc(100% - 36px);
    max-width:none;
    justify-content:center;
  }
}

/* ============================
   CARRUSEL DE TARJETAS
   ============================ */

.carousel{
  position:relative;
  overflow:hidden;
}

.carousel-track{
  display:flex;
  gap:14px;
  transition:transform .45s ease;
  will-change:transform;
}

/* 3 tarjetas por vista en desktop */
.carousel-track .card{
  flex:0 0 calc(33.333% - 10px);
}

/* 2 tarjetas por vista en tablets */
@media (max-width:900px){
  .carousel-track .card{
    flex:0 0 calc(50% - 10px);
  }
}

/* 1 tarjeta por vista en mobile */
@media (max-width:600px){
  .carousel-track .card{
    flex:0 0 100%;
  }
}

/* Botones del carrusel */
.carousel-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  border:0;
  background:rgba(87,61,26,.96);
  color:#fff;
  width:32px;
  height:32px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,0,0,.35);
  font-size:20px;
  line-height:1;
  z-index:3;
}
.carousel-btn.prev{ left:6px; }
.carousel-btn.next{ right:6px; }

.carousel-btn:hover{
  background:#feae41;
  color:#24211C;
}

@media (max-width:768px){
  .carousel-btn{
    width:28px;
    height:28px;
    font-size:18px;
  }
}

/* ============================
   TIPOGRAFÍA RESPONSIVE (PATCH)
   ============================ */

/* Base fluida */
body{
  font-size: clamp(14px, 1.2vw + 10px, 16px);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

/* Titulares fluidos */
h1{
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.12;
  text-wrap: balance;
}

h2{
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.2;
  text-wrap: balance;
}

/* Bajada / lead */
p.lead{
  font-size: clamp(14px, 1.2vw + 10px, 16px);
  line-height: 1.6;
}

/* Menú */
.nav a{
  font-size: clamp(13px, 1.1vw + 9px, 14px);
}

/* Textos de tarjeta */
.card h3{
  font-size: clamp(16px, 1.4vw + 10px, 17px);
  line-height: 1.25;
}

.card p{
  font-size: clamp(13px, 1.1vw + 9px, 14px);
  line-height: 1.6;
}

/* Distancia (suele quedar chico en mobile) */
.distance{
  font-size: clamp(12px, 1vw + 9px, 13px);
  line-height: 1.45;
}

/* Footer fluido (acompaña) */
.foot-main{
  font-size: clamp(10px, 2.2vw, 12px);
}

.footer-source{
  font-size: clamp(10px, 2.2vw, 12px);
  line-height: 1.45;
}

/* Evita desbordes por palabras largas/URLs */
.card p, .distance, .footer-source{
  overflow-wrap: anywhere;
}

/* FIX definitivo: color + peso de "Distancia..." */
.card p.distance{
  color:#573d1a !important;     /* marrón */
  font-weight:400 !important;   /* regular */
  opacity:1 !important;
  border-top-color: rgba(87,61,26,.18) !important;
  font-size: 13px;
}