/* ==========================================================================
   layout.css – Estructura global: header, carousel, body, footer
   Mobile-first, responsive
   Última actualización: marzo 2026
   ========================================================================== */

/* ────────────────────────────────────────────────
   Layout general – mobile-first
   ──────────────────────────────────────────────── */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-container {
  display: flex;
  flex: 1;
  position: relative;
}

.main-content {
  flex: 1;
  width: 100%;
  padding: 1.5rem; /* móvil base */
  margin-top: 0px; /* espacio para header sticky */
  box-sizing: border-box;
}

/* ────────────────────────────────────────────────
   HEADER – base móvil
   ──────────────────────────────────────────────── */
.site-header {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: background 0.4s ease;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem; /* móvil */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 0.9rem; /* móvil */
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  gap: 0.5rem;
  white-space: nowrap;
}

.logo-icon {
  font-size: 1.6rem; /* móvil */
}

.main-nav {
  display: none;
  flex: 1;
  justify-content: center;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  z-index: 999;
}

.main-nav.active {
  display: block;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  text-align: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list li a {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  transition: color 0.3s;
}

.nav-list li a:hover,
.nav-list li a.active {
  color: var(--primary);
}

.nav-list li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-list li a:hover::after {
  width: 100%;
}

.right-section {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.auth-btn {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.login {
  background: white;
  color: var(--primary);
}

.register {
  background: var(--primary);
  color: white;
}



.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
  order: -1;
  margin-right: 1rem;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* HEADER – media queries desktop */
@media (min-width: 1024px) {
  .header-inner {
    padding: 1rem 2rem;
  }

  .main-nav {
    display: flex;
    position: static;
    box-shadow: none;
    padding: 0;
  }

  .nav-list {
    flex-direction: row;
    gap: 2.5rem;
    text-align: left;
  }

  .right-section {
    gap: 1rem;
  }

  .menu-toggle {
    display: none;
  }

  .logo {
    font-size: 1.7rem;
  }

  .logo-icon {
    font-size: 2rem;
  }
}

/* ────────────────────────────────────────────────
   CAROUSEL – base móvil
   ──────────────────────────────────────────────── */
/* Aquí puedes añadir tu CSS de carrusel móvil, por ejemplo: */
.carousel {
  width: 100%;
  overflow: hidden;
}

.carousel-slide {
  width: 100%;
  transition: transform 0.4s ease;
}

/* CAROUSEL – media queries desktop */
@media (min-width: 1024px) {
  .carousel {
    width: 80%;
    margin: 0 auto;
  }
}

/* ────────────────────────────────────────────────
   BODY – base móvil
   ──────────────────────────────────────────────── */
.main-content {
  padding: 1.5rem;
}

/* BODY – media queries desktop */
@media (min-width: 1024px) {
  .main-content {
    padding: 2rem;
  }
}

/* ────────────────────────────────────────────────
   FOOTER – base móvil
   ──────────────────────────────────────────────── */
.site-footer {
  background: #0f172a;
  color: #e2e8f0;
  padding: 4rem 1.5rem 2.5rem;
  margin-top: auto;
  box-sizing: border-box;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: white;
}

.footer-brand p {
  font-size: 0.95rem;
  opacity: 0.8;
  line-height: 1.5;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-column h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: white;
}

.footer-column a {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.3s;
  display: block;
}

.footer-column a:hover {
  color: white;
  padding-left: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* FOOTER – media queries desktop */
@media (min-width: 1024px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 4rem;
  }

  .footer-links {
    flex-direction: row;
    gap: 3rem 4rem;
  }
}






/* ── HEADER 3 COLUMNAS Y DROPDOWN USUARIO ── */
.site-header {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* FILA SUPERIOR — 3 COLUMNAS */
.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.4rem 1.5rem;
  background: white;
  border-bottom: 1px solid #eee;
  position: relative;
  margin: 0 auto;
  box-sizing: border-box;
}

/* IZQUIERDA */
.menu-toggle {
  justify-self: start;
}

/* LOGO CENTRADO */
.logo-container {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  text-decoration: none;
  z-index: 10;
  white-space: nowrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  gap: 0.5rem;
  white-space: nowrap;
}

.logo-icon {
  font-size: 1.5rem;
}

/* DERECHA */
.right-section {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* BOTONES LOGIN / REGISTER */
.auth-btn {
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.auth-btn.login {
  background: white;
  border: 2px solid var(--primary, #3ba676);
  color: var(--primary, #3ba676);
}

.auth-btn.register {
  background: var(--primary, #3ba676);
  color: white;
  border: 2px solid var(--primary, #3ba676);
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59,166,118,0.3);
}

.auth-btn.login:hover {
  background: var(--primary, #3ba676);
  color: white;
}

.auth-btn.register:hover {
  background: var(--primary-dark, #2e8b57);
}

/* DROPDOWN USUARIO */
.user-dropdown {
  position: relative;
}

.profile-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-image {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 45px;
  background: white;
  border-radius: 10px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  z-index: 999;
}

.dropdown-menu a {
  padding: 10px 14px;
  text-decoration: none;
  color: #333;
}

.dropdown-menu a:hover {
  background: #f5f5f5;
}

.user-dropdown.active .dropdown-menu {
  display: flex;
}

/* HEADER BOTTOM: menú principal centrado */
.header-bottom {
  border-top: 1px solid var(--glass-border);
}

.header-bottom .main-nav {
  display: block;
  /* padding: 0.8rem 1rem; */
}

.nav-list {
  display: flex;
  flex-direction: row;
  list-style: none;
  justify-content: center;
  margin: 0;
  padding: 0;
  text-align: center;
}

.nav-list li a {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
}

/* DESKTOP */
@media (min-width: 1024px) {
  .nav-list {
    flex-direction: row;
    justify-content: center;
    gap: 2.5rem;
  }
  
  .nav-list li a {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 1.0rem;
  text-decoration: none;
}

  .logo {
    font-size: 1.6rem;
  }

  .logo-icon {
    font-size: 2rem;
  }

  .menu-toggle {
    /* sigue siendo solo para tu menú lateral */
    display: flex;
  }
}