/* ============================================================
   componentes.css — Espiral Dulce
   Componentes reutilizables y el chrome compartido por las 3
   páginas (lo que renderiza base.njk y sus partials).
   Estructura:
     1. Botones
     2. Header / Nav
     3. Footer
     4. WhatsApp flotante (solo mobile)
============================================================ */


/* ============================================================
   1. BOTONES
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition);
  min-height: 48px;
}

.btn-lg { padding: 1.1rem 2.6rem; font-size: 1rem; }

/* Primary — Ámbar */
.btn-primary {
  background: var(--amber);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(200, 121, 65, 0.35);
}
.btn-primary:hover {
  background: var(--cocoa);
  box-shadow: 0 6px 28px rgba(200, 121, 65, 0.5);
  transform: translateY(-2px);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--amber);
  border: 2px solid var(--amber);
}
.btn-outline:hover {
  background: var(--amber);
  color: var(--white);
  transform: translateY(-2px);
}

/* Blanco */
.btn-white {
  background: var(--white);
  color: var(--amber);
  box-shadow: var(--shadow);
}
.btn-white:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Ghost sobre fondo oscuro (CTA secundario) */
.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--white);
  transform: translateY(-2px);
}


/* ============================================================
   2. HEADER / NAV
============================================================ */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  transition: var(--transition);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* Logo */
.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  line-height: 1.1;
}
.nav-logo img {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  flex-direction: column;
}
.nav-logo-text span {
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
}

/* Links de escritorio */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cocoa-light);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--amber);
  transition: width var(--transition);
}
.nav-links a:hover               { color: var(--amber); }
.nav-links a:hover::after        { width: 100%; }

.nav-cta { margin-left: 2rem; }

/* Botón hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil desplegable */
.mobile-nav {
  display: none;
  position: fixed;
  top: 70px; left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  flex-direction: column;
  gap: 1.2rem;
  z-index: 99;
  box-shadow: var(--shadow-md);
  transform: translateY(-10px);
  opacity: 0;
  transition: var(--transition);
}
.mobile-nav.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}
.mobile-nav a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--cream);
}
.mobile-nav .btn { align-self: flex-start; }

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


/* ============================================================
   3. FOOTER
============================================================ */
footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo img {
  height: 80px;
  width: auto;
  border-radius: 8px;
  opacity: 0.92;
}

.footer-links { display: flex; gap: 1.75rem; }
.footer-links a { font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); transition: color var(--transition); }
.footer-links a:hover { color: var(--amber); }

.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  transition: var(--transition);
}
.footer-social a:hover { background: var(--amber); border-color: var(--amber); color: var(--white); }
.footer-social svg { width: 18px; height: 18px; }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.25);
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 0.5rem;
}


/* ============================================================
   4. WHATSAPP FLOTANTE (SOLO MOBILE)
============================================================ */
.wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: var(--white);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.wa-float svg { display: block; }
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}

@media (max-width: 768px) {
  .wa-float { display: flex; }
}
