/* ============================================================
   PENSIÓN AMIGA — LAYOUT
   Contenedor, grid, navegación, footer
   ============================================================ */

/* ─── CONTENEDOR ─────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--espacio-md);
}

.container-sm {
  max-width: var(--max-width-sm);
  margin: 0 auto;
  padding: 0 var(--espacio-md);
}

/* ─── GRIDS ──────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--espacio-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--espacio-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--espacio-md);
}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

.grid-responsive-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid-responsive-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-responsive-2, .grid-responsive-3 { grid-template-columns: 1fr; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .grid-responsive-3 { grid-template-columns: 1fr; }
  .grid-responsive-2 { grid-template-columns: 1fr; }
}

/* ─── MOBILE FIXES ────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Hero padding */
  .hero { min-height: 85vh !important; }
  .hero > div { padding: 40px 20px !important; min-height: 85vh !important; }

  /* Testimonial cards: stack photo + text */
  .grid-responsive-2 .card {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    padding: 24px 16px !important;
    overflow: hidden;
  }
  .grid-responsive-2 .card img {
    width: 80px !important;
    height: 80px !important;
    margin-bottom: 12px;
  }
  .grid-responsive-2 .card > div {
    width: 100% !important;
    align-items: center;
  }
  .grid-responsive-2 .card > div > div {
    justify-content: center !important;
  }
  .grid-responsive-2 .card .dato-impacto {
    font-size: 1.5rem !important;
  }

  /* Steps cards smaller padding */
  .grid-responsive-3 .card {
    padding: 28px 20px !important;
  }
  .grid-responsive-3 .card div[style*="font-size: 5rem"] {
    font-size: 3.5rem !important;
  }

  /* Inline grids de 2 columnas → 1 columna en mobile */
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Botones: permitir wrap en mobile */
  .btn-primary, .btn-secondary, .btn-ghost, .nav-cta {
    white-space: normal !important;
    text-align: center;
  }

  /* Cards de datos centradas en mobile */
  .card-dato, .card-dato .dato-impacto, .card-dato p,
  .grid-responsive-3 .card, .grid-responsive-3 .dato-impacto, .grid-responsive-3 p,
  .grid-responsive-3 div[style*="color: #d94444"] {
    text-align: center !important;
  }

  /* Footer grid */
  .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
}

/* ─── SECCIONES ──────────────────────────────────────────── */
.seccion {
  padding: var(--espacio-xl) 0;
}

.seccion-lg {
  padding: var(--espacio-2xl) 0;
}

.seccion-sm {
  padding: var(--espacio-lg) 0;
}

/* ─── NAVEGACIÓN ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 var(--espacio-md);
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(15, 25, 35, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--trans-med), box-shadow var(--trans-med);
}

.nav.scrolled {
  background: rgba(15, 25, 35, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--espacio-md);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

/* Fallback si no hay imagen de logo */
.nav-logo-texto {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blanco);
  text-decoration: none;
}
.nav-logo-texto span { color: var(--verde-lima); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--espacio-sm);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radio-sm);
  transition: color var(--trans-fast), background var(--trans-fast);
  text-align: center;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--blanco);
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a.activo {
  color: var(--verde-lima);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--grad-pa);
  color: var(--blanco);
  padding: 10px 22px;
  border-radius: var(--radio-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast);
  box-shadow: 0 4px 16px rgba(93, 193, 48, 0.25);
  white-space: nowrap;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(93, 193, 48, 0.35);
}
.nav-cta-mobile { display: none; }

/* Menú hamburguesa (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blanco);
  border-radius: 2px;
  transition: all var(--trans-med);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta-desktop { display: none; }

  .nav-links.abierto {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(15, 25, 35, 0.98);
    backdrop-filter: blur(16px);
    padding: var(--espacio-md);
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-links.abierto a {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .nav-links.abierto .nav-cta-mobile {
    display: inline-flex;
    margin-top: var(--espacio-sm);
    width: 100%;
    justify-content: center;
  }
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer {
  background: var(--negro);
  padding: var(--espacio-xl) 0 var(--espacio-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--espacio-lg);
  margin-bottom: var(--espacio-lg);
}

.footer-logo-texto {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--blanco);
  margin-bottom: var(--espacio-sm);
}
.footer-logo-texto span { color: var(--verde-lima); }

.footer-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
  max-width: 320px;
}

.footer-col-titulo {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde-lima);
  margin-bottom: var(--espacio-sm);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color var(--trans-fast);
}
.footer-links a:hover { color: var(--blanco); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--espacio-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--espacio-md);
  flex-wrap: wrap;
}

.footer-legal {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.50);
  text-decoration: none;
}
.footer-legal a:hover { color: var(--verde-lima); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}