/* ===== TOP BAR ===== */
.top-bar {
    background: var(--cicc-navy, #0a1628);
    color: #e2e8f0;
    font-size: 0.75rem;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.top-bar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.375rem 1.5rem;
    max-width: var(--site-shell-width, 1200px);
    margin: 0 auto;
}

/* Ecosystem links - left */
.top-bar-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.625rem;
}
.top-bar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
}
.top-bar-brand:hover { color: #fbbf24; }
.eco-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #94a3b8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.75rem;
}
.eco-link:hover {
    color: #fff;
    background: rgba(251,191,36,0.15);
    border-color: rgba(251,191,36,0.3);
    transform: translateY(-1px);
}
.eco-cicc:hover { background: rgba(251,191,36,0.15); border-color: rgba(251,191,36,0.4); }
.eco-lean:hover { background: rgba(13,148,136,0.15); border-color: rgba(13,148,136,0.4); }
.eco-train:hover { background: rgba(59,130,246,0.15); border-color: rgba(59,130,246,0.4); }
.eco-ai { color: #c4b5fd; }
.eco-ai:hover, .eco-ai.is-current { background: rgba(139,92,246,0.18); border-color: rgba(167,139,250,0.55); color: #ede9fe; }
.eco-train:hover { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.4); }
.eco-icon { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; }
.eco-icon img { display: block; width: 20px; height: 20px; }
.eco-text { font-weight: 600; font-size: 0.75rem; }

/* Top search form - center column */
.top-bar-center { display: flex; justify-content: center; }
.top-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 360px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.25s ease;
}
.top-search-form:focus-within {
    background: rgba(255,255,255,0.1);
    border-color: rgba(251,191,36,0.4);
    box-shadow: 0 0 0 3px rgba(251,191,36,0.12);
}
.top-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    outline: none;
    min-width: 0;
}
.top-search-input::placeholder { color: #64748b; }
.top-search-submit {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.375rem 0.625rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.top-search-submit:hover { color: #fbbf24; }

/* Right side links */
.top-bar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
}
.top-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #94a3b8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-size: 0.75rem;
}
.top-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
.top-phone:hover { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); }
.top-login:hover { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.3); }

/* ===== MAIN HEADER ===== */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--cicc-gray-200, #e2e8f0);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 3px rgba(10,22,40,0.05);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.875rem 2rem;
    max-width: var(--site-shell-width, 1200px);
    margin: 0 auto;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--cicc-navy, #0a1628);
    font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
    text-decoration: none;
    flex-shrink: 0;
    height: 48px;
    min-width: 178px;
}
.site-branding {
    flex-shrink: 0;
}
.site-logo:hover { color: var(--cicc-blue, #1e3a8a); }
.site-logo-image { display: block; width: 178px !important; height: 40px; object-fit: contain; object-position: left center; }
.logo-icon { display: inline-flex; width: 40px; height: 40px; flex: 0 0 40px; }
.logo-icon img { display: block; width: 100%; height: 100%; }
.logo-text { line-height: 1.2; }
.logo-text strong { color: var(--cicc-blue, #2563eb); }
.logo-text small { display: block; margin-top: 2px; color: #64748b; font-size: .56rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.logo-text { white-space: nowrap; }

/* Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}
.main-navigation .menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: center;
}
.main-navigation .menu > li {
    position: relative;
}
.main-navigation .menu > li > a {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 0.625rem;
    color: var(--cicc-gray-600, #475569);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 1;
}
.main-navigation .menu > li > a:hover,
.main-navigation .menu > li.current-menu-item > a,
.main-navigation .menu > li.current-menu-ancestor > a {
    color: var(--cicc-blue, #1e3a8a);
    background: rgba(30,58,138,0.08);
}
.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--cicc-gray-200, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(10,22,40,0.1), 0 4px 6px -2px rgba(10,22,40,0.05);
    min-width: 200px;
    padding: 0.375rem 0;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}
.main-navigation .menu > li:hover > .sub-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-navigation .sub-menu li { list-style: none; }
.main-navigation .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--cicc-gray-600, #475569);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.main-navigation .sub-menu a:hover {
    color: var(--cicc-blue, #1e3a8a);
    background: rgba(30,58,138,0.06);
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 48px;
    padding: 0 1.25rem;
    background: var(--cicc-gold-bright, #fbbf24);
    color: var(--cicc-navy, #0a1628);
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(251,191,36,0.25);
}
.btn-cta:hover {
    background: #f59e0b;
    color: var(--cicc-navy, #0a1628);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(251,191,36,0.35);
}
.btn-cta-case {
    background: transparent;
    color: var(--cicc-navy, #0a1628);
    border: 1.5px solid var(--cicc-gray-200, #e2e8f0);
    box-shadow: none;
}
.btn-cta-case:hover {
    border-color: var(--cicc-blue, #1e3a8a);
    color: var(--cicc-blue, #1e3a8a);
    background: rgba(30,58,138,0.06);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    width: 48px;
    height: 48px;
    padding: 0;
    color: var(--cicc-navy, #0a1628);
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}
.mobile-menu-toggle:hover { background: var(--cicc-gray-100, #f1f5f9); }

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,22,40,0.96);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem;
}
.search-overlay.active {
    opacity: 1;
    visibility: visible;
}
.search-overlay-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.search-overlay-close:hover {
    background: var(--cicc-gold-bright, #fbbf24);
    border-color: var(--cicc-gold-bright, #fbbf24);
    color: var(--cicc-navy, #0a1628);
    transform: rotate(90deg);
}
.search-overlay-box {
    width: 100%;
    max-width: 680px;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.search-overlay-form {
    display: flex;
    gap: 0.75rem;
}
.search-overlay-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 1.125rem 1.5rem;
    font-size: 1.25rem;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}
.search-overlay-input::placeholder { color: #64748b; }
.search-overlay-input:focus {
    border-color: var(--cicc-blue, #1e3a8a);
    box-shadow: 0 0 0 4px rgba(30,58,138,0.2);
    background: rgba(255,255,255,0.08);
}
.search-overlay-submit {
    background: var(--cicc-gold-bright, #fbbf24);
    color: var(--cicc-navy, #0a1628);
    border: none;
    padding: 1.125rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.search-overlay-submit:hover {
    background: #f59e0b;
    transform: scale(1.02);
}
.search-hint {
    text-align: center;
    color: #64748b;
    font-size: 0.8125rem;
    margin-top: 1rem;
}
.search-hint kbd {
    background: rgba(255,255,255,0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-family: inherit;
    margin: 0 0.25rem;
}

/* Language switcher */
.lang-switcher { display: inline-flex; align-items: center; gap: 0.125rem; margin-left: 0.25rem; }
.lang-btn { display: inline-block; padding: 0.2rem 0.4rem; font-size: 0.6875rem; font-weight: 700; color: #64748b; text-decoration: none; border-radius: 3px; transition: all 0.2s; letter-spacing: 0.05em; }
.lang-btn:hover, .lang-btn.active { color: #fbbf24; background: rgba(251,191,36,0.1); }
.lang-sep { color: #475569; font-size: 0.625rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .top-bar-inner { gap: 0.75rem; padding: 0.375rem 1rem; }
    .top-bar-left { gap: 0.375rem; }
    .eco-text { display: none; }
    .eco-link { padding: 0.25rem; }
    .top-search-form { max-width: 280px; }
    .top-bar-right { gap: 0.375rem; }
    .top-link span { display: none; }
    .top-link { padding: 0.25rem; }
    .header-inner { padding: 0.75rem 1rem; gap: 1.5rem; }
    .main-navigation .menu > li > a { padding: 0 0.75rem; font-size: 0.8125rem; }
}

@media (max-width: 768px) {
    .top-bar { font-size: 0.75rem; }
    .top-bar-inner { grid-template-columns: 1fr; gap: 0.5rem; padding: 0.5rem 1rem; }
    .top-bar-left { justify-content: center; flex-wrap: wrap; }
    .top-search-form { max-width: none; }
    .top-bar-right { justify-content: center; flex-wrap: wrap; }
    .eco-text { display: inline; }
    .eco-link { padding: 0.375rem 0.75rem; }
    
    .header-inner { flex-wrap: nowrap; }
    .main-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--cicc-gray-200, #e2e8f0); box-shadow: 0 10px 25px -5px rgba(10,22,40,0.1); padding: 1rem; z-index: 99; }
    .main-navigation.active { display: block; }
    .main-navigation .menu { flex-direction: column; align-items: stretch; gap: 0; }
    .main-navigation .menu > li > a { padding: 0.875rem 1rem; border-radius: 8px; }
    .main-navigation .sub-menu { position: static; display: none; box-shadow: none; border: none; border-radius: 0; background: var(--cicc-gray-50, #f1f5f9); margin-top: 0.25rem; padding: 0; min-width: auto; }
    .main-navigation .menu > li.open > .sub-menu { display: block; }
    .main-navigation .sub-menu a { padding: 0.625rem 1rem 0.625rem 2rem; }
    .mobile-menu-toggle { display: flex; }
    .header-actions .btn-cta span { display: none; }
    .header-actions .btn-cta { width: 48px; padding: 0; justify-content: center; }
    .header-actions .btn-cta-case { display: none; }
    .header-actions { gap: 0.5rem; }
    .site-logo { min-width: 0; }
    .site-logo-image { width: 156px; }
}

/* Tablet header: keep the long primary menu inside a clean drawer instead of
 * squeezing it between the logo and the trial CTA. */
@media (max-width: 1180px) and (min-width: 769px) {
    .header-inner { gap: 1rem; padding-inline: 1.25rem; }
    .main-navigation { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--cicc-gray-200, #e2e8f0); box-shadow: 0 10px 25px -5px rgba(10,22,40,0.1); padding: 1rem; z-index: 99; }
    .main-navigation.active { display: block; }
    .main-navigation .menu { flex-direction: column; align-items: stretch; gap: 0; }
    .main-navigation .menu > li > a { padding: 0.875rem 1rem; border-radius: 8px; }
    .main-navigation .sub-menu { position: static; display: none; box-shadow: none; border: none; border-radius: 0; background: var(--cicc-gray-50, #f1f5f9); margin-top: 0.25rem; padding: 0; min-width: auto; }
    .main-navigation .menu > li.open > .sub-menu { display: block; }
    .main-navigation .sub-menu a { padding: 0.625rem 1rem 0.625rem 2rem; }
    .mobile-menu-toggle { display: flex; }
    .header-actions { gap: 0.5rem; }
}

@media (max-width: 900px) and (min-width: 769px) {
    .header-actions .btn-cta span { display: none; }
    .header-actions .btn-cta { width: 48px; padding: 0; justify-content: center; }
    .site-logo-image { width: 156px !important; }
}
