/**
 * Header Moderno y Elegante - ServiKN
 * Optimizado para móvil y desktop
 */

/* ==========================================================================
   HEADER MODERNO - ESTRUCTURA
   ========================================================================== */

.site-header-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header-modern.scrolled {
    box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}

.container-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   TOP BAR ELEGANTE
   ========================================================================== */

.header-topbar {
    background: linear-gradient(135deg, var(--dark), #2d3748);
    color: var(--white);
    padding: 0.6rem 0;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-topbar .container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left, .topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s ease;
}

.topbar-item:hover {
    color: var(--secondary);
    transform: translateY(-1px);
}

.topbar-item svg {
    opacity: 0.9;
}

.topbar-text {
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.topbar-social {
    display: flex;
    gap: 0.8rem;
}

.topbar-social a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.topbar-social a:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* ==========================================================================
   MAIN HEADER - NAVEGACIÓN
   ========================================================================== */

.header-main-modern {
    background: var(--white);
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.header-main-modern .container-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo Elegante */
.brand-modern {
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.logo-icon {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.logo-name {
    display: flex;
    flex-direction: column;
}

.logo-primary {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.logo-accent {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.logo-tagline {
    font-size: 0.65rem;
    color: var(--text-light);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.logo-wrapper img {
    max-height: 60px;
    width: auto;
}

/* Navigation Desktop */
.nav-modern {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list-modern {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-item-modern {
    position: relative;
}

.nav-link-modern {
    display: block;
    padding: 0.8rem 1.2rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link-modern::before {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-link-modern:hover {
    color: var(--primary);
    background: rgba(0,102,204,0.05);
}

.nav-link-modern:hover::before {
    transform: translateX(-50%) scaleX(1);
}

.nav-item-modern.current-menu-item .nav-link-modern,
.nav-link-modern.active {
    color: var(--primary);
    background: rgba(0,102,204,0.08);
}

.nav-link-modern.active::before {
    transform: translateX(-50%) scaleX(1);
}

/* Header Actions */
.header-actions-modern {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.search-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text);
}

.search-toggle:hover {
    background: var(--primary);
    color: var(--white);
    transform: rotate(90deg);
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0,102,204,0.25);
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,102,204,0.35);
    color: var(--white);
}

.btn-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-gradient span, .btn-gradient svg {
    position: relative;
    z-index: 1;
}

/* Hamburger Modern */
.hamburger-modern {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-modern .bar {
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-modern.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-modern.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-modern.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==========================================================================
   SEARCH BAR
   ========================================================================== */

.search-bar-modern {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--light);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-bar-modern.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-bar-modern .container-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.search-form-modern {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--light);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
}

.search-form-modern input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: var(--text);
}

.search-form-modern button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    padding: 0;
    display: flex;
}

.search-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-close:hover {
    background: var(--light);
    transform: rotate(90deg);
}

/* ==========================================================================
   MOBILE MENU MODERN
   ========================================================================== */

.mobile-overlay-modern {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1100;
}

.mobile-overlay-modern.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-modern {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--white);
    box-shadow: -10px 0 50px rgba(0,0,0,0.2);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1200;
    overflow-y: auto;
}

.mobile-menu-modern.active {
    right: 0;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.mobile-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.mobile-close {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--white);
    transition: all 0.3s ease;
}

.mobile-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.mobile-navigation {
    padding: 1rem 0;
}

.mobile-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid var(--light);
}

.mobile-menu-list a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-menu-list a:hover {
    background: var(--light);
    color: var(--primary);
    padding-left: 2rem;
}

.mobile-menu-list i {
    font-size: 1.1rem;
    width: 24px;
    color: var(--secondary);
}

.mobile-footer {
    padding: 1.5rem;
    background: var(--light);
    margin-top: 1rem;
}

.mobile-contact-info h4 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.mobile-contact-link {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-contact-link:hover {
    background: var(--white);
}

.mobile-contact-link i {
    color: var(--primary);
    width: 20px;
}

.btn-mobile-cta {
    display: block;
    width: 100%;
    padding: 1rem;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,102,204,0.3);
    transition: all 0.3s ease;
}

.btn-mobile-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,102,204,0.4);
}

.mobile-social {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.mobile-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s ease;
}

.mobile-social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
    .header-topbar {
        display: none;
    }
    
    .nav-modern {
        display: none;
    }
    
    .search-toggle {
        display: none;
    }
    
    .hamburger-modern {
        display: flex;
    }
    
    .logo-tagline {
        display: none;
    }
    
    .btn-modern span {
        display: none;
    }
    
    .btn-modern {
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 768px) {
    .container-header {
        padding: 0 1rem;
    }
    
    .header-main-modern {
        padding: 0.8rem 0;
    }
    
    .logo-primary, .logo-accent {
        font-size: 1.5rem;
    }
    
    .btn-modern {
        padding: 0.7rem;
    }
}

/* ==========================================================================
   DROPDOWN MENU ESTILOS
   ========================================================================== */

.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link-modern {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-dropdown .nav-link-modern svg {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-link-modern svg {
    transform: rotate(180deg);
}

.dropdown-menu-modern {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.08);
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    margin-top: 0.5rem;
}

.nav-dropdown:hover .dropdown-menu-modern {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-content {
    padding: 1rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-bottom: 0.3rem;
}

.dropdown-item:hover {
    background: #f8f9ff;
    color: var(--primary);
    transform: translateX(5px);
}

.dropdown-icon {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
}

.dropdown-text {
    flex: 1;
}

.dropdown-text strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.dropdown-text small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.dropdown-footer {
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 0.8rem;
    margin-top: 0.5rem;
}

.dropdown-all {
    display: block;
    text-align: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dropdown-all:hover {
    background: rgba(0,102,204,0.1);
}

/* Ajuste para contenido */
body {
    padding-top: 140px;
}

@media (max-width: 992px) {
    body {
        padding-top: 70px;
    }
    
    .dropdown-menu-modern {
        display: none;
    }
}

