
/* =========================================================
   DECHATURA BRAND STYLESHEET
   File: wwwroot/css/dechatura-brand.css

   Includes:
   - Brand colors
   - Sticky navbar
   - Logo sizing
   - Compact homepage hero
   - Compact search and category controls
   - Calculator cards
   - Responsive mobile layout
   ========================================================= */


/* =========================================================
   1. BRAND VARIABLES
   ========================================================= */

:root {
    --brand-primary: #1F6F5F;
    --brand-primary-dark: #174F46;
    --brand-secondary: #2E8B57;
    --brand-accent: #F4C95D;
    --brand-blue: #2F80ED;
    --brand-violet: #7655E8;
    --brand-teal: #2CC6A5;
    --brand-page: #F5F8FC;
    --brand-surface: #FFFFFF;
    --brand-border: #E2E8F0;
    --brand-text: #173B7A;
    --brand-muted: #617895;
    --brand-radius: 14px;
    --brand-shadow: 0 6px 20px rgba(24, 54, 100, 0.06);
}


/* =========================================================
   2. GLOBAL PAGE STYLES
   ========================================================= */

body {
    background: var(--brand-page);
    color: var(--brand-text);
}

.home-catalog {
    padding-bottom: 36px;
}


/* =========================================================
   3. STICKY NAVBAR
   ========================================================= */

/* =========================================================
   DECHATURA STICKY NAVBAR AND LOGO
   ========================================================= */

.custom-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 64px;
    padding: 4px 0 !important;
    background: linear-gradient( 105deg, #319BE8 0%, #397CE5 48%, #7439D2 100% ) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 3px 12px rgba(42, 70, 140, 0.10);
}

    /* Navbar container */

    .custom-navbar .container,
    .custom-navbar .container-fluid {
        min-height: 54px;
        align-items: center;
    }

    /* Logo container */

    .custom-navbar .navbar-brand {
        display: flex;
        align-items: center;
        padding: 0 !important;
        margin-right: 22px;
        background: transparent !important;
    }

    /* DeChatura logo */

    .custom-navbar .dechatura-logo {
        display: block;
        width: 220px;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        background: transparent;
    }

    /* Navbar links */

    .custom-navbar .navbar-nav {
        align-items: center;
        gap: 5px;
    }

        .custom-navbar .navbar-nav .nav-link {
            padding: 7px 14px !important;
            color: #FFFFFF !important;
            font-size: 0.94rem;
            font-weight: 600;
            line-height: 1.3;
            border-radius: 11px;
        }

            .custom-navbar .navbar-nav .nav-link:hover {
                background: rgba(255, 255, 255, 0.15);
                color: #FFFFFF !important;
            }

            .custom-navbar .navbar-nav .nav-link.active,
            .custom-navbar .navbar-nav .nav-link[aria-current="page"] {
                background: #FFFFFF;
                color: #3459D8 !important;
            }

    /* Navbar dropdown */

    .custom-navbar .dropdown-menu {
        border: 1px solid #E2E8F0;
        border-radius: 12px;
        padding: 7px;
        box-shadow: 0 10px 25px rgba(20, 40, 90, 0.14);
    }

    .custom-navbar .dropdown-item {
        padding: 8px 12px;
        border-radius: 8px;
        color: #173B7A;
    }

        .custom-navbar .dropdown-item:hover {
            background: #EEF3FF;
            color: #3459D8;
        }

/* Tablet */

@media (max-width: 991.98px) {
    .custom-navbar {
        min-height: 58px;
    }

        .custom-navbar .container,
        .custom-navbar .container-fluid {
            min-height: 50px;
        }

        .custom-navbar .dechatura-logo {
            width: 190px;
        }

        .custom-navbar .navbar-nav {
            align-items: stretch;
            margin-top: 8px;
        }

            .custom-navbar .navbar-nav .nav-link {
                padding: 8px 12px !important;
            }
}

/* Mobile */

@media (max-width: 575.98px) {
    .custom-navbar .dechatura-logo {
        width: 165px;
    }
}

/* =========================================================
   4. COMPACT HOMEPAGE HERO
   ========================================================= */

.home-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient( 110deg, #EAF5FF 0%, #EEF2FF 55%, #E9EDFF 100% );
    border: 1px solid #E1EAFE;
    border-radius: 15px;
    margin-top: 12px !important;
    margin-bottom: 14px !important;
    padding: 18px 24px !important;
    box-shadow: 0 5px 16px rgba(40, 75, 140, 0.035);
}

    /* Hero content */

    .home-hero .container {
        position: relative;
        z-index: 2;
    }

    /* Remove large hero minimum height */

    .home-hero.home-hero-compact {
        min-height: 0 !important;
        display: block;
    }

    /* Hero eyebrow */

    .home-hero .home-eyebrow {
        color: #6A65F5;
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 1.4px;
        text-transform: uppercase;
        margin-bottom: 6px !important;
    }

    /* Hero heading */

    .home-hero h1 {
        color: #173F91;
        font-size: clamp(1.5rem, 2.3vw, 2.1rem) !important;
        font-weight: 800;
        letter-spacing: -0.7px;
        line-height: 1.2;
        max-width: 950px;
        margin-bottom: 8px !important;
    }

    /* Hero description */

    .home-hero p:not(.home-eyebrow) {
        color: #506C96;
        font-size: 0.96rem !important;
        line-height: 1.5;
        max-width: 800px;
        margin-bottom: 0 !important;
    }

    /* CSS-only decorative calculator */

    .home-hero::after {
        content: "";
        position: absolute;
        right: 28px;
        top: 12px;
        width: 170px;
        height: 155px;
        border-radius: 30px;
        background: linear-gradient( 145deg, rgba(73, 151, 255, 0.13), rgba(113, 83, 236, 0.09) );
        transform: rotate(-12deg);
        pointer-events: none;
    }

    .home-hero::before {
        content: "";
        position: absolute;
        right: 85px;
        top: 20px;
        width: 72px;
        height: 112px;
        border: 7px solid rgba(65, 125, 240, 0.35);
        border-radius: 16px;
        background: linear-gradient( 180deg, rgba(255, 255, 255, 0.75), rgba(218, 232, 255, 0.5) );
        transform: rotate(-12deg);
        pointer-events: none;
    }


/* =========================================================
   5. COMPACT SEARCH SECTION
   ========================================================= */

.home-discovery {
    background: #FFFFFF;
    border: 1px solid #E5EBF5;
    border-radius: 15px;
    padding: 10px 14px !important;
    margin-bottom: 22px !important;
    box-shadow: var(--brand-shadow);
}

/* Search, count, category and clear */

.home-discovery-controls {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 10px;
}

/* Search input */

.home-search {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    position: relative;
}

    .home-search input {
        width: 100%;
        height: 42px !important;
        min-height: 42px !important;
        padding: 8px 12px !important;
        border: 1px solid #DCE5F2;
        border-radius: 11px !important;
        font-size: 0.92rem !important;
        color: var(--brand-text);
        background: #FFFFFF;
        box-shadow: none;
    }

        .home-search input:focus {
            border-color: #6685F2;
            box-shadow: 0 0 0 3px rgba(102, 133, 242, 0.10);
            outline: none;
        }

        .home-search input::placeholder {
            color: #7185A4;
        }

/* Calculator count */

#calculatorSearchCount {
    display: block;
    flex: 0 0 85px;
    width: 85px;
    margin: 0 !important;
    color: #60799D;
    font-size: 0.82rem !important;
    line-height: 1.3;
}

/* Category dropdown */

.home-category-select {
    flex: 0 0 220px !important;
    min-width: 0 !important;
}

    .home-category-select .form-select {
        width: 100%;
        height: 42px !important;
        min-height: 42px !important;
        padding: 7px 11px !important;
        border: 1px solid #DCE5F2;
        border-radius: 11px !important;
        font-size: 0.92rem !important;
        font-weight: 600;
        color: #173F91;
        background-color: #FFFFFF;
    }

        .home-category-select .form-select:focus {
            border-color: #6685F2;
            box-shadow: 0 0 0 3px rgba(102, 133, 242, 0.10);
        }

/* Clear button */

#clearCalculatorFilters {
    flex: 0 0 auto;
    width: auto;
    height: 42px !important;
    min-height: 42px !important;
    padding: 7px 16px !important;
    border: 1px solid #7B80FF;
    border-radius: 11px !important;
    background: #FFFFFF;
    color: #4C5CE0;
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
}

    #clearCalculatorFilters:hover {
        background: #F1F2FF;
        border-color: #5F68EE;
    }


/* =========================================================
   6. CALCULATOR CATEGORY SECTIONS
   ========================================================= */

.home-category {
    margin-bottom: 28px;
}

    .home-category[hidden] {
        display: none !important;
    }

    /* Category heading */

    .home-category h2,
    .home-category h3 {
        color: #173F91;
        font-weight: 800;
        letter-spacing: -0.4px;
    }

    /* Category description */

    .home-category p {
        color: #617895;
    }


    /* =========================================================
   7. CALCULATOR CARDS
   ========================================================= */

    .home-category .calculator-explore-section .row > [class*="col-"] {
        margin-bottom: 18px;
    }

        /* Card */

        .home-category .calculator-explore-section .row > [class*="col-"] > .card,
        .home-category .calculator-explore-section .row > [class*="col-"] .calculator-card {
            height: 100%;
            border: 1px solid #E3EAF4;
            border-radius: 14px;
            background: #FFFFFF;
            box-shadow: 0 5px 16px rgba(26, 54, 100, 0.045);
            overflow: hidden;
            transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        }

            /* Hover */

            .home-category .calculator-explore-section .row > [class*="col-"] > .card:hover,
            .home-category .calculator-explore-section .row > [class*="col-"] .calculator-card:hover {
                transform: translateY(-3px);
                border-color: #CAD8F5;
                box-shadow: 0 10px 24px rgba(26, 54, 100, 0.09);
            }

    /* Card title */

    .home-category .calculator-explore-section .card-title,
    .home-category .calculator-explore-section .calculator-card-title {
        color: #173F91;
        font-weight: 800;
    }

    /* Card text */

    .home-category .calculator-explore-section .card-text {
        color: #617895;
        line-height: 1.6;
    }

    /* Card links */

    .home-category .calculator-explore-section a {
        text-decoration: none;
    }

    .home-category .calculator-explore-section .card a:hover {
        text-decoration: none;
    }


/* =========================================================
   8. HOMEPAGE BENEFITS
   ========================================================= */

.home-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    background: #FFFFFF;
    border: 1px solid #E5EBF5;
    border-radius: 15px;
    padding: 20px;
    margin-top: 26px;
    box-shadow: var(--brand-shadow);
}

    .home-benefits > div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .home-benefits strong {
        color: #173F91;
        font-size: 0.96rem;
        font-weight: 800;
    }

    .home-benefits span {
        color: #617895;
        font-size: 0.92rem;
        line-height: 1.55;
    }


/* =========================================================
   9. NO SEARCH RESULTS
   ========================================================= */

#calculatorSearchEmpty {
    border-radius: 12px;
    padding: 16px;
    color: #617895;
    background: #FFFFFF;
}


/* =========================================================
   10. RESPONSIVE: MEDIUM SCREENS
   ========================================================= */

@media (max-width: 1100px) and (min-width: 768px) {

    .home-discovery-controls {
        gap: 7px;
    }

    #calculatorSearchCount {
        flex-basis: 70px;
        width: 70px;
    }

    .home-category-select {
        flex-basis: 185px !important;
    }

    #clearCalculatorFilters {
        padding: 7px 11px !important;
    }
}


/* =========================================================
   11. RESPONSIVE: TABLET AND MOBILE
   ========================================================= */

@media (max-width: 991.98px) {

    .custom-navbar {
        min-height: 58px;
    }

        .custom-navbar .container,
        .custom-navbar .container-fluid {
            min-height: 50px;
        }

        .custom-navbar .navbar-brand img {
            max-height: 42px;
        }

        .custom-navbar .navbar-nav {
            align-items: stretch;
            margin-top: 8px;
        }

            .custom-navbar .navbar-nav .nav-link {
                padding: 8px 12px !important;
            }

    .home-hero::before,
    .home-hero::after {
        opacity: 0.25;
    }
}


/* =========================================================
   12. RESPONSIVE: MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    /* Navbar */

    .custom-navbar .navbar-brand img {
        max-height: 38px;
        max-width: 210px;
    }

    /* Hero */

    .home-hero {
        padding: 16px 18px !important;
        margin-top: 10px !important;
        margin-bottom: 14px !important;
    }

        .home-hero h1 {
            font-size: 1.5rem !important;
            letter-spacing: -0.5px;
        }

        .home-hero .home-eyebrow {
            font-size: 0.75rem;
        }

        .home-hero p:not(.home-eyebrow) {
            font-size: 0.92rem !important;
        }

        .home-hero::before,
        .home-hero::after {
            display: none;
        }

    /* Search controls */

    .home-discovery {
        padding: 12px !important;
        margin-bottom: 20px !important;
    }

    .home-discovery-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        flex-wrap: wrap !important;
        gap: 9px;
    }

    .home-search {
        width: 100%;
        flex: 1 1 auto !important;
    }

        .home-search input {
            height: 42px !important;
        }

    #calculatorSearchCount {
        flex: 0 0 auto;
        width: auto;
    }

    .home-category-select {
        width: 100%;
        flex: 1 1 auto !important;
    }

        .home-category-select .form-select {
            height: 42px !important;
        }

    #clearCalculatorFilters {
        width: 100%;
        height: 42px !important;
    }

    /* Benefits */

    .home-benefits {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }
}


/* =========================================================
   13. RESPONSIVE: SMALL MOBILE
   ========================================================= */

@media (max-width: 575.98px) {

    .home-catalog {
        padding-left: 12px;
        padding-right: 12px;
    }

    .home-hero h1 {
        font-size: 1.38rem !important;
    }

    .home-hero .home-eyebrow {
        letter-spacing: 1px;
    }

    .home-category .calculator-explore-section .row > [class*="col-"] {
        margin-bottom: 14px;
    }
}

/* =========================================================
   DECHATURA FOOTER
   ========================================================= */

.footer {
    margin-top: 32px !important;
    padding: 22px 0 18px;
    background: #FFFFFF;
    color: #617895;
    border-top: 1px solid #E2E8F0;
    box-shadow: 0 -4px 18px rgba(24, 54, 100, 0.025);
    font-size: 0.92rem;
}

    /* Footer content */

    .footer .container {
        max-width: 1200px;
    }

    /* Copyright */

    .footer p {
        margin: 0 0 10px;
        color: #526A8A;
        font-size: 0.9rem;
        font-weight: 500;
        line-height: 1.6;
    }

    /* Footer navigation */

    .footer .container > div {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0 10px;
        color: #CBD5E1;
    }

    /* Footer links */

    .footer a {
        display: inline-block;
        color: #1F6F5F;
        font-size: 0.9rem;
        font-weight: 600;
        text-decoration: none;
        padding: 3px 0;
        transition: color 0.2s ease;
    }

        .footer a:hover {
            color: #174F46;
            text-decoration: underline;
            text-underline-offset: 3px;
        }

        /* Keyboard accessibility */

        .footer a:focus-visible {
            outline: 2px solid #2E8B57;
            outline-offset: 4px;
            border-radius: 3px;
        }

/* Mobile footer */

@media (max-width: 575.98px) {
    .footer {
        margin-top: 24px !important;
        padding: 18px 12px 16px;
    }

        .footer p {
            font-size: 0.84rem;
            margin-bottom: 8px;
        }

        .footer .container > div {
            gap: 4px 10px;
        }

        .footer a {
            font-size: 0.85rem;
        }
}



/* =========================================================
   DECHATURA TABLE THEME
   Overrides the existing green calculator table headers
   ========================================================= */

:root {
    --table-header-bg: #EAF1FF;
    --table-header-text: #173F91;
    --table-header-border: #D5E1FA;
    --table-body-border: #E7EDF5;
    --table-row-hover: #F4F7FF;
}

/* Table container */
.table-responsive {
    background: #FFFFFF;
    border: 1px solid #E3EAF4;
    border-radius: 14px;
    box-shadow: 0 5px 16px rgba(26, 54, 100, 0.045);
}

    /* Headers inside responsive calculator tables */
    .table-responsive > .table:not(.table-light):not(.table-dark) > thead > tr > th,
    .table-responsive > .table:not(.table-light):not(.table-dark) > thead > tr > td {
        background: var(--table-header-bg) !important;
        background-color: var(--table-header-bg) !important;
        color: var(--table-header-text) !important;
        font-weight: 700;
        font-size: 0.9rem;
        vertical-align: middle;
        text-align: left;
        padding: 11px 14px;
        border-color: var(--table-header-border) !important;
        border-bottom: 2px solid var(--table-header-border) !important;
        text-shadow: none !important;
        white-space: nowrap;
    }

    /* Sticky headers remain visible while scrolling */
    .table-responsive > .table:not(.table-light):not(.table-dark) > thead > tr > th {
        position: sticky;
        top: 0;
        z-index: 4;
    }

/* Tables outside .table-responsive */
.table:not(.table-light):not(.table-dark) > thead > tr > th,
.table:not(.table-light):not(.table-dark) > thead > tr > td {
    background: var(--table-header-bg) !important;
    background-color: var(--table-header-bg) !important;
    color: var(--table-header-text) !important;
    font-weight: 700;
    vertical-align: middle;
    border-color: var(--table-header-border) !important;
    border-bottom: 2px solid var(--table-header-border) !important;
    text-shadow: none !important;
}

/* Table body cells */
.table-responsive > .table > tbody > tr > td,
.table > tbody > tr > td {
    padding: 10px 14px;
    vertical-align: middle;
    color: #334B6B;
    border-color: var(--table-body-border);
}

/* Alternating rows for easier reading */
.table-responsive > .table > tbody > tr:nth-child(even) > td,
.table > tbody > tr:nth-child(even) > td {
    background-color: #FAFBFE;
}

/* Row hover */
.table-responsive > .table > tbody > tr:hover > td,
.table > tbody > tr:hover > td {
    background-color: var(--table-row-hover);
}

/* Keep table text readable */
.table {
    color: #334B6B;
    margin-bottom: 0;
}

/* Compact table spacing on mobile */
@media (max-width: 767.98px) {
    .table-responsive {
        border-radius: 11px;
    }

        .table-responsive > .table:not(.table-light):not(.table-dark) > thead > tr > th {
            padding: 9px 11px;
            font-size: 0.82rem;
        }

        .table-responsive > .table > tbody > tr > td {
            padding: 9px 11px;
            font-size: 0.85rem;
        }
}



/* =========================================================
   DECHATURA CALCULATOR TILES
   Shared styling for all homepage category partial views
   ========================================================= */

/* Category section */
.related-calculators {
    margin-top: 22px !important;
    margin-bottom: 30px;
}

.calculator-explore-section {
    width: 100%;
}

/* Category heading */
.home-category-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

    .home-category-heading h2 {
        margin: 0 0 5px;
        color: #173F91;
        font-size: clamp(1.3rem, 2vw, 1.65rem);
        font-weight: 800;
        letter-spacing: -0.5px;
        line-height: 1.3;
    }

    .home-category-heading p {
        margin: 0;
        color: #617895;
        font-size: 0.94rem;
        line-height: 1.55;
    }

/* Number of calculators badge */
.home-category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 36px;
    padding: 7px 13px;
    border-radius: 999px;
    background: #E8F8F3;
    color: #16866F;
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
}

/* Consistent card grid spacing */
.calculator-explore-section .row {
    row-gap: 18px;
}

/* Main calculator card */
.calculator-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    min-height: 220px;
    padding: 20px 18px 17px;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E3EAF4;
    border-radius: 16px;
    box-shadow: 0 5px 16px rgba(26, 54, 100, 0.055);
    color: #173F91;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

    /* Subtle brand accent at the bottom */
    .calculator-tile::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient( 90deg, #39A8F2 0%, #7162ED 55%, #2CC6A5 100% );
        opacity: 0.85;
    }

    /* Hover interaction */
    .calculator-tile:hover {
        transform: translateY(-4px);
        border-color: #C9D8F6;
        box-shadow: 0 12px 26px rgba(26, 54, 100, 0.11);
        color: #173F91;
        text-decoration: none !important;
    }

    /* Keyboard accessibility */
    .calculator-tile:focus-visible {
        outline: 3px solid rgba(75, 110, 235, 0.45);
        outline-offset: 3px;
    }

    /* Calculator icon */
    .calculator-tile .calculator-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        min-width: 48px;
        margin-bottom: 14px;
        border-radius: 13px;
        background: #EAF3FF;
        font-size: 1.55rem;
        line-height: 1;
        transition: transform 0.2s ease;
    }

    .calculator-tile:hover .calculator-icon {
        transform: scale(1.06);
    }

    /* Calculator title */
    .calculator-tile h3 {
        margin: 0 0 8px;
        color: #173F91;
        font-size: 1.04rem;
        font-weight: 800;
        line-height: 1.4;
        letter-spacing: -0.2px;
    }

    /* Description */
    .calculator-tile p {
        margin: 0 0 16px;
        color: #617895;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    /* Action link */
    .calculator-tile .home-card-action {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid #EDF1F7;
        color: #4266D5;
        font-size: 0.86rem;
        font-weight: 800;
    }

        /* Action arrow */
        .calculator-tile .home-card-action > span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 30px;
            height: 30px;
            flex-shrink: 0;
            border-radius: 50%;
            background: #EFF3FF;
            color: #3159C9;
            font-size: 1.15rem;
            transition: transform 0.2s ease, background-color 0.2s ease;
        }

    .calculator-tile:hover .home-card-action > span {
        transform: translateX(3px);
        background: #E1E9FF;
    }

    /* Don't show hidden cards when search filters the catalog */
    .calculator-tile[hidden],
    .home-category[hidden],
    .home-category .row > [hidden] {
        display: none !important;
    }

/* Tablet */
@media (max-width: 767.98px) {
    .home-category-heading {
        align-items: flex-start;
        gap: 10px;
    }

        .home-category-heading h2 {
            font-size: 1.35rem;
        }

        .home-category-heading p {
            font-size: 0.88rem;
        }

    .calculator-tile {
        min-height: 205px;
        padding: 17px 15px 15px;
    }

        .calculator-tile .calculator-icon {
            width: 44px;
            height: 44px;
            min-width: 44px;
            font-size: 1.4rem;
        }
}

/* Small mobile */
@media (max-width: 575.98px) {
    .home-category-count {
        min-height: 31px;
        padding: 6px 10px;
        font-size: 0.77rem;
    }

    .calculator-tile {
        min-height: 190px;
        border-radius: 14px;
    }

        .calculator-tile h3 {
            font-size: 1rem;
        }
}

@media (prefers-reduced-motion: reduce) {
    .calculator-tile,
    .calculator-tile .calculator-icon,
    .calculator-tile .home-card-action > span {
        transition: none;
    }

        .calculator-tile:hover {
            transform: none;
        }
}


/* =========================================================
   CATEGORY PAGE HERO
   Shared by category landing pages
   ========================================================= */

.calculator-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 16px 0 26px;
    padding: 24px 28px;
    border: 1px solid #DFE8FC;
    border-radius: 18px;
    background: linear-gradient( 112deg, #EFF7FF 0%, #EEF1FF 55%, #F3EEFF 100% );
    box-shadow: 0 6px 20px rgba(34, 65, 125, 0.045);
}

    /* Soft decorative background */

    .calculator-hero::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: -65px;
        right: 90px;
        width: 200px;
        height: 200px;
        border: 24px solid rgba(90, 113, 235, 0.07);
        border-radius: 50%;
        pointer-events: none;
    }

    .calculator-hero::after {
        content: "";
        position: absolute;
        z-index: -1;
        right: -45px;
        bottom: -90px;
        width: 220px;
        height: 220px;
        border-radius: 50%;
        background: rgba(112, 83, 225, 0.055);
        pointer-events: none;
    }

/* Hero layout */

.calculator-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.calculator-hero-main {
    flex: 1 1 auto;
    min-width: 0;
}

/* Eyebrow */

.calculator-hero-eyebrow {
    display: inline-block;
    margin-bottom: 7px;
    color: #6458D9;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

/* Heading */

.calculator-hero h1 {
    margin: 0 0 9px;
    color: #173F91;
    font-size: clamp(1.65rem, 2.5vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.7px;
}

/* Description */

.calculator-hero-description {
    max-width: 820px;
    margin: 0;
    color: #536D91;
    font-size: 0.97rem;
    line-height: 1.65;
}

/* Trust badges */

.calculator-trust-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 17px;
}

.calculator-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(199, 214, 244, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    color: #35557F;
    font-size: 0.79rem;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
}

    .calculator-trust-item > span {
        color: #16866F;
        font-size: 0.9rem;
        font-weight: 900;
    }

/* Badge on the right */

.calculator-hero-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: 0 0 112px;
    min-height: 112px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 22px rgba(51, 76, 150, 0.07);
    color: #405BC4;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: center;
    overflow-wrap: anywhere;
}

.calculator-hero-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #E6F1FF, #EDE8FF);
    color: #6256D9;
    font-size: 1.35rem;
}

/* Tablet */

@media (max-width: 767.98px) {
    .calculator-hero {
        margin: 12px 0 20px;
        padding: 20px;
        border-radius: 15px;
    }

    .calculator-hero-content {
        align-items: flex-start;
        gap: 14px;
    }

    .calculator-hero h1 {
        font-size: 1.65rem;
    }

    .calculator-hero-description {
        font-size: 0.92rem;
    }

    .calculator-trust-strip {
        gap: 7px;
        margin-top: 14px;
    }

    .calculator-trust-item {
        font-size: 0.76rem;
        padding: 6px 9px;
    }

    .calculator-hero-badge {
        flex-basis: 88px;
        min-height: 88px;
        padding: 9px;
        border-radius: 15px;
        font-size: 0.8rem;
    }

    .calculator-hero-badge-icon {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }
}

/* Small mobile */

@media (max-width: 480px) {
    .calculator-hero {
        padding: 17px;
    }

    .calculator-hero-content {
        flex-direction: column;
        gap: 14px;
    }

    .calculator-hero h1 {
        font-size: 1.5rem;
        letter-spacing: -0.4px;
    }

    .calculator-hero-description {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .calculator-trust-strip {
        gap: 6px;
    }

    .calculator-trust-item {
        white-space: normal;
        font-size: 0.74rem;
    }

    .calculator-hero-badge {
        flex-direction: row;
        justify-content: flex-start;
        flex: 0 0 auto;
        width: 100%;
        min-height: 0;
        padding: 9px 11px;
    }

    .calculator-hero-badge-icon {
        flex-shrink: 0;
    }
}

/* Compact calculator hero */
.calculator-hero {
    margin: 12px 0 18px;
    padding: 16px 22px;
}

.calculator-hero-content {
    gap: 16px;
}

.calculator-hero-eyebrow {
    margin-bottom: 4px;
    line-height: 1.2;
    font-size: 0.72rem;
}

.calculator-hero h1 {
    margin: 0 0 6px;
    line-height: 1.2;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.calculator-hero-description {
    margin: 0 0 10px;
    line-height: 1.45;
    font-size: 0.94rem;
}

.calculator-trust-strip {
    gap: 6px;
    margin-top: 8px;
}

.calculator-trust-item {
    padding: 5px 9px;
    line-height: 1.2;
    font-size: 0.76rem;
}

.calculator-hero-badge {
    padding: 10px 14px;
    gap: 8px;
    line-height: 1.3;
    font-size: 0.88rem;
}

.calculator-hero-badge-icon {
    font-size: 1.15rem;
}

/* Tablet and mobile */
@media (max-width: 767.98px) {
    .calculator-hero {
        margin: 10px 0 16px;
        padding: 14px 16px;
    }

    .calculator-hero-content {
        gap: 12px;
    }

    .calculator-hero h1 {
        font-size: 1.55rem;
        margin-bottom: 5px;
    }

    .calculator-hero-description {
        margin-bottom: 8px;
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .calculator-trust-strip {
        gap: 5px;
        margin-top: 6px;
    }

    .calculator-trust-item {
        padding: 4px 7px;
        font-size: 0.72rem;
    }

    .calculator-hero-badge {
        padding: 8px 11px;
    }
}

@media (max-width: 480px) {
    .calculator-hero {
        padding: 12px 13px;
        margin: 8px 0 14px;
    }

        .calculator-hero h1 {
            font-size: 1.4rem;
        }

    .calculator-hero-eyebrow {
        font-size: 0.68rem;
    }

    .calculator-hero-description {
        font-size: 0.86rem;
    }
}



/* =========================================================
   MOBILE NAVBAR TOGGLER FIX
   Keep the hamburger visible on mobile and tablet
   ========================================================= */

/* Make the navbar toggler visible below Bootstrap's lg breakpoint */
@media (max-width: 991.98px) {

    .custom-navbar .navbar-toggler {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 44px;
        height: 42px;
        padding: 8px 10px;
        margin-left: auto;
        border: 1px solid rgba(255, 255, 255, 0.75);
        border-radius: 10px;
        background-color: rgba(255, 255, 255, 0.12);
        opacity: 1;
        visibility: visible;
        box-shadow: none;
    }

    /* Visible white hamburger icon */
    .custom-navbar .navbar-toggler-icon {
        width: 1.5em;
        height: 1.5em;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255%2C255%2C255%2C1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 100%;
        opacity: 1;
    }

    /* Toggler hover and focus */
    .custom-navbar .navbar-toggler:hover {
        background-color: rgba(255, 255, 255, 0.22);
    }

    .custom-navbar .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
        outline: none;
    }

    /* Ensure the collapsed menu remains visible when opened */
    .custom-navbar .navbar-collapse.show,
    .custom-navbar .navbar-collapse.collapsing {
        display: block;
    }
}

/* Desktop: Bootstrap should hide the hamburger */
@media (min-width: 992px) {
    .custom-navbar .navbar-toggler {
        display: none !important;
    }
}

