/**
 * midam.top 통합 헤더 (메인 mockup 기준)
 */

.top-info {
    position: sticky;
    top: 0;
    z-index: 102;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 20px;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.top-info .rates { color: #64748b; }
.top-info .rates span:first-child { color: #2563eb; font-weight: 600; }
.top-info .user-menu { display: flex; align-items: center; gap: 8px; }
.top-info .user-menu a {
    color: #334155;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
}
.top-info .user-menu .highlight { color: #2563eb; font-weight: 600; }
.top-info .user-menu .separator { color: #cbd5e1; }
.top-info .user-menu .btn-charge {
    background: #10b981;
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #e8eef5;
    position: sticky;
    top: 0;
    z-index: 101;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.top-info + .site-header { top: 37px; }

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 80px;
}

.site-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    width: 180px;
    height: 54px;
    min-height: 54px;
    min-width: 180px;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}
.site-brand-name {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
    line-height: 1;
}
.site-brand picture,
.site-brand-logo,
.site-brand picture img {
    display: block;
    height: 54px;
    width: auto;
    max-width: 180px;
    max-height: 54px;
    object-fit: contain;
    object-position: center center;
}
.site-brand-tag {
    font-size: 0.78rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-link-btn,
.header-outline-btn,
.header-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.header-link-btn {
    color: #334155;
    background: transparent;
}
.header-link-btn:hover { color: #2563eb; }

.header-outline-btn {
    color: #2563eb;
    background: #fff;
    border: 1.5px solid #bfdbfe;
}
.header-outline-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.header-primary-btn {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.header-primary-btn:hover,
.header-primary-btn:focus-visible {
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    filter: none;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* 레거시 서브 네비 (내부 페이지) */
.sub-nav {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    padding: 0 20px;
}
.sub-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 4px;
}
.sub-nav a {
    color: rgba(255, 255, 255, 0.88);
    padding: 11px 16px;
    font-size: 0.9rem;
    text-decoration: none;
}
.sub-nav a:hover,
.sub-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 768px) {
    .site-header-inner { padding: 12px 16px; min-height: 64px; }
    .site-brand-tag { display: none; }
    .site-brand { width: 144px; height: 45px; min-height: 45px; min-width: 144px; }
    .site-brand picture img,
    .site-brand-logo { height: 45px; max-width: 144px; max-height: 45px; }
    .header-link-btn span,
    .header-outline-btn span { display: none; }
    .header-link-btn,
    .header-outline-btn,
    .header-primary-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}
