/* ═══════════════════════════════════════════════════════════════════════════
   LegalCalc.online — Main Stylesheet
   v1.0 | legalcalc.online
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
    --primary: #1B3A6B;
    --primary-light: #2a5ba8;
    --primary-dark: #0f2245;
    --secondary: #C9A84C;
    --secondary-light: #dfc06a;
    --accent: #2E86AB;
    --success: #27AE60;
    --warning: #F39C12;
    --danger: #E74C3C;
    --light: #F8F9FA;
    --dark: #1A1A2E;
    --body-bg: #F4F6FB;
    --card-bg: #FFFFFF;
    --border: #E2E8F0;
    --text-primary: #1A1A2E;
    --text-secondary: #4A5568;
    --text-muted: #718096;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --nav-height: 72px;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--body-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.8rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ─── Utility Classes ───────────────────────────────────────────────────────── */
.text-gold {
    color: var(--secondary) !important;
}

.text-primary-custom {
    color: var(--primary) !important;
}

.bg-primary-custom {
    background-color: var(--primary) !important;
}

.x-small {
    font-size: 0.75rem;
}

.font-heading {
    font-family: var(--font-heading);
}

/* ─── Skip Link ─────────────────────────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 9999;
    background: var(--primary);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.skip-link:focus {
    top: 0;
}

/* ─── Ad Slots ──────────────────────────────────────────────────────────────── */
.ad-slot {
    overflow: hidden;
}

.ad-header {
    text-align: center;
    padding: 8px 0;
    background: #f0f0f0;
    border-bottom: 1px solid var(--border);
    min-height: 60px;
}

.ad-header:empty {
    display: none;
}

.ad-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* ─── Navigation ────────────────────────────────────────────────────────────── */
#mainNav {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 0;
    min-height: var(--nav-height);
    box-shadow: 0 2px 20px rgba(27, 58, 107, 0.35);
    z-index: 1050;
}

#mainNav .navbar-brand {
    padding: 0.75rem 0;
}

.brand-icon {
    font-size: 1.5rem;
    color: var(--secondary);
    filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.4));
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.brand-dot {
    color: var(--secondary);
    font-weight: 400;
}

#mainNav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.92rem;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.12);
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 0.5rem;
    min-width: 260px;
}

.dropdown-menu-calculators {
    min-width: 280px;
    max-height: 480px;
    overflow-y: auto;
}

.dropdown-category-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--secondary);
    padding: 0.4rem 0.75rem 0.2rem;
    display: block;
}

.dropdown-header-item {
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
    padding-top: 0.25rem;
}

.dropdown-header-item:first-child {
    border: none;
    margin: 0;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.75rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: rgba(27, 58, 107, 0.07);
    color: var(--primary);
}

.dropdown-item i {
    width: 16px;
}

/* Gold button */
.btn-gold {
    background: linear-gradient(135deg, var(--secondary) 0%, #b8932e 100%);
    color: var(--dark) !important;
    border: none;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.4);
}

/* ─── Breadcrumb ────────────────────────────────────────────────────────────── */
.breadcrumb-section {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.breadcrumb {
    --bs-breadcrumb-divider-color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* ─── HOMEPAGE ──────────────────────────────────────────────────────────────── */

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1e4d8c 100%);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--body-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.hero-title .highlight {
    color: var(--secondary);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 580px;
    margin: 1rem 0 2rem;
}

.hero-trust-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.hero-trust-chip {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.hero-trust-chip i {
    color: var(--secondary);
}

.hero-search-wrap {
    position: relative;
    max-width: 480px;
}

.hero-search-wrap .form-control {
    border-radius: 50px;
    padding: 0.75rem 3.5rem 0.75rem 1.5rem;
    font-size: 0.95rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.hero-search-wrap .form-control:focus {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-color: var(--secondary);
}

.hero-search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
}

/* Hero visual */
.hero-visual {
    position: relative;
}

.hero-scale-icon {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.6);
    animation: floatAnim 4s ease-in-out infinite;
}

@keyframes floatAnim {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.hero-stat-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-lg);
    max-width: 170px;
    text-align: center;
}

.hero-stat-card .stat-num {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.hero-stat-card.card-1 {
    top: 10%;
    right: 0;
}

.hero-stat-card.card-2 {
    bottom: 10%;
    left: 0;
}

/* Below Hero Ad */
.below-hero-ad {
    padding: 16px 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

/* Calculator Grid Section */
.calculators-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-eyebrow {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    display: block;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: var(--font-heading);
    font-weight: 900;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0.75rem auto 0;
    font-size: 1.05rem;
}

/* Category filter tabs */
.cat-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.cat-filter-btn {
    padding: 0.4rem 1.1rem;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.cat-filter-btn:hover,
.cat-filter-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

/* Calculator Cards */
.calc-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-accent, var(--primary)), transparent);
}

.calc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--card-accent, var(--primary));
}

.calc-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.calc-card-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.calc-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-body);
}

.calc-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.calc-card .btn-use {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    width: 100%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calc-card .btn-use:hover {
    background: var(--primary-light);
    transform: translateX(2px);
}

/* No results for search */
#noResults {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    display: none;
}

/* How it works section */
.how-section {
    background: linear-gradient(135deg, #fff 0%, var(--light) 100%);
    padding: 80px 0;
}

.step-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.step-number {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.25rem;
    box-shadow: 0 8px 24px rgba(27, 58, 107, 0.3);
}

.step-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    display: block;
}

.step-card h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    color: var(--primary);
}

/* Trust bar */
.trust-section {
    background: var(--primary-dark);
    padding: 40px 0;
}

.trust-stat {
    text-align: center;
}

.trust-stat .ts-num {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--secondary);
}

.trust-stat .ts-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Feature articles */
.featured-section {
    padding: 80px 0;
}

.article-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.article-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2rem;
    color: #fff;
}

.article-card-header .fa-solid {
    font-size: 2rem;
    color: var(--secondary);
}

.article-card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.article-card-body h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.article-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* ─── CALCULATOR PAGES ──────────────────────────────────────────────────────── */

/* Calculator Hero */
.calc-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 40px 0;
    border-bottom: 4px solid var(--calc-color, var(--secondary));
}

.category-pill {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
}

.calc-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin: 0.5rem 0;
}

.calc-hero-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    margin-bottom: 0;
}

.trust-chip {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.calc-hero-icon-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 4rem;
}

/* Calculator Card */
.calculator-card {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    border-left: 5px solid var(--calc-accent, var(--primary));
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.calc-card-header {
    background: linear-gradient(135deg, #f8faff 0%, #f0f5ff 100%);
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
}

.calc-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.calc-card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 0;
}

.calc-card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.calc-card-body {
    padding: 1.75rem;
}

/* Form Controls */
.calc-form .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.calc-form .form-control,
.calc-form .form-select {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #fafbff;
}

.calc-form .form-control:focus,
.calc-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.1);
    background: #fff;
}

.calc-form .input-group-text {
    border: 2px solid var(--border);
    background: #f0f5ff;
    color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.calc-form .input-group>.form-control {
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Range slider */
.form-range {
    accent-color: var(--primary);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.range-value-badge {
    background: var(--primary);
    color: #fff;
    padding: 0.2rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Tooltip icon */
.tooltip-icon {
    color: var(--text-muted);
    cursor: help;
    font-size: 0.8rem;
}

.tooltip-icon:hover {
    color: var(--primary);
}

/* Calculate Button */
.btn-calculate {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.9rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    width: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(27, 58, 107, 0.35);
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-calculate .btn-spinner {
    display: none;
}

.btn-calculate.loading .btn-text {
    display: none;
}

.btn-calculate.loading .btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Divider */
.calc-divider {
    border: none;
    border-top: 2px dashed var(--border);
    margin: 1.5rem 0;
}

/* Results Section */
.results-section {
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-card {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 1.75rem;
    box-shadow: var(--shadow-lg);
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.results-title {
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin: 0;
    font-size: 1.35rem;
}

.results-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-export {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: var(--radius-md);
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-export:hover {
    background: var(--primary);
    color: #fff;
}

.btn-share {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: var(--radius-md);
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-share:hover {
    background: var(--accent);
    color: #fff;
}

/* Result value display */
.result-primary {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0ff 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    border: 1px solid rgba(27, 58, 107, 0.12);
}

.result-primary .result-amount {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--primary);
}

.result-primary .result-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    background: #f8fafe;
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border);
    text-align: center;
}

.result-item .ri-value {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    display: block;
    font-family: var(--font-heading);
}

.result-item .ri-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Chart container */
.chart-container {
    position: relative;
    padding: 1rem;
    background: #fafbff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-top: 1.25rem;
}

.chart-container canvas {
    max-height: 320px;
}

/* Breakdown table */
.breakdown-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
}

.breakdown-table th {
    background: var(--primary);
    color: #fff;
    padding: 0.6rem 1rem;
    font-weight: 600;
}

.breakdown-table th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.breakdown-table th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.breakdown-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
}

.breakdown-table tr:last-child td {
    font-weight: 700;
    background: #f0f5ff;
}

.breakdown-table tr:hover td {
    background: #f8faff;
}

/* Status badges for SOL */
.sol-status {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sol-status.safe {
    background: #d4edda;
    color: #155724;
}

.sol-status.warning {
    background: #fff3cd;
    color: #856404;
}

.sol-status.danger {
    background: #f8d7da;
    color: #721c24;
}

/* Countdown timer */
.countdown-timer {
    text-align: center;
    padding: 1.5rem;
}

.countdown-timer .days-num {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
}

.countdown-timer .days-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress bar results */
.result-progress-bar {
    height: 12px;
    border-radius: 50px;
    background: var(--border);
    overflow: hidden;
}

.result-progress-fill {
    height: 100%;
    border-radius: 50px;
    transition: width 0.8s ease;
}

/* ─── Content Sections ──────────────────────────────────────────────────────── */
.calc-content-section h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    margin-top: 2rem;
}

.calc-content-section h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.calc-content-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.calc-content-section ol,
.calc-content-section ul {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    line-height: 2;
}

/* Disclaimer Box */
.disclaimer-box {
    background: linear-gradient(135deg, #fff8e1 0%, #fffde7 100%);
    border: 1px solid #ffc107;
    border-left: 5px solid #ffc107;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
}

.disclaimer-box .disc-icon {
    color: #ffc107;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.disclaimer-box strong {
    display: block;
    color: #856404;
    margin-bottom: 0.25rem;
}

.disclaimer-box p {
    margin: 0;
    color: #664d03;
    font-size: 0.9rem;
}

/* Formula Box */
.formula-box {
    background: #1a1a2e;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 1rem 0;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    border-left: 4px solid var(--secondary);
    overflow-x: auto;
}

.formula-box .formula-label {
    font-size: 0.75rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-body);
    margin-bottom: 0.5rem;
    display: block;
}

/* Section title small */
.section-title-sm {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

/* ─── FAQ Accordion ─────────────────────────────────────────────────────────── */
.faq-accordion .accordion-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md) !important;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.faq-accordion .accordion-button {
    font-weight: 600;
    color: var(--text-primary);
    background: #fff;
    font-size: 0.95rem;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: #f0f5ff;
    color: var(--primary);
    box-shadow: none;
}

.faq-accordion .accordion-button::after {
    filter: none;
}

.faq-accordion .accordion-body {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ─── Reviewer Box ──────────────────────────────────────────────────────────── */
.reviewer-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f5ff 100%);
    border: 1px solid rgba(27, 58, 107, 0.15);
    border-radius: var(--radius-xl);
    padding: 1.5rem 1.75rem;
}

.reviewer-badge-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.reviewer-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.reviewer-title-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reviewer-bio {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ─── Related Calculators ───────────────────────────────────────────────────── */
.related-calc-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: var(--transition);
    color: var(--text-primary) !important;
}

.related-calc-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    transform: translateX(3px);
}

.related-calc-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── Sidebar ───────────────────────────────────────────────────────────────── */
.calc-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
}

.sidebar-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.sidebar-widget-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.sidebar-tool-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-tool-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.88rem;
    font-weight: 500;
}

.sidebar-tool-link:hover {
    background: #f0f5ff;
    color: var(--primary);
}

.sidebar-tool-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-disclaimer {
    background: #fff8dc;
    border: 1px solid #f0c040;
}

.sidebar-trust {
    background: linear-gradient(135deg, #f0f5ff 0%, #e8f0ff 100%);
    border: 1px solid rgba(27, 58, 107, 0.15);
}

.reviewer-avatar-sm {
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ─── Trust Badges ──────────────────────────────────────────────────────────── */
.trust-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

/* ─── FOOTER ────────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--dark);
}

.footer-ad-strip {
    background: #12122a;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-main {
    padding: 64px 0 40px;
}

.footer-brand-icon {
    font-size: 1.75rem;
    color: var(--secondary);
}

.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-heading {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li+li {
    margin-top: 0.4rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-reviewer {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.footer-reviewer strong {
    color: rgba(255, 255, 255, 0.85);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.55);
}

.footer-bottom a {
    color: var(--secondary);
}

/* ─── Legal Pages ───────────────────────────────────────────────────────────── */
.legal-page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 60px 0;
    color: #fff;
}

.legal-page-header h1 {
    color: #fff;
}

.legal-page-header .last-updated {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
}

.legal-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 3rem 0;
}

.legal-content h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content h3 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-top: 1.5rem;
}

.legal-content p,
.legal-content li {
    color: var(--text-secondary);
    line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
    padding-left: 1.5rem;
}

.legal-toc {
    background: #f0f5ff;
    border: 1px solid rgba(27, 58, 107, 0.15);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.legal-toc h5 {
    font-family: var(--font-heading);
    color: var(--primary);
}

.legal-toc ul {
    padding-left: 1.25rem;
}

.legal-toc a {
    color: var(--primary);
    font-size: 0.9rem;
}

/* ─── Contact Page ──────────────────────────────────────────────────────────── */
.contact-info-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.contact-form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

/* ─── About Page ────────────────────────────────────────────────────────────── */
.about-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 80px 0;
    color: #fff;
}

.mission-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
}

.mission-card .mission-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.team-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

/* ─── Animations ────────────────────────────────────────────────────────────── */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Spinner */
.spinner-sm {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .calc-sidebar {
        position: static;
    }

    .calc-hero {
        padding: 30px 0;
    }

    .hero-section {
        padding: 70px 0 60px;
    }

    .hero-stat-card {
        display: none;
    }
}

@media (max-width: 767.98px) {
    :root {
        --nav-height: 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .calculators-section {
        padding: 50px 0;
    }

    .how-section {
        padding: 50px 0;
    }

    .result-primary .result-amount {
        font-size: 2rem;
    }

    .footer-main {
        padding: 40px 0 24px;
    }

    .calc-hero-icon-wrap {
        display: none;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {

    .calc-card-body,
    .results-card {
        padding: 1.25rem;
    }

    .result-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-trust-chips {
        gap: 0.4rem;
    }

    .hero-trust-chip {
        font-size: 0.78rem;
        padding: 0.28rem 0.7rem;
    }
}

/* ─── Print Styles ──────────────────────────────────────────────────────────── */
@media print {

    .ad-slot,
    #mainNav,
    .calc-sidebar,
    .site-footer,
    .btn-calculate,
    .results-actions {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .results-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}