.header-titan {
    position: fixed; 
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.header-titan.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
}

body {
    padding-top: 90px; /* Reducido significativamente */
}

/* Ajuste dinámico del padding según el tamaño del header */
@media (max-width: 992px) {
    body {
        padding-top: 85px; /* Reducido */
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Mucho más compacto en móvil */
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 65px; /* Mínimo en móvil pequeño */
    }
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */

.header-top {
    padding: 0.5rem 0; /* Reducido de 1rem a 0.5rem */
    background: transparent;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem; /* Reducido */
}

/* ============================================
   SECCIÓN DEL LOGO
   ============================================ */

.header-logo-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem; /* Reducido */
}

.header-logo-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.header-logo-link:hover {
    transform: scale(1.02);
}

.header-logo-container {
    display: flex;
    align-items: center;
    gap: 0.6rem; /* Reducido */
}

/* Logo Image */
.header-logo-picture {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(74, 144, 226, 0.1);
    padding: 2px; /* Reducido de 4px a 2px */
    border: 1px solid rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.header-logo-picture:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.5);
}

.header-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    max-width: 36px; /* Limitar el tamaño máximo */
    max-height: 36px;
}

/* Logo Fallback */
.header-logo-fallback {
    width: 40px;
    height: 40px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(74, 144, 226, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    flex-shrink: 0;
}

.header-logo-icon {
    font-size: 1.2rem; /* Reducido */
    color: #4A90E2;
}

/* Brand Info */
.header-brand-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.header-brand-name {
    font-size: 1.6rem; /* Reducido de 2rem */
    font-weight: 800;
    color: #4A90E2;
    margin: 0;
    line-height: 1;
    letter-spacing: 0.5px;
}

.header-brand-subtitle {
    font-size: 0.7rem; /* Reducido */
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.header-tagline {
    font-size: 0.65rem; /* Reducido */
    color: #777;
    font-weight: 300;
    font-style: italic;
    margin-left: 46px; /* Ajustado al nuevo tamaño del logo */
}

/* ============================================
   INFORMACIÓN DE CONTACTO
   ============================================ */

.header-contact-info {
    display: flex;
    align-items: center;
    gap: 1rem; /* Reducido */
    flex-wrap: wrap;
}

.header-contact-item {
    display: flex;
    align-items: center;
    gap: 0.4rem; /* Reducido */
    padding: 0.4rem 0.8rem; /* Reducido */
    background: rgba(74, 144, 226, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.2);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 160px; /* Reducido */
    color: #333;
    text-decoration: none;
}

.header-contact-item:hover {
    background: rgba(74, 144, 226, 0.1);
    border-color: rgba(74, 144, 226, 0.4);
    transform: translateY(-1px); /* Reducido */
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.2);
}

.header-contact-icon {
    width: 16px; /* Reducido */
    height: 16px;
    color: #4A90E2;
    flex-shrink: 0;
}

.header-contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.header-contact-value {
    color: #333;
    font-weight: 600;
    font-size: 0.75rem; /* Reducido */
    line-height: 1.2;
}

.header-contact-label {
    color: #666;
    font-size: 0.65rem; /* Reducido */
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   NAVEGACIÓN
   ============================================ */

.header-navigation {
    background: rgba(74, 144, 226, 0.05);
    border-top: 1px solid rgba(74, 144, 226, 0.1);
}

.header-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.header-nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.header-nav-item {
    position: relative;
}

.header-nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem; /* Reducido */
    padding: 0.6rem 1rem; /* Reducido */
    color: #4A90E2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem; /* Reducido */
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.header-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 144, 226, 0.1), transparent);
    transition: left 0.5s ease;
}

.header-nav-link:hover::before {
    left: 100%;
}

.header-nav-link:hover {
    background: rgba(74, 144, 226, 0.1);
    color: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.2);
}

.header-nav-icon {
    width: 16px; /* Reducido */
    height: 16px;
    opacity: 0.8;
}

.header-nav-text {
    font-weight: 600;
}

.header-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #4A90E2;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.header-nav-link:hover::after {
    width: 80%;
}

/* Mobile Menu Button */
.header-mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 3px; /* Reducido */
    background: rgba(74, 144, 226, 0.1);
    border: 1px solid rgba(74, 144, 226, 0.3);
    padding: 0.4rem; /* Reducido */
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 5px;
    position: absolute;
    right: 2rem;
}

.header-mobile-menu-btn:hover {
    background: rgba(74, 144, 226, 0.2);
}

.header-menu-line {
    width: 20px; /* Reducido */
    height: 2px; /* Reducido */
    background: #4A90E2;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.header-mobile-menu-btn.header-active .header-menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header-mobile-menu-btn.header-active .header-menu-line:nth-child(2) {
    opacity: 0;
}

.header-mobile-menu-btn.header-active .header-menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .header-contact-info {
        gap: 0.8rem;
    }
    
    .header-contact-item {
        min-width: 140px;
    }
}

@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        gap: 0.8rem; /* Reducido */
        text-align: center;
    }
    
    .header-tagline {
        margin-left: 0;
        text-align: center;
    }
    
    .header-contact-info {
        justify-content: center;
        gap: 0.6rem;
    }
    
    .header-brand-name {
        font-size: 1.4rem; /* Reducido */
    }
}

@media (max-width: 768px) {
    .header-top {
        padding: 0.3rem 0; /* Muy reducido */
    }
    
    .header-container {
        padding: 0 1rem;
        gap: 0.5rem; /* Muy reducido */
    }
    
    .header-logo-container {
        gap: 0.4rem;
    }
    
    .header-logo-picture, .header-logo-fallback {
        width: 32px; /* Muy reducido */
        height: 32px;
        padding: 1px; /* Muy reducido */
    }
    
    .header-logo-image {
        max-width: 30px; /* Limitar en móvil */
        max-height: 30px;
    }
    
    .header-brand-name {
        font-size: 1.2rem; /* Muy reducido */
    }
    
    .header-brand-subtitle {
        font-size: 0.6rem;
    }
    
    .header-tagline {
        font-size: 0.6rem;
        margin-left: 36px; /* Ajustado */
    }
    
    .header-contact-info {
        flex-direction: column;
        gap: 0.3rem; /* Muy reducido */
        width: 100%;
    }
    
    .header-contact-item {
        width: 100%;
        min-width: auto;
        justify-content: center;
        padding: 0.3rem 0.6rem; /* Muy reducido */
    }
    
    /* Mobile Navigation */
    .header-mobile-menu-btn {
        display: flex;
    }
    
    .header-nav-links {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        gap: 0;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        border-top: 1px solid rgba(74, 144, 226, 0.2);
    }
    
    .header-nav-links.header-mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .header-nav-link {
        padding: 0.8rem 2rem; /* Reducido */
        border-radius: 0;
        border-bottom: 1px solid rgba(74, 144, 226, 0.1);
        justify-content: center;
        color: #4A90E2;
    }
    
    .header-nav-link:hover {
        transform: none;
        background: rgba(74, 144, 226, 0.1);
    }

    .header-nav-container {
        padding: 1rem 2rem; /* Reducido */
    }
}

@media (max-width: 480px) {
    .header-brand-name {
        font-size: 1rem; /* Muy reducido */
    }
    
    .header-logo-picture, .header-logo-fallback {
        width: 28px; /* Muy reducido */
        height: 28px;
        padding: 1px;
    }
    
    .header-logo-image {
        max-width: 26px; /* Limitar en móvil pequeño */
        max-height: 26px;
    }
    
    .header-tagline {
        margin-left: 32px;
        font-size: 0.55rem;
    }
    
    .header-contact-item {
        padding: 0.25rem 0.5rem; /* Muy reducido */
    }
    
    .header-contact-value {
        font-size: 0.7rem;
    }
    
    .header-contact-label {
        font-size: 0.6rem;
    }
}

/* ============================================
   ANIMACIONES Y EFECTOS
   ============================================ */

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

.header-titan {
    animation: slideDown 0.6s ease-out;
}

.header-logo-image {
    animation: logoFadeIn 1s ease-out;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Prevenir scroll del body cuando el menú móvil está abierto */
body.header-menu-open {
    overflow: hidden;
}

/* ============================================
   SCROLL EFFECTS 
   ============================================ */

/* Efecto de scroll para cambiar el header */
.header-titan.header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
}

/* Clase para detectar scroll */
.header-scrolled .header-brand-name {
    font-size: 1.4rem; /* Reducido */
    transition: font-size 0.3s ease;
}

@media (max-width: 768px) {
    .header-scrolled .header-brand-name {
        font-size: 1rem; /* Muy reducido */
    }
}

/* ============================================
   SMOOTH SCROLL PARA ANCHORS
   ============================================ */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Reducido para el nuevo header */
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 80px; /* Muy reducido en móvil */
    }
}