/* FRANJA AZUL SUPERIOR (estática) */
.top-bar {
    background-color: #004aad;
    color: #fff;
    text-align: center;
    font-size: 0.9rem;
    padding: 6px 0;
}

/* HEADER PRINCIPAL: NO fixed por defecto */
.main-header {
    position: relative; /* <-- importante: no fixed inicialmente */
    width: 100%;
    z-index: 1050;
    background-color: transparent;
    transition: background-color 0.35s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

/* cuando se active el sticky lo hacemos fixed y lo posicionamos arriba */
.main-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(0);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 15px;
}

.logo {
    height: 40px;
    transition: transform 0.25s ease;
}
.logo:hover {
    transform: scale(1.05);
}

.icon-group i {
    font-size: 1.3rem;
    color: #fff;
    margin-left: 15px;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.15s ease;
}
/* Color iconos cuando header se vuelve sticky (clase aplicada en JS) */
.main-header.sticky .icon-group i {
    color: #000;
}
.icon-group i:hover {
    transform: scale(1.15);
    color: #0d6efd;
}

/* Buscador: posición manejada por JS (top dinámico) */
.search-box {
    position: fixed;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.98);
    padding: 10px 15px;
    display: none;
    animation: fadeInDown 0.22s ease forwards;
    z-index: 1045;
}
.search-box input {
    width: 100%;
    border-radius: 25px;
    border: 1px solid #ddd;
    padding: 8px 14px;
}

/* Menú lateral */
.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 78%;
    height: 100%;
    background-color: #fff;
    box-shadow: -4px 0 12px rgba(0,0,0,0.2);
    transition: right 0.35s ease;
    z-index: 1060;
    padding: 22px;
}
.menu-overlay.active {
    right: 0;
}
.menu-overlay ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-overlay li {
    margin: 14px 0;
}
.menu-overlay a {
    color: #000;
    text-decoration: none;
    font-size: 1.05rem;
}
.menu-overlay a:hover {
    color: #0d6efd;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Por defecto no agregamos padding-top; lo maneja JS cuando el header pasa a sticky */
body {
    background-color: #f8f9fa;
    margin:0;
}

.hero-section {
    min-height: 85vh;
    color: #fff;
}

.hero-bg img {
    object-fit: cover;
    filter: brightness(0.75);
}

.hero-bg .overlay {
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0.6));
}

/* Animación de entrada */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ajustes responsive */
@media (min-width: 768px) {
    .hero-section {
        text-align: left;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 80px 15px;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .hero-section p {
        font-size: 1rem;
    }
}