/* ─── Base ─────────────────────────────────────────────────── */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f4f4f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Navbar ────────────────────────────────────────────────── */
.fw-navbar {
    box-shadow: 0 2px 14px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

/* ─── Inline search expand ──────────────────────────────────── */
.fw-inline-search {
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.3s ease, opacity 0.25s ease;
    display: flex;
    align-items: center;
    flex-shrink: 1;
}

.fw-inline-search.expanded {
    width: 280px;
    opacity: 1;
}

.fw-inline-search-form {
    display: flex;
    align-items: center;
    width: 100%;
    background: #1c1c1c;
    border: 1px solid rgba(250,188,44,0.55);
    border-radius: 4px;
    padding: 0 4px 0 10px;
}

.fw-inline-search-input {
    background: transparent;
    border: none;
    color: #f0f0f0;
    font-size: 0.84rem;
    padding: 7px 4px;
    flex: 1;
    min-width: 0;
    width: 100%;
    outline: none;
    font-family: inherit;
    /* suppress browser default search styling */
    -webkit-appearance: none;
}

.fw-inline-search-input::placeholder { color: #666; }

.fw-inline-search-input::-webkit-search-cancel-button { display: none; }

.fw-inline-search-clear {
    background: transparent;
    border: none;
    color: #666;
    padding: 6px 6px;
    font-size: 0.72rem;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s;
}

.fw-inline-search-clear:hover { color: #ccc; }

/* Mobile inline search: allowed to grow wider */
@media (max-width: 991.98px) {
    .fw-inline-search.expanded {
        width: min(260px, calc(100vw - 130px));
    }
}

/* ─── Search icon button ────────────────────────────────────── */
.fw-search-icon-btn {
    color: #bbb;
    background: transparent;
    border: none;
    font-size: 0.92rem;
    padding: 6px 6px;
    line-height: 1;
    transition: color 0.2s;
}

.fw-search-icon-btn:hover,
.fw-search-icon-btn:focus {
    color: #FABC2C;
    outline: none;
    box-shadow: none;
}

/* ─── Social icons ──────────────────────────────────────────── */
.social-icon-link {
    font-size: 1rem;
    color: #bbb !important;
    transition: color 0.2s;
}

.social-icon-link:hover { color: #FABC2C !important; }

/* ─── Auth elements ─────────────────────────────────────────── */
.auth-username {
    color: #FABC2C;
    font-size: 0.825rem;
    font-weight: 600;
    white-space: nowrap;
}

.auth-btn {
    color: #ccc;
    font-size: 0.78rem;
    padding: 5px 13px;
    border: 1px solid #555;
    border-radius: 4px;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1.5;
    white-space: nowrap;
    letter-spacing: 0.01em;
    display: inline-block;
}

.auth-btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    text-decoration: none;
}

.auth-btn-signup {
    background: #FABC2C;
    border-color: #FABC2C;
    color: #000;
    font-weight: 700;
}

.auth-btn-signup:hover {
    background: #e0a820;
    border-color: #e0a820;
    color: #000;
}

/* ─── Category bar ──────────────────────────────────────────── */
.fw-category-bar {
    position: relative;
    background-color: #FABC2C;
    border-bottom: 2px solid #e0a820;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.fw-category-bar::-webkit-scrollbar { display: none; }

/* Mobile scroll hint: right-side fade so users know more tabs exist */
@media (max-width: 991.98px) {
    .fw-category-bar::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 44px;
        background: linear-gradient(to right, transparent, #FABC2C);
        pointer-events: none;
    }
}

.fw-category-nav {
    flex-wrap: nowrap;
    min-width: max-content;
}

.fw-category-link {
    color: #000 !important;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 9px 16px !important;
    text-decoration: none;
    white-space: nowrap;
    border-right: 1px solid rgba(0,0,0,0.1);
    transition: background-color 0.15s;
    display: inline-block;
}

.fw-category-link:last-child { border-right: none; }
.fw-category-link:hover { background-color: rgba(0,0,0,0.1); color: #000 !important; }

/* ─── Tagline bar ───────────────────────────────────────────── */
.tagline-bar {
    background-color: #111;
    color: #999;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ─── Article grid container ────────────────────────────────── */
.container-xl {
    max-width: 1340px;
}

.articles-wrapper {
    max-width: 1140px;
}

/* ─── Article cards ─────────────────────────────────────────── */
.fw-card {
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    overflow: hidden;
    background: #fff;
}

.fw-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
    transform: translateY(-3px);
}

.fw-card-img {
    height: 185px;
    object-fit: cover;
    background-color: #0a0a0a;
    width: 100%;
    display: block;
}

.fw-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 0;
    color: #111;
    letter-spacing: -0.01em;
}

.fw-read-more {
    color: #FABC2C;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fw-read-more:hover { color: #c89a15; text-decoration: underline; }

/* ─── Load More button ──────────────────────────────────────── */
.fw-load-more-btn {
    background-color: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: background-color 0.2s;
    min-width: 140px;
}

.fw-load-more-btn:hover,
.fw-load-more-btn:focus {
    background-color: #2e2e2e;
    color: #fff;
    outline: none;
}

/* ─── Auth / Contact card (shared) ─────────────────────────── */
.auth-page {
    flex: 1;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 28px rgba(0,0,0,0.1);
    padding: 2.75rem 2.5rem;
    width: 100%;
    max-width: 460px;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.5rem;
    }
}

.auth-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 3px solid #FABC2C;
    display: inline-block;
}

.fw-auth-input {
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #111;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fw-auth-input:focus {
    border-color: #FABC2C;
    box-shadow: 0 0 0 3px rgba(250,188,44,0.2);
    outline: none;
}

.fw-auth-input.is-invalid {
    border-color: #dc3545;
}

/* Style the topic select (rendered by Django widget directly) */
.auth-card select {
    display: block;
    width: 100%;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: #111;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: auto;
}

.auth-card select:focus {
    border-color: #FABC2C;
    box-shadow: 0 0 0 3px rgba(250,188,44,0.2);
    outline: none;
}

.auth-help-text {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
    line-height: 1.5;
}

.fw-auth-link {
    color: #FABC2C;
    font-weight: 600;
    text-decoration: none;
}

.fw-auth-link:hover {
    color: #c89a15;
    text-decoration: underline;
}

/* ─── Social login buttons ──────────────────────────────────── */
.fw-social-btn {
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 10px 16px;
    border: 1.5px solid #ddd;
    background: #fff;
    color: #333;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fw-social-btn:hover { background: #f5f5f5; border-color: #bbb; color: #111; }

.fw-social-btn-google { border-color: #dadce0; }
.fw-social-btn-google:hover { background: #f8f9ff; border-color: #4285f4; }
.fw-social-btn-google i { color: #4285f4; }

.fw-social-btn-facebook { border-color: #1877f2; background: #1877f2; color: #fff; }
.fw-social-btn-facebook:hover { background: #166fe5; border-color: #166fe5; color: #fff; }

/* OR divider */
.fw-or-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #bbb;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fw-or-divider::before,
.fw-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

/* ─── Interest chip grid (profile_edit) ────────────────────── */
.fw-interest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.fw-interest-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
    background: #fafafa;
    transition: border-color 0.18s, background 0.18s, color 0.18s;
    user-select: none;
}

.fw-interest-chip input[type="checkbox"] {
    accent-color: #f5a623;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.fw-interest-chip:has(input:checked),
.fw-interest-chip.active {
    border-color: #f5a623;
    background: #fffbf0;
    color: #111;
}

.fw-interest-chip:hover {
    border-color: #f5a623;
    background: #fffbf0;
}

/* ─── Benefits block (login / signup cards) ─────────────────── */
.fw-benefits-block {
    background: #fffbf0;
    border: 1.5px solid #FABC2C;
    border-radius: 8px;
    padding: 0.9rem 1.1rem 0.75rem;
    margin-bottom: 1.5rem;
}

.fw-benefits-heading {
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #111;
    margin-bottom: 0.65rem;
}

.fw-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    color: #333;
    line-height: 1.45;
}

.fw-benefits-list li {
    padding: 3px 0;
}

.fw-benefits-footer {
    font-size: 0.75rem;
    color: #888;
}

.fw-gold-text {
    color: #c89a15;
    font-weight: 600;
}

/* ─── Signup nudge modal ────────────────────────────────────── */
.fw-nudge-dialog {
    max-width: 480px;
}

.fw-nudge-dismiss {
    font-size: 0.82rem;
    color: #999 !important;
    padding: 4px 0;
    line-height: 1.4;
}

.fw-nudge-dismiss:hover {
    color: #555 !important;
}

/* ─── Homepage signup CTA banner ────────────────────────────── */
.fw-signup-cta {
    background: #111;
    border-bottom: 2px solid #FABC2C;
    color: #ddd;
    font-size: 0.88rem;
    overflow: hidden;
    max-height: 120px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 0.6s ease, opacity 0.6s ease, transform 0.6s ease;
}

.fw-signup-cta--hidden {
    max-height: 0;
    opacity: 0;
    transform: translateY(-100%);
    border-bottom-width: 0;
}

.fw-signup-cta strong {
    color: #fff;
}

.fw-banner-close {
    opacity: 0.6;
    font-size: 0.75rem;
}

.fw-banner-close:hover {
    opacity: 1;
}

/* ─── Article detail auth nudge ─────────────────────────────── */
.fw-article-nudge {
    background: #fffbf0;
    border: 1.5px solid #FABC2C;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    color: #333;
}

/* ─── Article detail hero ───────────────────────────────────── */
.hero-image {
    max-width: 100%;
    max-height: 380px;
    width: auto;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 2rem;
    display: block;
}

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
    background-color: #0a0a0a;
    color: #666;
    text-align: center;
    width: 100%;
    margin-top: auto;
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    border-top: 1px solid #1e1e1e;
}
