/* ─────────────────────────────────────────────────────
   RESOURCES PAGE STYLES
───────────────────────────────────────────────────── */

/* 1. CATEGORIES FILTER BAR */
.resource-filters {
    background: #FFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0;
    position: sticky;
    top: 72px;
    z-index: 50;
}

.resource-filters .wrap {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.resource-filters .wrap::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 18px 28px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}

.filter-btn:hover {
    color: var(--maroon);
}

.filter-btn.active {
    color: var(--maroon);
    border-bottom-color: var(--gold);
}

/* 2. RESOURCES GRID SECTION */
.resources-section {
    background: var(--cream);
    padding: 80px 0 100px;
}

.resources-section .section-header {
    margin-bottom: 60px;
}

.resources-section .section-header h2 {
    color: var(--maroon);
    margin-bottom: 12px;
}

.resources-section .section-header p {
    color: #555;
    font-size: 18px;
    max-width: 560px;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 100px;
}

.resources-grid:last-child {
    margin-bottom: 0;
}

/* Individual resource card */
.res-card {
    background: #FFF;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all 0.3s ease;
}

.res-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

/* Icon area */
.res-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
}

.res-card-icon.gold {
    background: rgba(201, 168, 76, 0.12);
    color: var(--gold);
}

.res-card-icon.maroon {
    background: rgba(96, 20, 20, 0.08);
    color: var(--maroon);
}

.res-card-icon.teal {
    background: rgba(30, 120, 120, 0.08);
    color: #1a8080;
}

.res-card-cat {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.res-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--charcoal);
    margin-bottom: 10px;
    font-weight: 700;
}

.res-card-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 14px;
    font-weight: 500;
}

.res-card p {
    font-size: 14px;
    color: #555;
    line-height: 1.65;
    margin-bottom: 24px;
}

.res-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 18px;
}

.res-card-launch {
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 14px;
    color: var(--maroon);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s, gap 0.2s;
}

.res-card-launch:hover {
    color: var(--gold);
    gap: 10px;
}

.res-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.res-chip {
    font-size: 10px;
    background: rgba(0, 0, 0, 0.04);
    color: #666;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
}

/* 3. TOOL MODAL / EMBEDDED TOOL */
.tool-section {
    background: #FFF;
    padding: 100px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.tool-section .section-header {
    text-align: center;
    margin-bottom: 60px;
}

.tool-section .section-header h2 {
    color: var(--maroon);
    margin-bottom: 12px;
}

/* Wellness Assessment Tool */
.wellness-tool {
    max-width: 780px;
    margin: 0 auto;
    background: #FDFBF7;
    border-radius: 24px;
    padding: 50px 60px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04);
}

.wellness-score-display {
    text-align: center;
    margin-bottom: 40px;
}

.score-ring {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(var(--gold) 0%, #eee 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
    transition: background 0.6s ease;
}

.score-ring::before {
    content: '';
    width: 100px;
    height: 100px;
    background: #FDFBF7;
    border-radius: 50%;
    position: absolute;
}

.score-number {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--maroon);
    position: relative;
    z-index: 1;
}

.score-label {
    font-size: 14px;
    color: #888;
    margin-top: 6px;
}

/* Tool question groups */
.tool-group {
    margin-bottom: 32px;
}

.tool-group-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--maroon);
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tool-question {
    margin-bottom: 20px;
}

.tool-question label {
    display: block;
    font-size: 14px;
    color: #444;
    margin-bottom: 10px;
    font-weight: 500;
}

.tool-radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tool-radio-group input[type="radio"] {
    display: none;
}

.tool-radio-group label {
    padding: 8px 18px;
    border: 1.5px solid rgba(0, 0, 0, 0.10);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: #555;
    margin: 0;
}

.tool-radio-group input[type="radio"]:checked+label {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.1);
    color: var(--maroon);
}

.tool-radio-group label:hover {
    border-color: var(--gold);
    color: var(--maroon);
}

.tool-submit {
    width: 100%;
    margin-top: 32px;
}

/* Results panel */
.tool-results {
    display: none;
    margin-top: 40px;
    padding: 32px;
    background: #FFF;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.tool-results.visible {
    display: block;
}

.result-category {
    margin-bottom: 20px;
}

.result-category-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.result-bar-bg {
    height: 8px;
    background: #eee;
    border-radius: 99px;
    overflow: hidden;
}

.result-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--gold);
    width: 0%;
    transition: width 1s ease;
}

.result-message {
    margin-top: 24px;
    padding: 20px 24px;
    background: rgba(201, 168, 76, 0.08);
    border-left: 4px solid var(--gold);
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #444;
    line-height: 1.6;
}

/* Cash Flow Planner */
.cashflow-tool {
    max-width: 780px;
    margin: 0 auto;
    background: #FDFBF7;
    border-radius: 24px;
    padding: 50px 60px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04);
}

.cashflow-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.cf-summary-card {
    background: #FFF;
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cf-summary-card .cf-amount {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--maroon);
}

.cf-summary-card .cf-label {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

.cf-input-group {
    margin-bottom: 24px;
}

.cf-input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.cf-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #FFF;
    border: 1.5px solid rgba(0, 0, 0, 0.10);
    border-radius: 10px;
    padding: 0 16px;
    transition: border-color 0.2s;
}

.cf-input-row:focus-within {
    border-color: var(--gold);
}

.cf-currency {
    font-size: 16px;
    color: #bbb;
    font-weight: 600;
}

.cf-input-row input {
    border: none;
    outline: none;
    background: none;
    width: 100%;
    padding: 14px 0;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--charcoal);
}

.cf-section-divider {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--maroon);
    margin: 32px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cf-allocation-bar {
    margin-top: 36px;
}

.cf-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.cf-bar-track {
    height: 28px;
    background: #eee;
    border-radius: 99px;
    display: flex;
    overflow: hidden;
}

.cf-bar-segment {
    height: 100%;
    transition: width 0.5s ease;
}

.cf-bar-segment.needs {
    background: var(--maroon);
}

.cf-bar-segment.wants {
    background: var(--gold);
}

.cf-bar-segment.savings {
    background: #3a8a6e;
}

.cf-legend {
    display: flex;
    gap: 20px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.cf-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #555;
    font-weight: 600;
}

.cf-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.cf-legend-dot.needs {
    background: var(--maroon);
}

.cf-legend-dot.wants {
    background: var(--gold);
}

.cf-legend-dot.savings {
    background: #3a8a6e;
}

/* 4. RESPONSIVE */
@media (max-width: 1100px) {
    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }

    .wellness-tool,
    .cashflow-tool {
        padding: 32px 24px;
    }

    .cashflow-summary {
        grid-template-columns: 1fr;
    }

    .resource-filters {
        top: 60px;
    }

    .tool-radio-group label {
        font-size: 12px;
        padding: 7px 14px;
    }
}