/* ============================================================
   nav.css — Header y Footer globales · Refugio Estratégico
   Importar con: <link rel="stylesheet" href="/nav.css">
   ============================================================ */

/* ── VARIABLES ── */
:root{
  --re-verde:#3a7a30;
  --re-verde-oscuro:#1a2e1a;
  --re-verde-bright:#4a8c42;
  --re-crema:#fafbf8;
  --re-borde:#e0eae0;
  --re-texto:#2d3a2d;
  --re-texto-suave:#4a5a4a;
  --re-texto-muy-suave:#6a7a6a;
}

/* ── RESET DEL NAV ANTERIOR ─────────────────────────────── */
/* Asegura que la nueva nav sobreescriba cualquier nav inline */
.main-nav,
.main-nav *{
  box-sizing:border-box;
}

/* ── MAIN NAV ─────────────────────────────────────────────── */
.main-nav{
  background:rgba(255,255,255,0.98);
  border-bottom:1px solid var(--re-borde);
  padding:0 5%;
  height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  position:sticky;
  top:0;
  z-index:200;
  box-shadow:0 1px 8px rgba(0,0,0,0.06);
  font-family:'Open Sans',sans-serif;
}

/* Logo */
.main-nav .nav-logo{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  flex-shrink:0;
}
.main-nav .nav-logo-icon{
  width:26px;
  height:26px;
  background:var(--re-verde);
  clip-path:polygon(50% 0%,0% 100%,100% 100%);
  flex-shrink:0;
}
.main-nav .nav-logo-wrap{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.main-nav .nav-logo-text{
  font-family:'Montserrat',sans-serif;
  font-size:0.9rem;
  font-weight:800;
  color:var(--re-verde-oscuro);
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.main-nav .nav-logo-sub{
  font-size:0.58rem;
  color:var(--re-texto-muy-suave);
  letter-spacing:0.2px;
}

/* Nav links */
.main-nav .nav-links{
  display:flex;
  align-items:center;
  gap:4px;
  flex:1;
  justify-content:center;
}
.main-nav .nav-link{
  font-family:'Montserrat',sans-serif;
  font-size:0.7rem;
  font-weight:700;
  letter-spacing:0.3px;
  text-transform:uppercase;
  color:var(--re-texto-suave);
  text-decoration:none;
  padding:6px 10px;
  border-radius:4px;
  transition:color 0.15s,background 0.15s;
  white-space:nowrap;
}
.main-nav .nav-link:hover{
  color:var(--re-verde);
  background:#f0f7ef;
  text-decoration:none;
}
.main-nav .nav-link.active{
  color:var(--re-verde);
}

/* CTA button */
.main-nav .nav-cta-btn{
  font-family:'Montserrat',sans-serif;
  font-size:0.68rem;
  font-weight:700;
  letter-spacing:0.3px;
  text-transform:uppercase;
  color:#fff;
  background:var(--re-verde);
  padding:9px 16px;
  border-radius:4px;
  text-decoration:none;
  white-space:nowrap;
  flex-shrink:0;
  transition:background 0.2s;
}
.main-nav .nav-cta-btn:hover{
  background:var(--re-verde-bright);
  text-decoration:none;
}

/* Hamburger */
.main-nav .nav-hamburger{
  display:none;
  flex-direction:column;
  justify-content:center;
  gap:5px;
  width:40px;
  height:40px;
  background:none;
  border:none;
  cursor:pointer;
  padding:6px;
  border-radius:4px;
  flex-shrink:0;
}
.main-nav .nav-hamburger span{
  display:block;
  width:22px;
  height:2px;
  background:var(--re-verde-oscuro);
  border-radius:2px;
  transition:all 0.25s;
}
.main-nav .nav-hamburger:focus{
  outline:2px solid var(--re-verde);
  outline-offset:2px;
}

/* ── MOBILE MENU ─────────────────────────────────────────── */
.mobile-menu{
  position:fixed;
  top:0;
  right:-100%;
  width:min(320px,90vw);
  height:100vh;
  background:#fff;
  z-index:300;
  display:flex;
  flex-direction:column;
  box-shadow:-4px 0 24px rgba(0,0,0,0.12);
  transition:right 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y:auto;
}
.mobile-menu.open{
  right:0;
}
.mobile-menu-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 24px;
  border-bottom:1px solid var(--re-borde);
  flex-shrink:0;
}
.mobile-menu-header span{
  font-family:'Montserrat',sans-serif;
  font-size:0.85rem;
  font-weight:800;
  color:var(--re-verde-oscuro);
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.mobile-close-btn{
  background:none;
  border:none;
  cursor:pointer;
  font-size:1.2rem;
  color:var(--re-texto-suave);
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:4px;
  transition:background 0.15s;
}
.mobile-close-btn:hover{
  background:#f0f4f0;
}
.mobile-close-btn:focus{
  outline:2px solid var(--re-verde);
}
.mobile-links{
  display:flex;
  flex-direction:column;
  padding:16px 0;
  flex:1;
}
.mobile-link{
  font-family:'Montserrat',sans-serif;
  font-size:0.88rem;
  font-weight:700;
  color:var(--re-texto);
  text-decoration:none;
  padding:14px 24px;
  border-bottom:1px solid #f0f4f0;
  transition:background 0.15s,color 0.15s;
  text-transform:uppercase;
  letter-spacing:0.3px;
}
.mobile-link:hover{
  background:var(--re-crema);
  color:var(--re-verde);
  text-decoration:none;
}
.mobile-cta-wrap{
  padding:20px 24px;
  flex-shrink:0;
}
.mobile-cta{
  display:block;
  text-align:center;
  background:var(--re-verde);
  color:#fff;
  font-family:'Montserrat',sans-serif;
  font-size:0.8rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.5px;
  padding:14px 20px;
  border-radius:5px;
  text-decoration:none;
  transition:background 0.2s;
  margin:20px 24px;
  flex-shrink:0;
}
.mobile-cta:hover{
  background:var(--re-verde-bright);
  text-decoration:none;
}

/* Overlay */
.mobile-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  z-index:250;
  opacity:0;
  pointer-events:none;
  transition:opacity 0.3s;
}
.mobile-overlay.open{
  opacity:1;
  pointer-events:all;
}

/* ── MAIN FOOTER ─────────────────────────────────────────── */
.main-footer{
  background:var(--re-verde-oscuro);
  color:#a0b8a0;
  font-family:'Open Sans',sans-serif;
  margin-top:0;
}
.footer-main{
  max-width:1200px;
  margin:0 auto;
  padding:56px 5% 40px;
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr 1fr;
  gap:40px;
}
.footer-col-title{
  font-family:'Montserrat',sans-serif;
  font-size:0.65rem;
  font-weight:800;
  letter-spacing:2px;
  text-transform:uppercase;
  color:#fff;
  margin-bottom:16px;
}
.footer-col ul{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.footer-col ul a{
  color:#8aaa8a;
  text-decoration:none;
  font-size:0.84rem;
  line-height:1.5;
  transition:color 0.15s;
}
.footer-col ul a:hover{
  color:#6abf5e;
  text-decoration:none;
}

/* Brand column */
.footer-brand .footer-logo-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}
.footer-brand .footer-logo-icon{
  width:24px;
  height:24px;
  background:var(--re-verde);
  clip-path:polygon(50% 0%,0% 100%,100% 100%);
  flex-shrink:0;
}
.footer-brand .footer-logo-text{
  font-family:'Montserrat',sans-serif;
  font-size:0.88rem;
  font-weight:800;
  color:#fff;
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.footer-brand .footer-slogan{
  font-size:0.78rem;
  color:#6abf5e;
  font-family:'Montserrat',sans-serif;
  font-weight:600;
  letter-spacing:0.5px;
  margin-bottom:12px;
}
.footer-brand .footer-desc{
  font-size:0.82rem;
  color:#7a9a7a;
  line-height:1.7;
  margin-bottom:12px;
  max-width:280px;
}
.footer-brand .footer-legal-note{
  font-size:0.74rem;
  color:#5a7a5a;
  line-height:1.6;
  max-width:280px;
  font-style:italic;
}

/* Footer bottom bar */
.footer-bottom{
  border-top:1px solid #2a4a2a;
  padding:20px 5%;
  text-align:center;
  font-size:0.78rem;
  color:#5a7a5a;
  line-height:1.7;
}
.footer-bottom p{
  margin:2px 0;
}
.footer-bottom-note{
  font-size:0.72rem;
  color:#4a6a4a;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media(max-width:1024px){
  .main-nav .nav-link{
    font-size:0.65rem;
    padding:6px 7px;
  }
  .footer-main{
    grid-template-columns:1fr 1fr 1fr;
    gap:32px;
  }
  .footer-brand{
    grid-column:1/-1;
  }
  .footer-brand .footer-desc,
  .footer-brand .footer-legal-note{
    max-width:100%;
  }
}

@media(max-width:860px){
  .main-nav .nav-links{
    display:none;
  }
  .main-nav .nav-cta-btn{
    display:none;
  }
  .main-nav .nav-hamburger{
    display:flex;
  }
  .footer-main{
    grid-template-columns:1fr 1fr;
    gap:28px;
  }
}

@media(max-width:560px){
  .footer-main{
    grid-template-columns:1fr;
    gap:24px;
    padding:40px 5% 32px;
  }
}
