/* Estilos base para el header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
    width: 100%;
}

/* Contenedor principal */
.header-top {
    padding: 5px 0;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
}

.header-top-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Logo */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 100%;
    transition: all 0.3s ease;
}

.date-subtitle {
    color: #fff;
    font-size: 0.8rem;
    margin-top: 2px;
    font-weight: 500;
}

/* Botones de acción */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.menu-toggle, .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-toggle:hover, .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 2px 0;
    transition: all 0.3s ease;
}

/* Menú de categorías */
.categories-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    padding: 10px 0;
}

.categories-dropdown.active {
    display: block;
}

/* Estilos responsivos */
@media (max-width: 1024px) {
    .logo-img {
        height: 45px;
    }
    
    .date-subtitle {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .header-top {
        padding: 3px 0;
    }
    
    .logo {
        padding: 3px 0;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .menu-toggle, .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 35px;
    }
    
    .date-subtitle {
        font-size: 0.7rem;
    }
    
    .menu-toggle, .theme-toggle {
        width: 30px;
        height: 30px;
    }
    
    .hamburger-line {
        width: 18px;
        height: 2px;
    }
}

/* Clase para el header compacto en scroll */
.header.compact {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px !important; /* Solo una línea delgada */
    min-height: 4px !important;
    transform: none;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Ajuste para el contenido principal cuando el header es fijo */
body.header-fixed {
    padding-top: 60px; /* Ajusta según la altura de tu header */
}

/* Estilos para el menú de categorías */
.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 10px 0;
}

.category-item {
    padding: 8px 12px;
    border-radius: 4px;
    background: #f8f9fa;
    transition: all 0.2s ease;
    text-align: center;
}

.category-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* Mejoras para el menú móvil */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}
