* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: white;
}

/* Contenedor principal sin sidebar */
.main-container {
  display: flex;
  flex-direction: column;
  flex: 1;

  position: relative;
}

/*------- Contenedor superior (topbar + contenido) ---------------------------------*/
.top-section {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Top bar - MÁS ALTO Y ATRACTIVO */
/* Estructura nueva del topbar */
.top-bar {
  display: flex;
  flex-direction: column; /* ahora son 2 filas */
  padding: 20px 40px;
  min-height: 280px;
  gap: 20px;
  position: relative;
  
}

/* Fila superior: logo + menú + redes */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Agrupar menú + redes sociales */
.top-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
/* Redes sociales arriba */
.social-links {
  display: flex;
  gap: 12px;
}
.social-links .social-icon {
  background-color: #c3b6ed;
  color: white;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background-color 0.3s;
  text-decoration: none; /* Esta lÃ­nea quita el subrayado */
}
.social-links .social-icon:hover {
  transform: scale(1.1);
  background-color: #7c58ed;
}
/* Fila inferior con la frase */
.bottom-row {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin-bottom: 2rem;
}


/* Logo en el topbar */
.logo-container-top {
  display: flex;
  align-items: center;

}

  .logo-container-top img {
    width: 210px !important;
  }

.logo-link {
  display: inline-block;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo-link:hover {
  transform: scale(1.05);
}

/* Frase motivadora central */
.tagline {
  flex: 1;
  text-align: left;
  color: white;
  margin: 0 20px;
}

.tagline h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.tagline p {
  font-size: 1.1rem;
  font-weight: 400;
  color: #dbfdbc;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.tagline .tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(219, 253, 188, 0.2);
  border-radius: 20px;
  margin: 0 5px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.tagline .tag:hover {
  background: rgba(219, 253, 188, 0.4);
  transform: translateY(-2px);
}

/* Enlaces de navegación mejorados */
.nav-links {
  display: flex;
  gap: 15px;
  align-items: center;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: white;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-links a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Botones especiales de registro e inicio de sesión */
.nav-links .btn-register {
  background: linear-gradient(135deg, #68c8a7 0%, #4a9d7f 100%);
  border: none;
  font-weight: 600;
}

.nav-links .btn-register:hover {
  background: linear-gradient(135deg, #7dd9b8 0%, #5bb090 100%);
  box-shadow: 0 6px 20px rgba(104, 200, 167, 0.4);
}

.nav-links .btn-login {
  background: linear-gradient(135deg, #7c58ed 0%, #5a3fb8 100%);
  border: none;
  font-weight: 600;
}

.nav-links .btn-login:hover {
  background: linear-gradient(135deg, #9570ff 0%, #6b4fc9 100%);
  box-shadow: 0 6px 20px rgba(124, 88, 237, 0.4);
}

/* ---------------Contenido principal------------------------------ */
.main-content {
  flex: 1;
  border-radius: 15px;

  margin: 10px 40px;
}

/* Contenedor para search bar */
    .search-header {
      display: flex;
      align-items: center;
      gap: 15px; /* Espacio entre buscador e iconos */
      padding: 0.8rem 3rem;
      margin-bottom: 0;
      margin-top: 1rem;
      

      overflow: hidden;
    }
    .search-bar {
      flex: 0.99; /* Ocupa el mÃ¡ximo ancho posible */
      display: flex;
      align-items: center;
      border: 2px solid #e0e0e0;
      border-radius: 25px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    .search-bar input {
      flex: 1;
      padding: 12px 15px;
      border: none;
      font-size: 16px;
      outline: none;
    }
    .search-btn {
      background: none;
      border: none;
      padding: 0 15px;
      font-size: 18px;
      color: #666;
      cursor: pointer;
    }

/* Footer */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #4a148c 100%);
  color: white;
  padding: 40px 20px 20px;
  width: 100%;
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-section h3 {
  margin-bottom: 20px;
  color: #dbfdbc;
}

.footer-section p, .footer-section a {
  margin-bottom: 10px;
  color: #ecf0f1;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
}

.footer-social {
  display: flex;
  gap: 1em;
  margin-top: 20px;
  align-items: center;
}

.footer-social a {
  background: #7c58ed;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: transform 0.3s;
}

.footer-social a:hover {
  transform: scale(1.1);
}

.footer-bottom {
  border-top: 1px solid #dbfdbc;
  margin-top: 30px;
  padding-top: 20px;
  text-align: center;
  color: #bdc3c7;
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #7c58ed;
  border-radius: 25px;
  box-shadow: 0 5px 15px rgba(124, 88, 237, 0.3);
  transition: transform 0.3s;
  z-index: 99999999999999;
}

.chat-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  padding: 12px 20px;
  text-decoration: none;
  font-weight: 500;
}

.chat-widget:hover {
  transform: translateY(-2px);
}

/* ================== OVERLAY PARA CERRAR DROPDOWN ================== */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  background: transparent;
}

.nav-overlay.active {
  display: block;
}

/* ================== MENÚ HAMBURGUESA DE NAVEGACIÓN ================== */
.nav-hamburger {
  position: relative;
  display: none;
  
}

.nav-hamburger-btn {
  background: rgba(195, 182, 237, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 24px;
  color: white;
  cursor: pointer;
  padding: 10px 15px;
  border-radius: 10px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
 
}

.nav-hamburger-btn:hover {
  background: rgba(195, 182, 237, 0.3);
  transform: scale(1.05);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
  border: 1px solid #e0e0e0;
}

.nav-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s;
  font-size: 15px;
}

.nav-dropdown a:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

.nav-dropdown a:first-child {
  border-radius: 12px 12px 0 0;
}

.nav-dropdown a:hover {
  background-color: #f8f9fa;
  color: #7c58ed;
  padding-left: 24px;
}

.nav-dropdown a i {
  width: 20px;
  font-size: 16px;
  color: #666;
  transition: color 0.2s;
}

.nav-dropdown a:hover i {
  color: #7c58ed;
}

/* ================== MEDIA QUERIES MEJORADO ================== */

/* ================== MEDIA QUERIES COMPLETOS ================== */

/* ✅ Tablets grandes (hasta 1080px) */
@media screen and (max-width: 1080px) {
  .top-bar {
    padding: 20px 30px;
    min-height: 200px;
    gap: 15px;
    background-size: cover;
    background-position: center;
  }

  /* ✅ Acomodo del topbar aquí */
  .top-row {
    justify-content: space-between;
    align-items: center;
  }

  .top-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: auto;
    gap: 15px;
    margin-left: auto;
  }

  .social-links {
    order: 1;
    margin-left: auto;     /* ✅ Empuja redes a la derecha */
    display: flex;
    justify-content: flex-end;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: block;
    order: 2;
    width: auto;
    margin-left: auto; /* ✅ Empuja el menú hamburguesa a la derecha */
    flex-shrink: 0;       /* ✅ Evita que se deforme */
  }

  .main-content {
    margin: 20px 30px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  

}

/* ✅ Tablets medianos (hasta 768px) */
@media screen and (max-width: 768px) {
  .top-bar {
    padding: 15px 20px;
    min-height: 160px;
    gap: 15px;
  }

  .logo-container-top img {
    width: 230px !important;
  }

  .top-row {
    flex-direction: column;
    align-items: center;
  }

  .top-right {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    justify-content: center;
  }

  .social-links {
    justify-content: center;
    margin: 0.5rem;
    margin-bottom: 0;
  }

  .nav-hamburger {
    position: fixed;
    top: 12px;
    right: 15px;
    z-index: 9999;
  }

  .nav-hamburger-btn {
    backdrop-filter: blur(6px);
  }

  .tagline {
    text-align: center;
    margin-top: 8px;
  }

  .main-content {
    margin: 15px 20px;
  }

  .search-header {
    padding: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center; /* Centra los íconos */
    width: 100%; /* Asegura que ocupe todo el ancho */
    margin-top: 1rem;
  }

}

/* ✅ Celulares (hasta 480px) */
@media screen and (max-width: 480px) {
  .top-bar {
    padding: 12px 15px;
    min-height: 140px;
  }
  
  .tagline h2 {
      font-size: 2.5rem;
      margin-bottom: 1.5rem;
  }
  
  .tagline p {
        font-size: 1rem;
        display: flex;
        flex-wrap: wrap; /* Permitir varias líneas */
        justify-content: center; /* Centrar en móvil */
        gap: 6px; /* Espaciado entre filas y columnas */
        line-height: 1.4; /* Mejor interlineado */
  }
  
  .tagline .tag {
        font-size: 0.9rem; /* Más pequeño en móvil */
        padding: 4px 8px; /* Ajuste para móviles */
        white-space: nowrap; /* Evita que un tag se parta */
  }

  /* ✅ HAMBURGER FIJO */
  .nav-hamburger {
    position: fixed;
    top: 12px;
    right: 15px;
    z-index: 9999;
  }

  .nav-hamburger-btn {
    backdrop-filter: blur(6px);
  }

  .logo-container-top img {
    width: 230px !important;
    margin-top: 1.5rem;
  }

  .social-links {
    justify-content: center;
    margin: 0.5rem;
    margin-bottom: 0;
  }

  .main-content {
    margin: 10px 15px;
  }

  .search-header {
    padding: 0.8rem;
  }
}

/* ✅ Celulares muy pequeños (hasta 320px) */
@media screen and (max-width: 399px) {
  .top-bar {
    padding: 8px 10px;
    min-height: 120px;
  }

  .logo-container-top img {
    width: 210px !important;
  }

  .tagline h2 {
      font-size: 2.2rem;
      margin-bottom: 1.5rem;
  }
  
  .tagline p {
      font-size: 0.8rem;
  }
  
    /* ✅ HAMBURGER FIJO */
  .nav-hamburger {
    position: fixed;
    top: 12px;
    right: 15px;
    z-index: 9999;
  }

  .nav-hamburger-btn {
    backdrop-filter: blur(6px);
  }

  .logo-container-top img {
    width: 230px !important;
    margin-top: 1.5rem;
  }

  .social-links {
    justify-content: center;
    margin: 0.5rem;
    margin-bottom: 0;
  }

  .main-content {
    margin: 10px 15px;
  }

  .search-header {
    padding: 0.8rem;
  }
  
  .footer-social {
    justify-content: center; /* Centra los íconos */
    width: 100%; /* Asegura que ocupe todo el ancho */
    margin-top: 1rem;
  }

  
}

/* ✅ Para pantallas MUY pequeñas (340px o menos) */
@media screen and (max-width: 360px) {
  .logo-container-top img {
    width: 190px !important;
  }
  .tagline h2 {
      font-size: 2rem;
      margin-bottom: 1.5rem;
  }
  .tagline p {
    flex-direction: column; /* <--- ¡Cada tag en una fila! */
    align-items: center;
    gap: 2px;
  }

  .tagline .tag {
    width: max-content; /* Tamaño justo del texto */
  }
  
  .footer-social {
    justify-content: center; /* Centra los íconos */
    width: 100%; /* Asegura que ocupe todo el ancho */
    margin-top: 1rem;
  }
}
