/* ==========================================================================
   Shared Components - Top Bar, Header, Nav, Footer
   ========================================================================== */

/* Top Bar */
.top-bar {
    background: #3d444b;
    color: var(--bg-white);
    padding: 10px 0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
}

.top-bar-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.member-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    margin-right: 24px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #4db8d5 100%);
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-badge svg {
    width: 14px;
    height: 14px;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.top-bar a:hover {
    opacity: 0.8;
}

.top-bar-links {
    display: flex;
    gap: 24px;
}

/* Header */
header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    padding: 32px 0;
}

.header-main {
    text-align: center;
    margin-bottom: 24px;
}

.masthead {
    font-family: 'Cormorant Garamond', serif;
    font-size: 72px;
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}

.masthead-sub {
    font-family: 'Cormorant Garamond', serif;
    font-size: 72px;
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--accent-warm);
    display: inline;
}

.tagline {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

nav a {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
}

nav a:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.nav-account {
    background: var(--accent-warm);
    color: white !important;
    padding: 10px 24px !important;
    border-radius: 2px;
    border-bottom: none !important;
    margin-left: 0;
}

.nav-account:hover {
    background: var(--accent-gold);
}

/* Footer */
footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand {
    font-family: 'Cormorant Garamond', serif;
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 0;
    line-height: 1;
}

.footer-logo-sub {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--accent-warm);
    margin-bottom: 16px;
    line-height: 1;
}

.footer-description {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-column h4 {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-tertiary);
    margin-bottom: 20px;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--accent-warm);
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-tertiary);
}

.footer-bottom a {
    color: var(--text-tertiary);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--accent-warm);
}

/* Breadcrumb */
.article-breadcrumb {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.article-breadcrumb a {
    color: var(--accent-warm);
    text-decoration: none;
}

.article-breadcrumb a:hover {
    text-decoration: underline;
}

.article-breadcrumb span {
    margin: 0 8px;
}

/* Category Article Pattern (used on homepage and category pages) */
.category-article {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-light);
}

.category-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.category-article-category {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-warm);
    margin-bottom: 8px;
}

.category-article h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
}

.category-article h4 a {
    color: inherit;
    text-decoration: none;
}

.category-article h4 a:hover {
    color: var(--accent-primary);
}

.category-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-tertiary);
}

.category-article-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-warm) 0%, var(--accent-gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

/* Expert Card Pattern */
.experts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.expert-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.expert-card:hover {
    border-color: var(--accent-warm);
}

.expert-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 16px;
    overflow: hidden;
    background: var(--border-light);
}

.expert-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.expert-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-warm) 0%, var(--accent-gold) 100%);
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 600;
    color: white;
}

.expert-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.expert-name a {
    color: inherit;
    text-decoration: none;
}

.expert-name a:hover {
    color: var(--accent-primary);
}

.expert-role {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Premium Badge */
.premium-badge-container {
    text-align: left;
    margin-bottom: 20px;
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-gold);
    color: white;
    border-radius: 3px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-badge .premium-icon {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ==========================================================================
   Nav Search - Icon that expands to overlay text field
   ========================================================================== */

.nav-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    border-radius: 4px;
}

.nav-search-toggle:hover {
    color: var(--accent-warm);
}

/* Hide toggle when search is open */
.nav-search-wrapper.is-open .nav-search-toggle {
    opacity: 0;
    pointer-events: none;
    width: 0;
    padding: 0;
}

/* Search form — positioned absolutely so it overlays the nav */
.nav-search-form {
    display: none;
    align-items: center;
    gap: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    overflow: hidden;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    animation: navSearchSlideIn 0.2s ease;
}

.nav-search-wrapper.is-open .nav-search-form {
    display: flex;
}

.nav-search-input {
    border: none;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    padding: 8px 12px;
    width: 200px;
    color: var(--text-primary);
    outline: none;
}

.nav-search-input::placeholder {
    color: var(--text-tertiary);
}

.nav-search-submit {
    background: var(--accent-warm);
    border: none;
    cursor: pointer;
    color: white;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.nav-search-submit:hover {
    background: var(--accent-gold);
}

@keyframes navSearchSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) scaleX(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) scaleX(1);
    }
}

/* Responsive: smaller search on mobile */
@media (max-width: 768px) {
    .nav-search-input {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .nav-search-input {
        width: 100px;
        font-size: 12px;
    }
}
