/* css/header.css - CORREGIDO CON HEADER FIJO */

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--light-color);
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    height: 80px;
    position: relative;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-md);
    width: 100%;
}

/* HEADER FIJO - NUEVA CLASE */
.header-fixed {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999 !important;
    width: 100% !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* COMPENSACIÓN PARA EL CONTENIDO PRINCIPAL */
.header-fixed+.main-content,
.main-container:has(.header-fixed) .main-content {
    margin-top: 80px;
}

@media (min-width: 1200px) {

    .header-fixed+.main-content,
    .main-container:has(.header-fixed) .main-content {
        margin-top: 80px;
    }
}

@media (min-width: 1400px) {

    .header-fixed+.main-content,
    .main-container:has(.header-fixed) .main-content {
        margin-top: 90px;
    }
}

@media (min-width: 1600px) {

    .header-fixed+.main-content,
    .main-container:has(.header-fixed) .main-content {
        margin-top: 100px;
    }
}

@media (min-width: 1920px) {

    .header-fixed+.main-content,
    .main-container:has(.header-fixed) .main-content {
        margin-top: 110px;
    }
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="" viewBox="0 0 100 20" fill="rgba(255,255,255,0.05)"><circle cx="10" cy="10" r="8"/><circle cx="30" cy="10" r="8"/><circle cx="50" cy="10" r="8"/><circle cx="70" cy="10" r="8"/><circle cx="90" cy="10" r="8"/></svg>') repeat-x;
    pointer-events: none;
}

/* AJUSTES PARA PANTALLAS GRANDES */
@media (min-width: 1200px) {
    .header {
        height: 80px;
        justify-content: center;
        padding: var(--spacing-sm) 0;
    }

    /* Contenedor interno del header */
    .header-inner {
        width: 100%;
        max-width: 1200px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 var(--spacing-lg);
    }
}

@media (min-width: 1400px) {
    .header {
        height: 90px;
    }

    .header-inner {
        max-width: 1400px;
    }
}

@media (min-width: 1600px) {
    .header {
        height: 100px;
    }

    .header-inner {
        max-width: 1600px;
    }
}

@media (min-width: 1920px) {
    .header {
        height: 110px;
    }

    .header-inner {
        max-width: 1800px;
    }
}

/* Sección de logos - TAMAÑOS CORREGIDOS */
.logos-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.ipa-logo {
    height: 70px;
    display: flex;
    align-items: center;
}

.electrodata-logo {
    height: 75px;
    display: flex;
    align-items: center;
}

/* LOGOS CORREGIDOS - MÁS CONSERVADORES */
@media (min-width: 1400px) {
    .logos-section {
        gap: var(--spacing-xl);
    }

    .ipa-logo {
        height: 72px;
    }

    .electrodata-logo {
        height: 77px;
    }

    .partnership-indicator {
        font-size: 1.6rem;
    }
}

@media (min-width: 1600px) {
    .ipa-logo {
        height: 75px;
    }

    .electrodata-logo {
        height: 80px;
    }

    .partnership-indicator {
        font-size: 1.8rem;
    }
}

@media (min-width: 1920px) {
    .ipa-logo {
        height: 78px;
    }

    .electrodata-logo {
        height: 83px;
    }

    .partnership-indicator {
        font-size: 2rem;
    }
}

.ipa-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.partnership-indicator {
    font-size: var(--font-size-xl);
    color: var(--accent-color);
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }

    50% {
        transform: scale(1.1);
        text-shadow: 0 0 10px var(--accent-color);
    }
}

.electrodata-logo {
    height: 75px;
    display: flex;
    align-items: center;
}

.electrodata-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
    max-width: 200px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* CTA del header */
.header-cta-section {
    position: relative;
    z-index: 2;
}

.main-header-cta {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c00 100%);
    color: var(--light-color);
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-pill);
    font-size: var(--font-size-sm);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
    transition: all var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

/* BOTÓN HEADER MÁS GRANDE */
@media (min-width: 1400px) {
    .main-header-cta {
        padding: 12px 24px;
        font-size: var(--font-size-base);
        gap: var(--spacing-md);
    }

    .main-header-cta i {
        font-size: var(--font-size-lg);
    }
}

@media (min-width: 1600px) {
    .main-header-cta {
        padding: 14px 28px;
        font-size: var(--font-size-lg);
    }

    .main-header-cta i {
        font-size: var(--font-size-xl);
    }
}

@media (min-width: 1920px) {
    .main-header-cta {
        padding: 16px 32px;
        font-size: var(--font-size-xl);
    }

    .main-header-cta i {
        font-size: var(--font-size-2xl);
    }
}

.main-header-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.main-header-cta:hover::before {
    left: 100%;
}

.main-header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.5);
}

.main-header-cta:active {
    transform: translateY(0);
}

.main-header-cta i {
    font-size: var(--font-size-base);
    animation: rocket-bounce 2s ease-in-out infinite;
}

@keyframes rocket-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* Información del header - MÁS GRANDE */
.header-info {
    font-size: var(--font-size-xs);
    text-align: right;
    position: relative;
    z-index: 2;
    line-height: 1.4;
}

/* INFO HEADER MÁS GRANDE */
@media (min-width: 1400px) {
    .header-info {
        font-size: var(--font-size-sm);
        line-height: 1.5;
    }

    .anniversary-badge {
        font-size: var(--font-size-sm);
        padding: 4px 12px;
        margin-bottom: 6px;
    }

    .header-info>div {
        margin-bottom: 4px;
    }
}

@media (min-width: 1600px) {
    .header-info {
        font-size: var(--font-size-base);
    }

    .anniversary-badge {
        font-size: var(--font-size-base);
        padding: 6px 16px;
        margin-bottom: 8px;
    }

    .header-info>div {
        margin-bottom: 6px;
    }
}

@media (min-width: 1920px) {
    .header-info {
        font-size: var(--font-size-lg);
    }

    .anniversary-badge {
        font-size: var(--font-size-lg);
        padding: 8px 20px;
        margin-bottom: 10px;
    }

    .header-info>div {
        margin-bottom: 8px;
    }
}

.header-info>div {
    margin-bottom: 2px;
}

.header-info>div:last-child {
    margin-bottom: 0;
}

.anniversary-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xs);
    margin-bottom: 3px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
}

.header-info i {
    margin-right: 4px;
    opacity: 0.9;
}

/* RESPONSIVE MÓVIL - HEADER FIJO */
@media (max-width: 768px) {
    .header {
        height: 70px;
        padding: var(--spacing-sm) var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .header-fixed {
        position: fixed !important;
        top: 0;
        z-index: 9999 !important;
    }

    .header-fixed+.main-content,
    .main-container:has(.header-fixed) .main-content {
        margin-top: 70px !important;
    }

    .header-inner {
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
    }

    .logos-section {
        gap: var(--spacing-sm);
        justify-content: flex-start;
        flex: 1;
    }

    .ipa-logo {
        height: 40px;
    }

    .electrodata-logo {
        height: 38px;
    }

    .partnership-indicator {
        font-size: var(--font-size-lg);
    }

    .header-cta-section {
        flex-shrink: 0;
    }

    .main-header-cta {
        font-size: var(--font-size-sm);
        padding: var(--spacing-sm) var(--spacing-md);
    }

    /* Ocultar información del header en móvil */
    .header-info {
        display: none;
    }
}

@media (max-width: 480px) {
    .header {
        padding: var(--spacing-sm);
        gap: var(--spacing-xs);
        height: 60px;
    }

    .header-fixed+.main-content,
    .main-container:has(.header-fixed) .main-content {
        margin-top: 60px !important;
    }

    .logos-section {
        gap: var(--spacing-xs);
    }

    .ipa-logo {
        height: 35px;
    }

    .electrodata-logo {
        height: 32px;
    }

    .partnership-indicator {
        font-size: var(--font-size-base);
    }

    .main-header-cta {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs) var(--spacing-sm);
        white-space: nowrap;
    }
}

/* MEJORAS PARA SCROLL SUAVE Y HEADER FIJO */
.header-fixed {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Estado de scroll hacia abajo */
.header-hidden {
    transform: translateY(-100%);
    opacity: 0.9;
}

/* Estado de scroll hacia arriba */
.header-visible {
    transform: translateY(0);
    opacity: 1;
}

/* BACKDROP BLUR MEJORADO PARA HEADER FIJO */
.header-fixed {
    background: linear-gradient(135deg, rgba(0, 123, 140, 0.95) 0%, rgba(32, 178, 170, 0.95) 100%);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* COMPATIBILIDAD PARA NAVEGADORES SIN BACKDROP-FILTER */
@supports not (backdrop-filter: blur(15px)) {
    .header-fixed {
        background: linear-gradient(135deg, rgba(0, 123, 140, 0.98) 0%, rgba(32, 178, 170, 0.98) 100%);
    }
}

/* ACCESIBILIDAD PARA HEADER FIJO */
@media (prefers-reduced-motion: reduce) {
    .header-fixed {
        transition: none;
    }

    .header-hidden,
    .header-visible {
        transition: none;
    }
}

/* SCROLL SNAP PARA MEJOR UX CON HEADER FIJO */
html {
    scroll-padding-top: 80px;
}

@media (min-width: 1400px) {
    html {
        scroll-padding-top: 90px;
    }
}

@media (min-width: 1600px) {
    html {
        scroll-padding-top: 100px;
    }
}

@media (min-width: 1920px) {
    html {
        scroll-padding-top: 110px;
    }
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}

@media (max-width: 480px) {
    html {
        scroll-padding-top: 60px;
    }
}