/* Header Styles - Componente Modular */
.header {
    background: #1F4B9E;
    box-shadow: 0 2px 20px rgba(31, 75, 158, 0.3);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 5px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    margin-left: -50px; /* Mover logo más a la izquierda */
}

.logo-img {
    width: 100px;
    height: 90px;
    object-fit: contain;
    margin-right: 20px;
    padding: 10px;
}

/* En móvil, ajustar logo-img para igualar márgenes */
@media (max-width: 768px) {
    .logo-img {
        padding: 10px; /* Mantener padding interno */
        margin-right: 10px; /* Margen entre imagen y texto */
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--white);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-yellow);
    transition: width 0.3s ease;
}

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

/* Animación de estrellitas para Tienda */
.tienda-link {
    position: relative;
    display: inline-block;
    z-index: 0;
}

.tienda-link > *:not(.stars-container) {
    position: relative;
    z-index: 2;
}

.stars-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.stars-container::before,
.stars-container::after {
    content: '⭐';
    position: absolute;
    font-size: 12px;
    opacity: 0;
    animation: starTwinkle 2s ease-in-out infinite;
}

.stars-container::before {
    top: -15px;
    left: -10px;
    animation-delay: 0s;
}

.stars-container::after {
    top: -15px;
    right: -10px;
    animation-delay: 1s;
}

.tienda-link::before,
.tienda-link::after {
    content: '⭐';
    position: absolute;
    font-size: 12px;
    opacity: 0;
    animation: starTwinkle 2s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.tienda-link::before {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 0.5s;
}

.tienda-link::after {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 1.5s;
}

@keyframes starTwinkle {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.3) rotate(0deg);
    }
    25% {
        opacity: 1;
        transform: translateY(-8px) scale(1.2) rotate(90deg);
    }
    50% {
        opacity: 1;
        transform: translateY(-12px) scale(1) rotate(180deg);
    }
    75% {
        opacity: 0.8;
        transform: translateY(-8px) scale(0.9) rotate(270deg);
    }
    100% {
        opacity: 0;
        transform: translateY(0) scale(0.3) rotate(360deg);
    }
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--white);
    cursor: pointer;
}

/* Responsive Header */
@media (max-width: 768px) {
    .nav-container {
        padding-right: 35px; /* Padding igual en ambos lados - controla el margen */
        justify-content: space-between; /* Distribuye logo y menú */
    }
    
    .logo {
        margin-left: 0 !important; /* Sin margen izquierdo - el padding del contenedor controla */
        margin-right: 0 !important; /* Sin margen derecho */
        padding: 0; /* Sin padding adicional */
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1F4B9E;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
        margin-left: 0 !important; /* Sin margen izquierdo */
        margin-right: 0 !important; /* Sin margen derecho - el padding del contenedor controla */
        padding: 0; /* Sin padding adicional */
        flex-shrink: 0; /* No se encoge */
    }
}

