/* Estilos globales: Barra de desplazamiento personalizada */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #00027c;
  border-radius: 6px;
  border: 3px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
  background: #00027c;
}

/* Soporte para Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #00027c #f1f1f1;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Estilos globales para el logo del header como enlace */
.logo-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  text-decoration: none !important;
  color: inherit !important;
}

.logo {
  height: 150px !important;
  width: auto !important;
  transition: height 0.3s ease;
}

.logo-title:hover {
  text-decoration: none !important;
  color: inherit !important;
}

/* Estilos del Menú Móvil: Define el comportamiento del botón hamburguesa y el menú desplegable */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: white;
}

@media (max-width: 1024px) {
  .logo {
    height: 65px !important; /* Tamaño ajustado para una línea */
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .logo-title h1, .logo-title h2 {
    font-size: 0 !important; /* Oculta texto original */
    margin: 0 !important;
    padding: 0 !important;
    flex-grow: 1 !important;
    text-align: center !important;
  }

  .logo-title h1::after, .logo-title h2::after {
    content: "AT. GILET";
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    display: block;
    transform: translateX(-20px); /* Centrado visual compensando el logo */
  }
  
  .nav {
    flex-direction: row !important; 
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    padding: 10px 15px !important;
  }

  .logo-title {
    flex: 1 !important;
    max-width: calc(100% - 40px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
  }

  .hamburger {
    display: block;
    font-size: 1.8rem;
    cursor: pointer;
    color: white;
    margin-left: 10px !important;
  }

  /* Sobrescribir estilos de cabecera existentes si es necesario para permitir el posicionamiento del menú absoluto */
  .nav {
    position: relative;
    flex-wrap: wrap;
    /* Permitir ajuste de línea (wrapping) */
  }

  .nav ul {
    display: none;
    /* Oculto por defecto */
    width: 100%;
    flex-direction: column;
    background-color: #0b1c3d;
    padding: 10px 0;
    margin-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease-out;
  }

  .nav ul.active {
    display: flex;
    /* Mostrar cuando esté activo */
  }

  .nav ul li {
    text-align: center;
    padding: 4px 0;
  }

  .nav ul li a {
    display: block;
    padding: 10px;
    font-size: 1.1rem;
  white-space: nowrap;
}
}

/* Móvil en horizontal (Landscape): También se muestra la hamburguesa */
@media (max-height: 600px) and (orientation: landscape) {
  .hamburger {
    display: block;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
  }

  .nav {
    position: relative;
    flex-wrap: wrap;
  }

  .nav ul {
    display: none;
    width: 100%;
    flex-direction: column;
    background-color: #0b1c3d;
    padding: 8px 0;
    margin-top: 5px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideDown 0.3s ease-out;
  }

  .nav ul.active {
    display: flex;
  }

  .nav ul li {
    text-align: center;
    padding: 0;
  }

  .nav ul li a {
    display: block;
    padding: 6px;
  white-space: nowrap;
}
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
