/* ============================================
   HEADER CSS - LOGO PNG CON COLOR ORIGINAL
   ============================================ */

/* Variables específicas del header */
:root {
    --header-height: 80px;
    --header-height-scrolled: 70px;
    --header-bg: #ffffff;
    --header-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --header-scrolled-bg: rgba(255, 255, 255, 0.98);
    --header-transition: all 0.3s ease;
    --menu-z-index: 10000;
    --overlay-z-index: 9999;
}

/* ============================================
   HEADER PRINCIPAL
   ============================================ */
.header {
    background-color: var(--header-bg);
    box-shadow: var(--header-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--menu-z-index);
    padding: 0;
    transition: var(--header-transition);
    transform: translateY(0);
    height: var(--header-height);
}

/* Header cuando está escondido */
.header.hidden {
    transform: translateY(-100%);
}

/* Header cuando se hace scroll */
.header.scrolled {
    background-color: var(--header-scrolled-bg);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    height: var(--header-height-scrolled);
}

/* Contenedor principal */
.header .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    height: 100%;
}

/* Contenido del header */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: var(--spacing-sm) 0;
    transition: padding 0.3s ease;
}

.header.scrolled .header-content {
    padding: calc(var(--spacing-sm) / 2) 0;
}

/* ============================================
   LOGO PNG - COLOR ORIGINAL
   ============================================ */
.logo a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

/* Logo PNG - COLOR ORIGINAL (SIN FILTROS) */
.logo-img {
    width: 140px; /* Tamaño grande */
    height: 140px;
    object-fit: contain;
    transition: transform 0.3s ease;
    /* SIN filter: - Mantiene colores originales */
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

/* Cuando el header tiene scroll - tamaño reducido */
.header.scrolled .logo-img {
    width: 120px;
    height: 120px;
}

/* ============================================
   NAVEGACIÓN DESKTOP
   ============================================ */
.nav-desktop {
    display: none;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-xs);
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--gray-color);
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Botón WhatsApp en navegación */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--heading-font);
    font-size: 0.95rem;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

/* ============================================
   BOTÓN MENÚ MÓVIL (HAMBURGUESA)
   ============================================ */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: calc(var(--menu-z-index) + 1);
    transition: transform 0.3s ease;
    position: relative;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: left center;
}

/* Animación del botón hamburguesa a X */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(2px, -1px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(2px, 1px);
}

/* ============================================
   OVERLAY DE FONDO OSCURO
   ============================================ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: var(--overlay-z-index);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
    pointer-events: none;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ============================================
   NAVEGACIÓN MÓVIL - VERSIÓN COMPLETA
   ============================================ */
.nav-mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background-color: white;
    z-index: calc(var(--menu-z-index) + 2);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 0;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

/* Estado activo - Menú visible */
.nav-mobile.active {
    right: 0;
}

/* Contenedor del contenido del menú */
.menu-content {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-top: 140px; /* Espacio para logo grande */
}

/* Lista del menú móvil */
.nav-list-mobile {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Elementos de la lista con animación */
.nav-list-mobile li {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.nav-mobile.active .nav-list-mobile li {
    opacity: 1;
    transform: translateX(0);
}

/* Retrasos para animación escalonada */
.nav-mobile.active .nav-list-mobile li:nth-child(1) { transition-delay: 0.1s; }
.nav-mobile.active .nav-list-mobile li:nth-child(2) { transition-delay: 0.2s; }
.nav-mobile.active .nav-list-mobile li:nth-child(3) { transition-delay: 0.3s; }
.nav-mobile.active .nav-list-mobile li:nth-child(4) { transition-delay: 0.4s; }
.nav-mobile.active .nav-list-mobile li:nth-child(5) { transition-delay: 0.5s; }

/* Enlaces del menú móvil */
.nav-link-mobile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    background-color: white;
    border: 2px solid transparent;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.nav-link-mobile::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-link-mobile:hover::before,
.nav-link-mobile.active::before {
    transform: scaleY(1);
}

.nav-link-mobile:hover {
    background-color: rgba(52, 152, 219, 0.05);
    color: var(--primary-color);
    transform: translateX(5px);
}

.nav-link-mobile.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    border-color: rgba(52, 152, 219, 0.2);
}

.nav-link-mobile i {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* WhatsApp en móvil */
.btn-whatsapp-mobile {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    padding: 1.2rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    border: none;
    cursor: pointer;
    width: 100%;
    font-family: var(--heading-font);
    transition: all 0.3s ease;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.nav-mobile.active .btn-whatsapp-mobile {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.btn-whatsapp-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp-mobile i {
    font-size: 1.3rem;
}

/* ============================================
   AJUSTES PARA EL BODY
   ============================================ */
body {
    padding-top: var(--header-height);
    transition: padding-top 0.3s ease;
    position: relative;
}

body.menu-open {
    overflow: hidden;
}

/* ============================================
   MEDIA QUERIES PARA LOGO PNG
   ============================================ */

/* Desktop (992px y más) */
@media (min-width: 992px) {
    .menu-toggle,
    .menu-overlay,
    .nav-mobile {
        display: none !important;
    }
    
    .nav-desktop {
        display: block !important;
    }
    
    .nav-list {
        gap: var(--spacing-sm);
    }
    
    /* Logo en desktop */
    .logo-img {
        width: 150px; /* Grande en desktop */
        height: 150px;
    }
    
    .header.scrolled .logo-img {
        width: 130px;
        height: 130px;
    }
    
    .menu-content {
        padding-top: 160px; /* Más espacio para logo grande */
    }
}

/* Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    /* Logo en tablet */
    .logo-img {
        width: 130px;
        height: 130px;
    }
    
    .header.scrolled .logo-img {
        width: 110px;
        height: 110px;
    }
    
    .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn-whatsapp {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .menu-content {
        padding-top: 140px;
    }
}

/* Teléfonos (767px y menos) */
@media (max-width: 767px) {
    .header {
        height: 90px; /* Más alto para logo grande */
    }
    
    .header.scrolled {
        height: 80px;
    }
    
    /* Logo en móvil */
    .logo-img {
        width: 110px;
        height: 110px;
    }
    
    .header.scrolled .logo-img {
        width: 95px;
        height: 95px;
    }
    
    body {
        padding-top: 90px;
    }
    
    .menu-content {
        padding-top: 120px;
    }
}

/* Teléfonos pequeños (480px y menos) */
@media (max-width: 480px) {
    .header-content {
        padding: 10px 0;
    }
    
    /* Logo en móvil pequeño */
    .logo-img {
        width: 95px;
        height: 95px;
    }
    
    .header.scrolled .logo-img {
        width: 80px;
        height: 80px;
    }
    
    .menu-content {
        padding: 1rem;
        padding-top: 110px;
    }
    
    .nav-link-mobile {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-whatsapp-mobile {
        padding: 1rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* Teléfonos muy pequeños (360px y menos) */
@media (max-width: 360px) {
    .logo-img {
        width: 85px;
        height: 85px;
    }
    
    .header.scrolled .logo-img {
        width: 75px;
        height: 75px;
    }
    
    .nav-mobile {
        width: 90%;
    }
    
    .menu-content {
        padding-top: 100px;
    }
}