/* ====================================
   HEADER RESPONSIVE CON MENÚ HAMBURGUESA
   ==================================== */

/* 
COLORES DEL NAVBAR:
- Fondo principal: rgba(173, 216, 230, 0.95) - Azul claro (lightblue)
- Fondo en scroll: rgba(135, 206, 235, 0.98) - Azul claro más intenso (skyblue)
- Texto enlaces: #2980b9 - Azul oscuro
- Texto hover: #1e5a8b - Azul más oscuro
- Elementos: Tonos azules para mantener cohesión
*/

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos base del header */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
    max-width: 1200px;
    margin: 0 auto;
} 


/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

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

.logo-text {
    height: 62px;
    width: auto;
}

/* Navegación Desktop - HORIZONTAL */
.desktop-nav {
    display: flex;
}

.desktop-nav ul {
    display: flex;
    flex-direction: row; /* HORIZONTAL - uno al lado del otro */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.desktop-nav a {
    text-decoration: none;
    color: #3498db; /* Azul simple */
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.desktop-nav a:hover {
    color: #2980b9; /* Azul más oscuro en hover */
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2980b9;
    transition: width 0.3s ease;
}

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

/* Usuario Desktop */
.desktop-user .profile-icon img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.desktop-user .profile-icon:hover img {
    border-color: #3498db;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.98); /* Fondo más sólido */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2); /* Sombra azul */
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.1); /* Borde azul sutil */
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #2980b9; /* Azul para el texto */
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 5px;
}

.dropdown-item:hover {
    background: rgba(173, 216, 230, 0.3); /* Fondo azul claro */
    color: #1e5a8b; /* Azul más oscuro en hover */
}

/* Botón Hamburguesa - OCULTO POR DEFECTO */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.hamburger-btn:hover {
    background: rgba(52, 152, 219, 0.1);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #2980b9; /* Azul oscuro para las líneas */
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 2px 0;
}

/* Animación del botón hamburguesa cuando está activo */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
    background: white;
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
    background: white;
}

/* Overlay Negro */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menú Móvil - OCULTO POR DEFECTO */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 350px;
    height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    z-index: 1003;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Header del Menú Móvil */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-image-mobile {
    height: 35px;
    width: auto;
}

.logo-text-mobile {
    height: 20px;
    width: auto;
    filter: brightness(0) invert(1);
}

.close-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Navegación Móvil */
.mobile-nav {
    flex: 1;
    padding: 30px 0;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
    text-decoration: none;
    color: #3498db; /* Azul para el texto en móvil */
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #2980b9; /* Azul más oscuro en hover */
    transform: translateX(5px);
}

.mobile-nav-link i {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
    color: #3498db; /* Iconos azules también */
}

/* Sección de Usuario Móvil */
.mobile-user-section {
    padding: 25px;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-user-avatar {
    text-align: center;
    margin-bottom: 20px;
}

.mobile-user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.mobile-user-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

.register-btn {
    background: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.register-btn:hover {
    background: white;
    color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* ====================================
   FOOTER RESPONSIVE
   ==================================== */

footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    color: white;
    position: relative;
    overflow: hidden;
    margin-top: 80px;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3498db, transparent);
}

.container {
    max-width: 1200px;
    padding: 0 20px;
}

.footer-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 20px;
        background-color: #275c7b;
}

.footer-contact-text h2 {
    color: #3498db;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.footer-contact-text p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.footer-contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.footer-contact-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #3498db, transparent);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 50px 0;
}

.footer-column h3 {
    color: #3498db;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: #3498db;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-column ul a:hover {
    color: #3498db;
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 22px;
}

.social-icons a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 35px;
    /* transition: all 0.3s ease; */
    backdrop-filter: blur(10px);
}



.footer-bottom {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ====================================
   MEDIA QUERIES RESPONSIVE
   ==================================== */

/* TABLET (769px - 992px) - MANTIENE MENÚ DESKTOP HORIZONTAL */
@media (max-width: 992px) and (min-width: 769px) {
    .header-container {
        padding: 0 15px;
    }
    
    .desktop-nav ul {
        gap: 20px;
    }
    
    .desktop-nav a {
        font-size: 0.9rem;
    }
    
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-contact {
        flex-direction: column;
        text-align: center;
        padding: 30px 0;
    }
    
    main {
        margin-top: 70px;
    }
}

/* SOLO CELULARES (768px y menos) - APARECE HAMBURGUESA */
@media (max-width: 768px) {

    
    /* Hamburguesa azul oscuro */
    .hamburger-line {
        background: #62b1e7 !important; /* Azul oscuro */
    }
    
    /* Ocultar menú desktop y mostrar hamburguesa */
    .desktop-nav,
    .desktop-user {
        display: none !important;
    }

    .hamburger-btn {
        display: flex !important;
    }

    /* Ajustar header */
    .header-container {
        padding: 0 15px;
        height: 60px;
    }

    .logo-image {
        height: 61px;
    }

    .logo-text {
        height: 35px;
    }

    /* Menú móvil - asegurar que sea vertical */
    .mobile-menu {
        max-width: 100%;
    }
    
    .mobile-nav-list {
        flex-direction: column;
    }
    
    .mobile-nav-link {
        color: #2980b9 !important; /* Forzar color azul */
        justify-content: flex-start;
    }
    
    .mobile-nav-link i {
        color: #2980b9 !important;
    }

    /* Footer responsive */
    .footer-contact {
        flex-direction: column;
        text-align: center;
        padding: 30px 0;
    }

    .footer-contact-text h2 {
        font-size: 1.5rem;
    }

    .footer-columns {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
        padding: 40px 0;
    }

    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-icons {
        justify-content: center;
    }
}

/* REGLA ADICIONAL PARA FORZAR OCULTACIÓN EN MÓVILES */
@media screen and (max-width: 768px) {
    .desktop-user,
    .desktop-nav {
        display: none !important;
        visibility: hidden !important;
    }
    
    .hamburger-btn {
        display: flex !important;
        visibility: visible !important;
    }
}

/* CELULARES PEQUEÑOS (480px y menos) */
@media (max-width: 480px) {
    /* Asegurar que el usuario siga oculto */
    .desktop-user {
        display: none !important;
    }
    
    .header-container {
        height: 55px;
        padding: 0 10px;
    }

    .logo-image {
        height: 44px;
    }

    .logo-text {
        height: 27px;
    }

    .hamburger-btn {
        width: 40px;
        height: 40px;
        display: flex !important;
    }

    .hamburger-line {
        width: 20px;
        height: 2px;
    }

    .mobile-menu-header {
        padding: 15px 20px;
    }

    .mobile-nav-link {
        padding: 18px 20px;
        font-size: 1rem;
    }

    .mobile-user-section {
        padding: 20px;
    }

    .footer-contact-text h2 {
        font-size: 1.3rem;
    }

    .footer-contact-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .footer-columns {
        padding: 30px 0;
    }

    .footer-bottom {
        padding: 20px 0;
    }
}

/* ====================================
   UTILIDADES Y ANIMACIONES
   ==================================== */

/* Prevenir scroll cuando el menú está abierto */
body.menu-open {
    overflow: hidden;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Espaciado del main para compensar header fijo */
main {
    margin-top: 70px;
}

@media (max-width: 768px) {
    main {
        margin-top: 60px; /* Margen normal en móvil ya que usa hamburguesa */
    }
}

@media (max-width: 480px) {
    main {
        margin-top: 55px; /* Margen para móvil pequeño */
    }
}

/* Mejoras de accesibilidad */
.hamburger-btn:focus,
.close-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Reducir movimiento si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-overlay,
    .hamburger-line,
    .mobile-nav-link,
    .mobile-auth-btn,
    .social-icons a,
    .footer-column ul a {
        transition: none;
    }
}

/* Estados hover mejorados */
@media (hover: hover) {
    .mobile-nav-link:hover,
    .mobile-auth-btn:hover {
        transform: translateX(3px);
    }
}
