/* ============================================================
   VILANLEX — global.css
   Variables, base reset, nav, footer, animations, responsive
   ============================================================ */

/* ── VARIABLES ────────────────────────────────────────────── */
:root {
  --navy: #0d1b2a;
  --navy-mid: #162435;
  --gold: #c9a96e;
  --gold-light: #e0c99a;
  --gold-pale: #f5eddf;
  --cream: #faf8f4;
  --stone: #8a8070;
  --text: #1c1c1c;
  --text-muted: #6b6560;
  --grad: linear-gradient(135deg,#0a1628 0%,#0d1b2a 40%,#0f2240 70%,#091525 100%);
}

/* ── BASE RESET ───────────────────────────────────────────── */
*,*::before,*::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  overflow-x: hidden;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
}

/* ── NAV ──────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 60px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  transition: background 0.4s, padding 0.4s;
}
nav.scrolled {
  background: rgba(13,27,42,0.97);
  backdrop-filter: blur(12px);
  padding: 14px 60px;
}
.nav-logo { display: flex; justify-content: center; align-items: center; }
.nav-logo img { height: 56px; width: auto; display: block; }
.nav-links { display: flex; gap: 36px; list-style: none; justify-content: flex-start; }
.nav-links a {
  font-size: 11px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,0.75);
  text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 16px; justify-self: flex-end; }
.nav-phone {
  font-size: 11px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,0.75);
  text-decoration: none; transition: color 0.2s;
}
.nav-phone:hover { color: var(--gold); }
.nav-cta {
  font-size: 11px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; color: var(--navy);
  background: var(--gold); padding: 10px 22px;
  text-decoration: none; transition: background 0.2s;
}
.nav-cta:hover { background: var(--gold-light); }
.nav-cta-privada {
  font-size: 11px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; color: rgba(255,255,255,0.55);
  background: transparent; border: 0.5px solid rgba(255,255,255,0.25);
  padding: 10px 22px; text-decoration: none; transition: all 0.2s;
}
.nav-cta-privada:hover { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.5); }

/* ── HAMBURGER ────────────────────────────────────────────── */
/* IMPORTANTE: el botón vive FUERA del <nav> en el HTML.
   Al estar fuera del stacking context del nav, el z-index funciona
   sobre toda la página, no atrapado dentro del header. */
.hamburger {
  display: none;
  position: fixed;
  top: 18px; right: 16px;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px;
  z-index: 1000;                    /* por encima del nav (100) y del WhatsApp (200) */
  background: none; border: none; outline: none;
  -webkit-appearance: none; appearance: none;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: #fff; transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── MOBILE MENU ──────────────────────────────────────────── */
/* También fuera del <nav>. visibility (en lugar de solo opacity+pointer-events)
   asegura que cuando está cerrado realmente no captura clicks. */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(13,27,42,0.98);
  z-index: 999;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px,6vw,48px); font-weight: 300;
  color: rgba(255,255,255,0.75); text-decoration: none;
  padding: 16px 40px; letter-spacing: 2px; transition: color 0.2s;
  border-bottom: 0.5px solid rgba(255,255,255,0.05);
  width: 100%; text-align: center;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu-phone {
  font-size: 14px !important; font-family: 'DM Sans',sans-serif !important;
  font-weight: 400 !important; letter-spacing: 3px !important;
  color: var(--gold) !important; margin-top: 20px;
}
.mobile-menu-cta {
  color: var(--gold) !important;
  border: 1px solid rgba(201,169,110,0.4) !important;
  padding: 14px 32px !important;
  margin-top: 8px !important;
}
.mobile-menu-close {
  /* Ocultado: la hamburguesa de la esquina ya se transforma en X y cierra el menú.
     Mantenemos el elemento en el DOM porque el JS lo usa como handler de cierre. */
  display: none !important;
}

/* ── FOOTER (simple - legal pages) ───────────────────────── */
footer {
  background: linear-gradient(135deg,#0a1628 0%,#0d1b2a 40%,#0f2240 70%,#091525 100%);
  padding: 40px 60px; display: flex;
  justify-content: space-between; align-items: center;
  border-top: 3px solid rgba(201,169,110,0.6);
}
.footer-copy { font-size: 11px; color: rgba(255,255,255,0.25); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 11px; color: rgba(255,255,255,0.3); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-logo img { height: 40px; width: auto; opacity: 0.8; }

/* ── FOOTER (rich - blog/service pages) ──────────────────── */
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 60px; margin-bottom: 48px; }
.footer-brand { font-family: 'Cormorant Garamond',serif; font-size: 22px; color: var(--gold); letter-spacing: 4px; margin-bottom: 16px; }
.footer-tagline { font-size: 12px; color: rgba(255,255,255,0.25); line-height: 1.7; max-width: 240px; }
.footer-col-title { font-size: 9px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 20px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; border-top: 0.5px solid rgba(255,255,255,0.06); padding-top: 24px; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { font-size: 11px; color: rgba(255,255,255,0.2); text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: var(--gold); }

/* ── WHATSAPP BTN ─────────────────────────────────────────── */
.whatsapp-btn {
  position: fixed; bottom: 28px; right: 28px; z-index: 200;
  background: #25d366; color: #fff; width: 58px; height: 58px;
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  text-decoration: none; transition: transform 0.2s;
}
.whatsapp-btn:hover { transform: scale(1.08); }
.whatsapp-btn svg { width: 28px; height: 28px; fill: #fff; }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateY(-50%) translateX(80px); }
  to   { opacity: 0.14; transform: translateY(-50%) translateX(0); }
}
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── SECTION COMMON ───────────────────────────────────────── */
.section-label {
  font-size: 10px; font-weight: 500; letter-spacing: 4px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.section-title {
  font-family: 'Cormorant Garamond',serif;
  font-size: clamp(30px,3.8vw,52px); font-weight: 400; line-height: 1.1; color: var(--navy);
}
.section-title em { font-style: italic; color: #0d1b2a; }
.section-title.white { color: #0d1b2a; }
.section-title.white em { color: #0d1b2a); }
.section-desc { font-size: 14px; font-weight: 300; color: var(--text-muted); line-height: 1.8; max-width: 640px; margin-top: 14px; }
.section-desc.light { color: rgba(255,255,255,0.45); }
.section-header { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 72px; align-items: end; }

/* ── HERO COMMON ──────────────────────────────────────────── */
.hero {
  min-height: 75vh;
  background: linear-gradient(135deg,#0a1628 0%,#0d1b2a 40%,#0f2240 70%,#091525 100%);
  display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.13; filter: grayscale(20%); }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg,var(--navy) 45%,rgba(13,27,42,0.6) 100%);
}
.grid-lines { position: absolute; inset: 0; pointer-events: none; }
.grid-line { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.03); }
.grid-line:nth-child(1) { left: 20%; }
.grid-line:nth-child(2) { left: 40%; }
.grid-line:nth-child(3) { left: 60%; }
.grid-line:nth-child(4) { left: 80%; }
.hero-content { position: relative; z-index: 2; padding: 140px 60px 80px; max-width: 900px; }
.hero-title {
  font-family: 'Cormorant Garamond',serif;
  font-size: clamp(44px,6vw,82px); font-weight: 300; line-height: 1.05;
  color: #fff; opacity: 0; animation: slideUp 0.8s 0.4s forwards;
}
.hero-title em { font-style: italic; color: var(--gold-light); }
.hero-sub {
  font-size: 15px; font-weight: 300; color: rgba(255,255,255,0.55);
  line-height: 1.75; max-width: 600px; margin: 24px 0 44px;
  opacity: 0; animation: slideUp 0.8s 0.6s forwards;
}
.hero-badges { display: flex; gap: 12px; flex-wrap: wrap; opacity: 0; animation: slideUp 0.8s 0.8s forwards; }
.badge {
  font-size: 10px; font-weight: 500; letter-spacing: 2px;
  text-transform: uppercase; padding: 8px 16px;
  border: 0.5px solid rgba(201,169,110,0.4); color: var(--gold-light);
}
.breadcrumb {
  font-size: 10px; font-weight: 500; letter-spacing: 4px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 24px;
  opacity: 0; animation: slideUp 0.8s 0.2s forwards;
}
.breadcrumb a { color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); margin: 0 8px; }

/* ── HERO BG LINES ────────────────────────────────────────── */
.hero-bg-lines { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hero-bg-lines::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg,transparent,rgba(201,169,110,0.4),transparent);
}

/* ── RESPONSIVE GLOBAL ────────────────────────────────────── */
@media (max-width: 900px) {
  nav {
    padding: 18px 16px !important;
    background: rgba(13,27,42,0.97) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 72px !important;
  }
  nav.scrolled {
    padding: 12px 16px !important;
    min-height: 60px !important;
  }
  .nav-logo { position: static !important; transform: none !important; display: flex !important; align-items: center !important; justify-content: center !important; margin: 0 auto !important; }
  .nav-logo img { height: 36px !important; width: auto !important; display: block !important; }
  .nav-links { display: none !important; }
  .nav-right { display: none !important; }
  /* hamburger queda position:fixed por su regla base (fuera del nav), encima del header */
  .hamburger { display: flex !important; top: 22px !important; }
  nav.scrolled ~ .hamburger,
  nav.scrolled + .hamburger { top: 16px !important; }

  footer { flex-direction: column; gap: 16px; text-align: center; padding: 32px 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .whatsapp-btn { bottom: 16px; right: 16px; width: 52px; height: 52px; }
  .whatsapp-btn svg { width: 24px; height: 24px; }

  .hero-content { padding: 120px 24px 60px; }
}

@media (max-width: 768px) {
  nav { padding: 16px 24px; }
  nav.scrolled { padding: 12px 24px; }
  .nav-links, .nav-right { display: none; }
}
.section-title.white {
  color: #0d1b2a;
}

.section-title.white em {
  color: var(--gold-light);
}
/* COLOR TITULO */
.section-title.white {
  color: #0d1b2a !important;
}

/* ════════════════════════════════════════════════════════════
   FOOTER RICH (3 columnas: marca + contacto + boletín)
   Aplicado a todas las páginas del sitio
   ═══════════════════════════════════════════════════════════ */

footer.footer-rich {
  background: linear-gradient(135deg,#0a1628 0%,#0d1b2a 40%,#0f2240 70%,#091525 100%);
  border-top: 3px solid rgba(201,169,110,0.6);
  padding: 56px 60px 28px;
  color: rgba(255,255,255,0.7);
  font-family: 'DM Sans', sans-serif;
}
.footer-rich .footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-rich .footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr;
  gap: 60px;
  margin-bottom: 44px;
}

/* Columna izquierda: marca + tagline */
.footer-rich .footer-brand-block { display: flex; flex-direction: column; }
.footer-rich .footer-brand-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  letter-spacing: 6px;
  color: var(--gold, #c9a96e);
  text-decoration: none;
  margin-bottom: 14px;
  display: inline-block;
}
.footer-rich .footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin: 0;
  max-width: 280px;
}

/* Columnas centro y derecha: títulos */
.footer-rich .footer-col-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold, #c9a96e);
  margin-bottom: 18px;
}

/* Columna centro: contacto */
.footer-rich .footer-contact { font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.9; }
.footer-rich .footer-contact a { color: rgba(255,255,255,0.6); text-decoration: none; transition: color 0.2s; }
.footer-rich .footer-contact a:hover { color: var(--gold, #c9a96e); }
.footer-rich .footer-contact .footer-contact-phone { margin-top: 8px; }

/* Columna derecha: boletín */
.footer-rich .footer-newsletter-text {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin: 0 0 14px;
}
.footer-rich .footer-newsletter-form { display: flex; gap: 6px; max-width: 340px; }
.footer-rich .footer-newsletter-form input[type="email"] {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,169,110,0.3);
  color: #fff;
  padding: 10px 12px;
  font-size: 12px;
  border-radius: 2px;
  font-family: inherit;
}
.footer-rich .footer-newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,0.3); }
.footer-rich .footer-newsletter-form input[type="email"]:focus { outline: none; border-color: rgba(201,169,110,0.6); }
.footer-rich .footer-newsletter-form button {
  background: var(--gold, #c9a96e);
  color: #0a1628;
  border: none;
  padding: 10px 18px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
  font-family: inherit;
}
.footer-rich .footer-newsletter-form button:hover { background: #d4b87f; }

/* Línea inferior: copyright + enlaces legales */
.footer-rich .footer-bottom {
  border-top: 1px solid rgba(201,169,110,0.15);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-rich .footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.5px;
}
.footer-rich .footer-legal { display: flex; gap: 28px; }
.footer-rich .footer-legal a {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-rich .footer-legal a:hover { color: var(--gold, #c9a96e); }

/* Móvil: apilar y centrar */
@media (max-width: 900px) {
  footer.footer-rich { padding: 48px 24px 24px; }
  .footer-rich .footer-top {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }
  .footer-rich .footer-brand-block { align-items: center; }
  .footer-rich .footer-tagline { max-width: none; }
  .footer-rich .footer-newsletter-form { margin: 0 auto; }
  .footer-rich .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
  .footer-rich .footer-legal { flex-wrap: wrap; justify-content: center; gap: 20px; }
}
