:root {
    /* Investment / Medical Palette */
    --primary: #0A192F;
    /* Deep Navy */
    --primary-light: #172A46;
    --accent: #C9A227;
    /* Muted Gold */
    --accent-light: #E0C058;
    --success: #1E4D40;
    /* Dark Forest Green */
    --bg-dark: #040B14;
    --text-on-dark: #F1F5F9;
    --text-muted: #94A3B8;
    --card-bg-glass: rgba(255, 255, 255, 0.05);
    /* Glassmorphism */
    --border-glass: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
.serif {
    font-family: var(--font-serif);
}

.text-gold {
    color: var(--accent);
}

/* Navigation - Minimalist Top Bar */
.nav-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    background: transparent;
    z-index: 100;
}

.logo-lockup {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-lockup img {
    height: 50px;
    /* Sizing the Seal */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text span.brand {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: white;
    line-height: 1.1;
}

.logo-text span.tagline {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Navigation CTA Button - Apply */
.nav-links a.nav-cta {
    background: var(--accent);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links a.nav-cta:hover {
    background: var(--accent-light);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
}

/* Hero Section - Magazine Style */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 40px;
    background-image: url('../images/hero-magazine.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right,
            rgba(4, 11, 20, 0.95) 0%,
            rgba(4, 11, 20, 0.8) 40%,
            rgba(4, 11, 20, 0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-text h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-text p.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
    font-weight: 300;
}

.trust-strip {
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.trust-header {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555c70;
    margin-bottom: 20px;
}

.badge-row {
    display: flex;
    gap: 30px;
    opacity: 0.9;
}

.badge-row img {
    height: 60px;
    transition: transform 0.2s;
}

.badge-row img:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(201, 162, 39, 0.4));
}

/* Calculator Card - Glassmorphism */
.calculator-card {
    background: rgba(30, 41, 59, 0.7);
    /* Fallback */
    background: var(--card-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: #fff;
    max-width: 500px;
    width: 100%;
}

.calculator-card h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: white;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 16px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

input,
select {
    width: 100%;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: white;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.5);
}

.btn-primary {
    width: 100%;
    padding: 18px;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(201, 162, 39, 0.2);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 12px;
    margin-top: 12px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--text-on-dark);
    color: white;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
    padding: 0 10px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-glass);
    z-index: 0;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0f172a;
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.step.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(201, 162, 39, 0.3);
}

.step.complete {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Quiz Styles */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    border-color: var(--accent);
    background: rgba(201, 162, 39, 0.05);
}

.quiz-option.selected {
    border-color: var(--accent);
    background: rgba(201, 162, 39, 0.1);
}

/* Result Styles */
.result-box {
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid var(--accent);
}

.result-value {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    color: var(--accent);
    margin: 10px 0;
}

.result-range {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        padding-top: 80px;
    }

    .hero-text {
        text-align: center;
        margin-bottom: 40px;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text p.subtitle {
        margin: 0 auto 32px auto;
    }

    .trust-badges {
        justify-content: center;
    }

    .calculator-card {
        margin: 0 auto;
    }

    .nav-links {
        display: none;
        /* simple mobile hide for now */
    }

    .nav-bar {
        justify-content: center;
    }
}

/* Inner Page Styles */
.page-header {
    background: linear-gradient(rgba(10, 25, 47, 0.9), rgba(10, 25, 47, 0.9)), url('../images/hero-magazine.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 8rem 2rem 4rem;
    text-align: center;
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    position: relative;
}

.page-title {
    font-size: 3.5rem;
    color: var(--text-on-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.page-subtitle {
    font-family: 'Inter', sans-serif;
    color: var(--accent);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.article-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    color: #cbd5e1;
    /* Slate 300 for readability on dark */
    font-size: 1.125rem;
}

.article-content h2,
.article-content h3 {
    font-family: 'Playfair Display', serif;
    color: var(--accent);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 2rem;
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    padding-bottom: 0.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.cta-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(201, 162, 39, 0.3);
    padding: 3rem;
    text-align: center;
    margin-top: 4rem;
    border-radius: 4px;
}

.cta-box h3 {
    color: var(--text-on-dark);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.breadcrumbs {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    text-align: center;
}

.breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
}






/* Definitive Header: The Compact Gold Standard (Deep Navy, Gold Accents, Background Image) */
.page-header-gold {
    background: linear-gradient(rgba(2, 12, 27, 0.93), rgba(2, 12, 27, 0.93)), url('../images/hero-magazine.png');
    background-size: cover;
    background-position: center;
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid #C9A227;
    /* Gold Border */
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Subtle Top Gold Highlight */
.page-header-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #C9A227;
}

.page-header-gold .page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    /* Slightly smaller */
    color: #FFFFFF;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-header-gold .page-subtitle {
    font-family: 'Inter', sans-serif;
    color: #C9A227;
    /* Gold Text */
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    display: inline-block;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(201, 162, 39, 0.3);
    /* Subtle underline */
}

/* Footer Styles - Rich Gold Aesthetic */
footer {
    background: var(--bg-dark);
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--accent);
    margin-top: 4rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 32px;
    margin-bottom: 24px;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

/* Feature Box Styles - Navy/Blue/Gold */
.highlight-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    padding: 24px;
    border-radius: 12px;
    margin: 32px 0;
    border-left: 4px solid var(--accent);
    /* Gold Accent */
    border: 1px solid rgba(59, 130, 246, 0.2);
    /* Subtle Blue Border */
    color: var(--text-muted);
}

.highlight-box strong {
    color: white;
}

.cta-box {
    background: var(--primary);
    color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin: 48px 0;
    border: 1px solid var(--accent);
    /* Gold Border */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

/* Subtle Blue Glow for CTA */
.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

/* Global Content Link Styles - Force Gold */
.article-content a {
    color: var(--accent);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: white;
    text-decoration: none;
}

/* Fix for buttons inside article content */
.article-content .btn-primary {
    color: var(--primary) !important;
    text-decoration: none;
    display: inline-block;
}

.article-content .btn-primary:hover {
    color: var(--primary) !important;
    background: var(--accent-light);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
    margin: 2rem 0;
}

.valuation-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.valuation-table th,
.valuation-table td {
    padding: 14px 18px;
    border: 1px solid var(--border-glass);
    text-align: left;
}

.valuation-table th {
    background: rgba(201, 162, 39, 0.1);
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.valuation-table td {
    color: var(--text-on-dark);
}

.valuation-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {

    /* Center calculator card properly on mobile */
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .calculator-card {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        padding: 24px;
    }

    /* Page headers - smaller on mobile */
    .page-header-gold .page-title {
        font-size: 2rem;
    }

    .page-header-gold .page-subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }

    /* Article container padding */
    .article-container {
        padding: 2rem 1rem;
    }

    /* Trust badges wrap nicely and center */
    .trust-strip {
        text-align: center;
        margin: 40px auto 0;
    }

    .trust-header {
        text-align: center;
    }

    .badge-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .badge-row img {
        height: 45px;
    }

    /* Improved table mobile styling - avoid horizontal scroll */
    .table-responsive {
        margin: 1.5rem -1rem;
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .valuation-table {
        font-size: 0.85rem;
        min-width: 100%;
    }

    .valuation-table th,
    .valuation-table td {
        padding: 10px 12px;
        font-size: 0.8rem;
        word-wrap: break-word;
    }

    .valuation-table th {
        font-size: 0.7rem;
        letter-spacing: 0;
    }

    /* Stack table cells on very small screens */
    .valuation-table thead {
        display: none;
    }

    .valuation-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-glass);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.02);
    }

    .valuation-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        border-bottom: 1px solid var(--border-glass);
        padding: 12px 16px;
    }

    .valuation-table td:last-child {
        border-bottom: none;
    }

    .valuation-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--accent);
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 0.5px;
        flex-shrink: 0;
        margin-right: 1rem;
    }

    /* Highlight box refinement */
    .highlight-box {
        padding: 18px;
        margin: 24px 0;
    }

    /* CTA box refinement */
    .cta-box {
        padding: 24px;
        margin: 32px 0;
    }

    .cta-box h3 {
        font-size: 1.4rem;
    }

    /* Image containers - ensure proper sizing */
    .article-content img {
        max-width: 100% !important;
        height: auto !important;
        width: auto !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .page-header-gold {
        padding: 3rem 1rem;
    }

    .page-header-gold .page-title {
        font-size: 1.6rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .calculator-card h2 {
        font-size: 1.4rem;
    }

    .result-value {
        font-size: 2.5rem;
    }
}