/**
 * Header CSS Villa del Totoral
 * EXACTO del legacy D:\sitios\villatotoral.local\theme\estilos\generales\template_estructura.css
 * Líneas 496-1641
 */

/* ========== HEADER CAPA 1 - VERDE PRIMARIO ========== */

.contenedor-header-1 {
  background-color: var(--primario);
  padding: 0.8rem 0;
}

.contenedor-header-1 .header-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 1rem;
}

.logo-header {
  height: 60px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  color: var(--blanco);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-deuda {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background-color: var(--blanco);
  border: none;
  border-radius: 3rem;
  color: var(--primario);
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-deuda:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--primario);
}

.btn-deuda i {
  font-size: 1.4rem;
}

.redes-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.red-social-header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 3.2rem;
  height: 3.2rem;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--blanco);
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.red-social-header:hover {
  background-color: var(--blanco);
  color: var(--primario);
}

/* ========== HEADER CAPA 2 - VERDE TERCIARIO ========== */

.contenedor-header-2 {
  background-color: var(--terciario);
  padding: 0;
}

.header-2 {
  display: flex;
  align-items: center;
}

.header-2 .menu {
  width: 100%;
}

.header-2 .navbar {
  padding: 0;
}

.header-2 .navbar-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.header-2 .nav-link {
  color: var(--blanco) !important;
  font-size: 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 1rem 1.5rem !important;
  transition: all 0.3s ease;
  position: relative;
}

/* Línea animada debajo del link - Implementación funcional propia
   Altura visible + animación suave compatible con Bootstrap 5 */
.header-2 .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background-color: var(--secundario);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.header-2 .navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--blanco);
}

@media (min-width: 992px) {
  .header-2 .nav-link:hover::after {
    width: 80%;
  }
}

.header-2 .dropdown-menu {
  background-color: var(--blanco);
  border: none;
  border-radius: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  margin-top: 0;
}

/* ========== MEGA-MENÚ 3 NIVELES ========== */

.nav-item.dropdown.dropdown-mega .dropdown-menu {
  margin-top: 0;
  top: 100%;
}

@media (min-width: 992px) {
  .nav-item.dropdown.dropdown-mega-2 .dropdown-menu,
  .nav-item.dropdown.dropdown-mega .dropdown-menu {
    position: absolute;
    left: 0;
    right: 0;
    border-color: var(--blanco);
    z-index: 1000;
  }
}

.top-line {
  height: 3px;
  width: 100%;
  margin-bottom: 1.5rem;
  background-color: var(--terciario);
}

.columna {
  min-width: 20rem;
  padding: 0 2rem;
  margin-right: 30px;
}

.columna:last-child {
  margin-right: 0;
}

.nombre-contendor-items {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--negro);
  display: block;
  padding-bottom: 0.8rem;
  margin-bottom: 0;
}

.contenedor-columnas {
  display: flex;
  justify-content: flex-start;
  gap: 4rem;
  padding: 1rem 2rem;
}

.items-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sub-menu {
  position: relative;
  padding-left: 1.5rem;
}

.sub-menu::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--terciario);
  font-size: 1.4rem;
  font-weight: bold;
}

.sub-menu a {
  color: var(--negro);
  font-size: 1.4rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.3s ease;
}

.sub-menu a:hover {
  color: var(--primario);
}

.icon-label {
  display: block;
  font-size: 1.5rem;
}

.icon-label i {
  display: none;
}

/* ========== RESPONSIVE MÓVIL ========== */

@media (max-width: 991px) {
  .contenedor-header-1 {
    padding: 0.5rem 0;
  }

  .contenedor-header-1 .header-1 {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .logo-header {
    height: 35px;
  }

  .logo-title {
    font-size: 0.9rem;
  }

  .logo-subtitle {
    font-size: 1.1rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .btn-deuda {
    padding: 0.5rem 0.8rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .btn-deuda i {
    font-size: 1rem;
  }

  .red-social-header {
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.1rem;
  }

  .header-2 .navbar-collapse {
    background-color: var(--secundario);
    padding: 1rem;
  }

  .header-2 .nav-link {
    padding: 0.8rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 576px) {
  .contenedor-header-1 .header-1 {
    padding: 0 0.5rem;
  }

  .logo-container {
    flex-shrink: 0;
  }

  .logo-header {
    height: 30px;
  }

  .logo-text {
    display: none;
  }

  .header-actions {
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .btn-deuda {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    gap: 0.3rem;
  }

  .btn-deuda i {
    font-size: 0.9rem;
  }

  .red-social-header {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  .redes-header {
    gap: 0.3rem;
  }
}

@media (max-width: 480px) {
  .icon-label {
    font-size: 1.7rem;
  }

  .sub-menu {
    margin-bottom: 1rem;
  }
}

/* ========== HEADER STICKY MÓVIL ========== */

@media (max-width: 991px) {
  .contenedor-header-1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    padding: 0.3rem 0;
  }

  .contenedor-header-1 .logo-container {
    display: none;
  }

  .contenedor-header-1 .btn-deuda {
    display: none;
  }

  .contenedor-header-1 .header-1 {
    justify-content: flex-end;
  }

  .contenedor-header-1 .redes-header {
    gap: 0.5rem;
  }

  .contenedor-header-1 .red-social-header {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1rem;
  }

  .contenedor-header-2 {
    position: fixed;
    top: 35px;
    left: 0;
    width: 100%;
    z-index: 9999;
  }

  .contenedor-header-2 .header-2 {
    padding: 0.5rem 0;
  }

  .contenedor-header-2 .navbar-brand {
    display: flex !important;
  }

  .contenedor-header-2 .navbar-brand img {
    height: 50px;
    width: auto;
  }

  body {
    padding-top: 100px;
  }
}

@media (max-width: 576px) {
  .contenedor-header-1 {
    padding: 0.8rem 0;
  }

  .contenedor-header-2 {
    top: 30px;
  }

  .contenedor-header-2 .navbar-brand img {
    height: 45px;
  }

  body {
    padding-top: 90px;
  }

  .contenedor-header-2 .navbar-collapse {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }

  .no-body-padding {
    padding: 0;
  }

  .header-2 .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
    padding: 0.5rem;
  }

  .header-2 .hamburger span {
    background-color: var(--blanco);
  }
}
