/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font Definitions */
@font-face {
    font-family: 'Roboto-Light';
    src: url('../../fonts/Roboto-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'ProductSans-Light';
    src: url('../../fonts/ProductSans-Light.ttf') format('truetype');
}

@font-face {
    font-family: 'ProductSans-Thin';
    src: url('../../fonts/ProductSans-Thin.ttf') format('truetype');
}

/* Page Background Color */
body {
    background-color: #F4F4F4;
    font-family: 'ProductSans-Light', sans-serif;
    overflow-x: hidden; /* Safety net for horizontal scroll */
    width: 100%;
}

/* ============================ */
/* Hero Section                 */
/* ============================ */
.hero-section {
    width: 100%;
    min-height: 40vh;
    height: auto; 
    background-image: url('../../img/Refinance_Hero.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2vh; 
    padding: 4vh 5vw; /* Adjusted padding */
    overflow: hidden; 
}

.hero-nav { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    gap: 3vh; 
    z-index: 10; 
    margin-top: 1vh;
    flex-wrap: wrap; /* Prevents overflow on tiny screens */
}

.hero-nav a { 
    color: #cacaca; 
    text-decoration: none; 
    font-size: 1.8vh;
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 300; 
    transition: color .3s ease; 
    text-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    white-space: nowrap; 
}

.hero-nav a:hover { 
    color: #fff; 
}

.hero-logo {
    height: 12vh; /* Adjusted for better mobile fit */
    width: auto;
    display: block;
    filter: drop-shadow(0px 4px 6px rgba(0, 0, 0, 0.6));
}

.hero-section h1 {
    color: #ffffff;
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 300;
    font-size: 7vmin;
    white-space: normal; 
    text-align: center;
    line-height: 1.2;
    text-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    margin: 0;
    max-width: 95%;
}

.breathing-text {
    color: #e0e0e0;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2.2vmin;
    text-align: center;
    text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
    min-height: 1.5em;
    opacity: 1;
    transition: opacity 1s ease-in-out;
    margin: 0;
    padding: 0 10px;
}

.breathing-text.fade-out {
    opacity: 0;
}

/* ============================ */
/* Breadcrumb Navigation        */
/* ============================ */
.breadcrumb-nav {
    width: 100%;
    display: flex;
    justify-content: flex-start; 
    align-items: center;
    gap: 10px;
    margin-top: 2vh; 
    padding: 0 8vw; 
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 300;
    font-size: 1.8vh; 
    flex-wrap: wrap;
}

.breadcrumb-nav a, 
.breadcrumb-nav .current-page,
.breadcrumb-nav .separator {
    text-decoration: none;
    color: #7a7a7a; 
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #000000;
}

.breadcrumb-nav .separator {
    opacity: 0.5;
}

.breadcrumb-nav .current-page {
    cursor: default;
}

/* ============================ */
/* Calculator Main Layout       */
/* ============================ */
.calculator-container {
    width: 100%;
    max-width: 100vw; /* Strict limit */
    padding: 0 8vw; 
    margin-top: 2vh;
    margin-bottom: 8vh;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; 
    gap: 60px; 
}

.calc-section {
    width: 100%;
}

/* Left Section (Inputs) */
.left-section {
    flex: 1.8; 
    min-width: 0; /* Allows flex item to shrink properly */
}

/* Right Section (Results) - STICKY, EXPANDED & MASKED */
.right-section {
    flex: 1;
    min-width: 0;
    
    /* Sticky Logic starts here */
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 40px; /* Sticks 40px from top of viewport */
    align-self: flex-start; /* Ensures it doesn't stretch */
    
    /* Scroll Logic (Invisible Scrollbar) */
    max-height: calc(100vh - 50px); /* Restrict height to viewport */
    overflow-y: auto; /* Enable internal scroll */
    scrollbar-width: none; /* Firefox: Hide scrollbar */
    -ms-overflow-style: none; /* IE/Edge: Hide scrollbar */
    
    z-index: 10;

    /* EXPAND REGION FOR SHADOWS */
    /* Padding creates internal space for shadows/mask */
    padding: 40px; 
    /* Negative margin pulls the box boundaries out so it fits visually in the same slot */
    margin: -40px;

    /* FADE MASK FOR SCROLL EDGES */
    /* Fades the top 40px and bottom 40px to transparent */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0px, black 40px, black calc(100% - 40px), transparent 100%);
}

/* Chrome/Safari/Webkit: Hide scrollbar for Results */
.right-section::-webkit-scrollbar {
    display: none;
}

/* Header Row - REVERTED TO VERTICAL */
.header-row {
    display: flex;
    flex-direction: column; /* Stacked */
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 2vh; 
}

/* THIS IS THE UPDATED HEADING STYLE */
.calc-section h2 {
    font-family: 'ProductSans-Thin', sans-serif;
    font-weight: 300;
    /* Massive Independent Sizing Logic */
    /* Min: 3.5rem (Mobile), Preferred: 8vw (Fluid), Max: 7rem (Desktop) */
    font-size: clamp(3.5rem, 8vw, 7rem); 
    line-height: 1.1; /* Tighter line height for large text */
    letter-spacing: -1px; /* Slightly tighter spacing for elegance */
    color: #333;
    margin-top: 0;
    margin-bottom: 30px; /* Increased margin for massive size */
    white-space: nowrap; 
}

.text-link-btn {
    background: none;
    border: none;
    color: #7a7a7a;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.8vh;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
}

.text-link-btn:hover {
    color: #000;
}

/* Left Section Specifics */
.left-section h2 {
    text-align: left;
}

/* Right Section Specifics */
.right-section h2 {
    text-align: left; 
    margin-bottom: 20px; 
}

/* ============================ */
/* Input Mode Cards             */
/* ============================ */
.mode-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 12px;
    width: 100%;
    margin-bottom: 40px; 
}

.mode-card {
    appearance: none;
    position: relative;
    background-color: #ffffff;
    border: none;
    border-radius: 12px; 
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    overflow: hidden;
    height: 12vh;
    width: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
}

.mode-card:hover {
    transform: translateY(-3px);
    box-shadow: 0px 12px 25px rgba(0, 0, 0, 0.1);
}

.mode-card.active-mode {
    box-shadow: 0px 0px 0px 3px #B5855E; 
}

.mode-card img {
    width: 100%;
    height: 100%; 
    object-fit: cover;
    display: block;
    filter: brightness(0.65); 
    transition: filter 0.3s ease;
}

.mode-card:hover img {
    filter: brightness(0.75); 
}

.mode-card span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 95%; 
    white-space: normal; 
    line-height: 1.1;
    font-family: 'ProductSans-Light', sans-serif; 
    font-size: 1.5vh; 
    color: #ffffff; 
    text-align: center;
    text-shadow: 0px 2px 5px rgba(0, 0, 0, 1); 
    pointer-events: none; 
}

/* ========================================= */
/* GLOBAL TOOLTIP STYLE                      */
/* ========================================= */
.global-tooltip {
    position: fixed;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 20px;
    width: 280px;
    z-index: 9999;
    pointer-events: none; /* Allows mouse to pass through */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    text-align: center;
    color: #333;
}

.global-tooltip h4 {
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 600;
    color: #B5855E;
    margin-bottom: 8px;
    font-size: 1.8vh;
}

.global-tooltip p {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.5vh;
    line-height: 1.4;
    color: #555;
    margin: 0;
}

/* ============================ */
/* Inputs Styling (GRID)        */
/* ============================ */
.global-settings,
.mode-inputs,
.advanced-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    column-gap: 40px; 
    row-gap: 30px; 
    width: 100%;
}

.global-settings {
    margin-bottom: 50px; 
}

/* NEW RULE: EXPAND LOCATION SELECTOR TO 2 COLUMNS */
.global-settings .input-wrapper {
    grid-column: 1 / -1;
}

.advanced-content {
    grid-column: 1 / -1; 
    margin-top: 0;
}

.input-wrapper {
    margin-bottom: 0; 
    width: 100%;
}

.input-sub-header {
    grid-column: 1 / -1;
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 400;
    font-size: 2vh;
    color: #000000;
    margin-top: 25px; 
    margin-bottom: 5px; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-wrapper label {
    display: block;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    color: #666;
    margin-bottom: 3px;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input[type=number] {
    width: 100%;
    border: none; 
    background: transparent;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2.2vh;
    color: #333;
    padding: 2px 0 0 0;
    outline: none;
    -moz-appearance: textfield;
}

.input-group input[type=number]::-webkit-outer-spin-button,
.input-group input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-group input[type=range] {
    -webkit-appearance: none; 
    appearance: none;
    width: 100%; 
    height: 20px; 
    border: 9px solid transparent; 
    border-left: 0; border-right: 0; 
    background-clip: content-box; 
    background-color: transparent;
    border-radius: 0px; 
    outline: none; 
    opacity: 0.5; 
    transition: border-width .2s ease, opacity .2s ease; 
    cursor: pointer;
    margin-top: 2px; 
    display: block;
    position: relative;
    z-index: 5;
}

.input-group input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 100%;
    cursor: pointer;
    background: transparent; 
    border: none;
    border-radius: 0px;
}

.input-group input[type=range]:hover, 
.input-group input[type=range]:focus, 
.input-group input[type=range]:active { 
    border-width: 7px;
    opacity: 1; 
}

.input-group input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 0; height: 0; background: transparent; cursor: pointer; opacity: 0;
}
.input-group input[type=range]::-moz-range-thumb {
    width: 0; height: 0; border: none; background: transparent; cursor: pointer; opacity: 0;
}

/* ============================ */
/* Custom Dropdown BOXED        */
/* ============================ */
.custom-dropdown-container {
    position: relative;
    width: 100%;
    box-sizing: border-box; 
    margin-top: 3px; 
}

.hidden-select {
    display: none;
}

.custom-dropdown-trigger {
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 2.2vh; 
    color: #333;
    background-color: transparent;
    outline: none;
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 300;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23555" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center; 
    transition: border-color 0.3s ease;
}

.custom-dropdown-trigger:hover {
    border-color: #D4BCA9;
}

.custom-dropdown-container:focus-within .custom-dropdown-trigger {
    border-color: #B5855E;
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fafafa;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 6px 2px 6px 6px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-height: 250px;
    overflow: hidden;
}

.custom-dropdown-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-options-wrapper {
    overflow-y: auto;
    max-height: 100%;
    padding-right: 4px;
}

.dropdown-options-wrapper::-webkit-scrollbar { width: 8px; }
.dropdown-options-wrapper::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 10px; border: 1px solid #fafafa; }

.dropdown-option {
    padding: 10px 15px; 
    font-size: 0.95rem;
    color: #555;
    cursor: pointer;
    border-radius: 8px; 
    margin-bottom: 2px; 
    transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-option:hover { background: #eae5df; color: #000; }
.dropdown-option.selected { font-weight: 500; color: #000; background: #ffffff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }

/* ============================ */
/* Results Styling              */
/* ============================ */
.right-section .advanced-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* FIX: Enable Container Queries and FLEX ALIGNMENT */
.result-box {
    margin-bottom: 30px; 
    text-align: left; 
    width: 100%;
    container-type: inline-size; /* Parent allows children to query its width */
    
    /* NEW: Flexbox alignment to push Values to bottom */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%; /* Stretches to fill grid cell */
}

/* GRID for Basic Results (2x2) */
.results-basic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    margin-bottom: 20px;
    width: 100%;
}

.results-basic-grid .result-box {
    margin-bottom: 0;
}

.results-sub-header {
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 400;
    font-size: 1.8vh;
    color: #B5855E;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-label {
    display: block;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    color: #666;
    margin-bottom: 3px;
    white-space: normal;
    line-height: 1.2;
}

/* ============================================== */
/* FIX: UNIFORM RESPONSIVE SIZING (NO OVERLAP)    */
/* ============================================== */
.result-value {
    display: block;
    font-family: 'ProductSans-Thin', sans-serif;
    font-weight: 100;
    line-height: 0.9;
    white-space: nowrap; 
    color: #333;
    letter-spacing: -2px; /* Tight & Modern */
}

/* 
   LOGIC FOR MATCHING SIZES:
   - Basic Grid Box is approx 50% width of parent.
   - Advanced Box is 100% width of parent.
   - To make the font visually the "same size", the cqi unit for the
     Advanced box must be roughly half of the Basic box.
   - 24cqi (Basic) vs 11cqi (Advanced) balances them out perfectly.
*/

/* 1. Context: Basic Grid (Small Boxes) */
.results-basic-grid .result-value {
    font-size: clamp(2rem, 24cqi, 5rem);
}

/* 2. Context: Advanced List (Full Width Boxes) */
.advanced-content .result-value {
    font-size: clamp(2rem, 11cqi, 5rem); 
}

.result-value.good { color: #2ecc71; }
.result-value.warn { color: #e67e22; }
.result-value.bad { color: #e74c3c; }

/* MENTOR SUMMARY (Dynamic Text) */
.mentor-text {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.8vh; /* Slightly larger for readability */
    color: #333;
    line-height: 1.6;
    /* MODIFIED: Increased margin from 25px to 50px */
    margin-bottom: 50px; 
}

.mentor-text strong {
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 600;
    color: #000;
}

/* Stress Test Container */
.stress-test-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.04);
    width: 100%;
    /* FIX: Enable container queries */
    container-type: inline-size;
}

.stress-test-container h3 {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2vh;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.scenarios-grid {
    display: grid;
    /* Force 3 columns, never wrap */
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2px; 
    margin-bottom: 20px;
    text-align: center;
}

.scenario-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center; 
    /* FIX: Align items top and bottom correctly */
    justify-content: space-between;
    height: 100%;
}

/* Stress Test Label (Headings) */
.scen-label {
    font-size: 1.4vh;
    color: #888;
    font-family: 'ProductSans-Light', sans-serif;
    white-space: normal; /* FIX: Allow wrapping */
    line-height: 1.2;    /* FIX: Good spacing for multi-line */
    overflow-wrap: break-word; /* FIX: Prevent overflow for single long words */
    max-width: 100%;
}

/* Stress Test Numbers */
.scen-val {
    font-family: 'ProductSans-Thin', sans-serif; 
    font-weight: 100;
    
    /* FIX: Use pre-line to handle newlines, and adjust size to fit */
    font-size: clamp(1.0rem, 8cqi, 3.5rem);
    
    line-height: 1.1; 
    white-space: pre-line; /* Allows "Left:" to break onto new line */
    letter-spacing: -1px; 
    text-align: center;
    width: 100%;
}

@container (max-width: 450px) {
    .scen-val {
        font-family: 'ProductSans-Light', sans-serif; 
        font-weight: 400; 
        letter-spacing: -1px; 
    }
}

.scenario-col.optimistic .scen-val { color: #2ecc71; }
.scenario-col.base .scen-val { color: #333; }
.scenario-col.bear .scen-val { color: #e74c3c; }

.stress-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.verdict-row {
    margin-bottom: 5px;
}

.verdict-badge {
    background-color: #2ecc71;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 1.6vh;
    font-weight: 500;
}

.action-logic {
    font-size: 1.6vh;
    color: #555;
    line-height: 1.4;
    margin: 0;
}

.kill-var {
    font-size: 1.4vh;
    color: #999;
    margin-top: 5px;
    display: flex;
    gap: 5px;
}

.kill-var .val {
    color: #e74c3c;
    font-weight: 500;
}

.divider {
    display: none; 
}

.hidden {
    display: none !important;
}

/* ============================ */
/* SEO Content Section Styles   */
/* ============================ */
.seo-content-wrapper {
    width: 100%;
    /* Transparent background to blend in */
    background-color: transparent; 
    /* Match calculator container padding for alignment */
    padding: 0 8vw; 
    margin-top: 60px;
    margin-bottom: 100px;
    max-width: 100vw;
}

.seo-content {
    /* Wider max-width to look like part of tool */
    max-width: 1200px; 
    /* Strictly Left Aligned */
    text-align: left; 
    margin: 0;
}

.seo-block {
    margin-bottom: 60px;
}

.seo-block h2 {
    font-family: 'ProductSans-Light', sans-serif;
    /* MINIMAL: No Border */
    border-left: none;
    padding-left: 0;
    font-weight: 300;
    /* INCREASED SIZE */
    font-size: 5vmin; 
    /* BLACK COLOR */
    color: #000;
    margin-bottom: 30px;
    line-height: 1.2;
}

.seo-block h3 {
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 400;
    /* INCREASED SIZE */
    font-size: 3.5vmin;
    /* BLACK COLOR (Was Brown) */
    color: #000; 
    margin-bottom: 20px;
    margin-top: 40px;
}

.seo-block p {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.15rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 25px;
    max-width: 900px; /* Keep paragraphs readable length */
}

.seo-divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 60px 0;
    max-width: 100%;
}

.seo-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 30px;
    max-width: 900px;
}

.seo-list li {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.seo-list li::before {
    content: "•";
    color: #B5855E;
    font-weight: bold;
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: -2px;
}

.seo-list strong {
    color: #333;
    font-weight: 600;
}

.formula-box {
    /* MINIMAL: Removed Background and Border/Shadow */
    background-color: transparent;
    border-left: none;
    box-shadow: none;
    
    padding: 10px 0;
    /* Increased Size and Clarity */
    font-size: 1.4rem;
    color: #000;
    margin: 30px 0;
    font-weight: 500;
    max-width: 800px;
}

/* Glossary Styles */
.seo-glossary dt {
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #333;
    margin-top: 25px;
}

.seo-glossary dd {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.05rem;
    color: #666;
    line-height: 1.6;
    margin-left: 0;
    margin-bottom: 15px;
    padding-left: 20px;
    border-left: 2px solid #ccc;
    max-width: 900px;
}

/* ============================================== */
/* FAQ / PEOPLE ALSO ASK STYLES (NEW)             */
/* ============================================== */

.faq-container {
    margin-top: 80px;
    max-width: 900px;
}

.faq-container h3 {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 3.5vmin;
    color: #000;
    margin-bottom: 30px;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.faq-question {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 20px 0;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover,
.faq-question.active {
    color: #B5855E;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg); /* Turns + into x */
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer p {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    padding-bottom: 20px;
    margin: 0;
}


/* Responsive SEO Content */
@media (max-width: 768px) {
    .seo-content-wrapper {
        padding: 40px 5vw;
    }
    .seo-block h2 {
        font-size: 2.2rem;
        padding-left: 0;
    }
    .seo-block h3 {
        font-size: 1.6rem;
    }
    .seo-block p, .seo-list li {
        font-size: 1rem;
    }
    .formula-box {
        font-size: 1.1rem;
        padding: 10px 0;
    }
}

/* ============================ */
/* Responsive                   */
/* ============================ */

/* TABLET */
@media (max-width: 1214px) {
    .mode-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* MOBILE */
@media (max-width: 990px) {
    .calculator-container {
        padding: 0 5vw; 
        flex-direction: column; 
        gap: 60px; 
        align-items: stretch; 
    }

    .left-section, .right-section {
        width: 100%;
        flex: 1;
    }

    /* Reset Desktop Sticky/Scroll logic for Mobile */
    .right-section {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 0;
        margin: 0;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .calc-section {
        max-width: 100%; 
    }
    
    .scenarios-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2px;
    }
}

/* SMALL MOBILE */
@media (max-width: 768px) {
    .global-settings,
    .mode-inputs,
    .advanced-content {
        grid-template-columns: 1fr; 
    }
    
    .scenarios-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2px;
    }
}

/* ============================ */
/* NEW ROBOTO FONTS FOR FOOTER  */
/* ============================ */
@font-face {
    font-family: 'Roboto';
    src: url('../../fonts/Roboto-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../../fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 600; /* Matching footer bold weight */
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../../fonts/Roboto-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../../fonts/Roboto-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

/* ============================ */
/* FOOTER STYLES                */
/* ============================ */
.site-footer {
    position: relative;
    width: 100%;
    /* Ensure this path points to your image correctly */
    background-image: url('../../img/footer.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    margin-top: auto;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 25, 20, 0.85);
    z-index: 1;
}

.footer-content {
    position: relative;
    z-index: 2;
    padding: 50px 8vw 30px 8vw;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-main-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 100px;
    width: 100%;
    align-items: center;
}

/* Branding */
.footer-left {
    flex: 0 1 auto;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    height: 80px;
    width: auto;
    opacity: 1;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.brand-name {
    font-family: 'Roboto', sans-serif;
    font-size: 3rem;
    font-weight: 100;
    color: #fff;
    letter-spacing: 0.05em;
    margin-top: 8px;
}

.tagline {
    font-size: 1rem;
    color: #e0e0e0;
    font-style: italic;
    margin: 0;
}

.description {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.5;
    max-width: 300px;
    margin: 5px 0;
}

.email-link {
    color: #D4BCA9;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 5px;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.email-link:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* Links */
.footer-links {
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 140px;
}

.footer-col h4 {
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #ffffff;
    margin: 0 0 8px 0;
    font-weight: 600;
}

.footer-col a {
    color: #bbbbbb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #ffffff;
}

/* Legal */
.footer-legal-row {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.copyright {
    font-size: 0.85rem;
    color: #bbb;
    margin: 0;
}

.disclaimer {
    font-size: 0.7rem;
    color: #999;
    line-height: 1.5;
    max-width: 900px;
    opacity: 0.7;
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 990px) {
    .footer-main-row {
        flex-direction: column;
        gap: 50px;
        align-items: center;
    }

    .footer-links {
        width: 100%;
        justify-content: center;
        gap: 50px;
        flex: auto;
    }
}

@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        gap: 40px;
        align-items: center;
    }

    .footer-col {
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .footer-content {
        padding: 40px 5vw 30px 5vw;
    }
}

/* Actions Buttons Styling */
.action-buttons-row { display: flex; gap: 20px; justify-content: flex-start; }
.action-btn {
    background: none; border: none; padding: 0; font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.15rem; color: #7a7a7a; cursor: pointer; transition: color 0.3s ease;
}
.action-btn:hover { color: #000000; }
@media (max-width: 600px) {
    #btn-save-pdf { font-size: 0; } #btn-save-pdf::after { content: 'PDF'; font-size: 1.15rem; }
}

/* Tutorial Modal Styling (Desktop & Mobile) */
.tutorial-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: radial-gradient(circle, rgba(255,255,255,0.7) 10%, rgba(0,0,0,0.15) 100%);
    backdrop-filter: blur(8px); z-index: 9999; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.tutorial-overlay.active { opacity: 1; visibility: visible; }
.tutorial-card {
    background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,0.15); width: 90%; max-width: 800px;
    padding: 40px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 20px;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@media (max-width: 600px) { .tutorial-card { width: 95%; padding: 20px; max-height: 90vh; overflow-y: auto; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } }
.tutorial-images-row { display: flex; justify-content: center; gap: 30px; width: 100%; margin-bottom: 20px; }
@media (max-width: 600px) { .tutorial-images-row { flex-direction: column; gap: 20px; } }
.tut-img-wrapper { flex: 1; aspect-ratio: 1 / 1; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); overflow: hidden; }
@media (max-width: 600px) { .tut-img-wrapper { width: 100%; } }
.tut-img-wrapper img { width: 100%; height: 100%; object-fit: contain; }
.proceed-btn {
    border: none; background-color: #f4f4f4; border-radius: 50px; font-family: 'ProductSans-Thin', sans-serif;
    font-size: 1.1rem; padding: 10px 50px; color: #ccc; transition: all 0.3s ease;
}
.proceed-btn:not(:disabled) { color: #000; cursor: pointer; font-weight: 600; }
.proceed-btn:not(:disabled):hover { color: #ffffff; background-color: #333333; }

/* --- OFFICIAL GOVERNMENT FORM PRINT STYLING (MINIMAL) --- */
.print-view { display: none; }

@media print {
    @page { size: letter; margin: 0.3in; }
    
    body > *:not(#print-view-container) { display: none !important; }
    
    #print-view-container { 
        display: block !important; 
        width: 100%; 
        color: #000; 
        background: #fff;
        font-family: 'ProductSans-Light', sans-serif !important; 
    }

    .doc-wrapper {
        width: 100%;
        max-width: 100%;
        padding-top: 5px;
    }

    /* === HEADER BLOCK === */
    .doc-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        /* Thick Double Lines */
        border-top: 4px solid #222;
        border-bottom: 4px solid #222;
        padding: 15px 0;
        margin-bottom: 25px;
    }
    .doc-logo {
        height: 60px;
        width: auto;
        margin-right: 30px;
    }
    .doc-title-block h1 {
        font-family: 'ProductSans-Light', sans-serif;
        font-size: 16pt;
        font-weight: bold;
        margin: 0;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        line-height: 1.2;
    }
    .doc-title-block h2 {
        font-family: 'ProductSans-Light', sans-serif;
        font-size: 11pt;
        font-weight: normal;
        margin: 4px 0 0 0;
        color: #000;
        text-transform: uppercase;
        letter-spacing: 0.02em;
    }

    /* === META INFO === */
    .doc-meta-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
        row-gap: 15px;
        margin-bottom: 30px;
        font-size: 9pt;
        font-family: 'ProductSans-Light', sans-serif;
    }
    .meta-row { display: flex; align-items: flex-end; justify-content: space-between;}
    .meta-group { display: flex; align-items: baseline; width: 48%; }
    .meta-label { font-weight: bold; margin-right: 8px; white-space: nowrap; }
    .meta-line { 
        flex: 1; 
        border-bottom: 1px solid #000; 
        padding-bottom: 2px; 
        min-width: 50px;
        text-align: center;
    }

    /* === SECTIONS === */
    .doc-section {
        margin-bottom: 25px; 
        page-break-inside: avoid;
    }
    .section-title {
        border-bottom: 1px solid #000; /* Thin line */
        padding: 0 0 4px 0;
        margin-bottom: 12px;
        font-weight: bold;
        font-size: 10pt;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-family: 'ProductSans-Light', sans-serif;
    }
    .section-content { padding: 0; }

    .context-box { font-size: 9pt; line-height: 1.4; margin-bottom: 15px; }

    /* === DATA GRID === */
    .data-grid-2col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
        row-gap: 6px;
        font-size: 9pt;
        font-family: 'ProductSans-Light', sans-serif;
    }
    .data-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
    }
    .lbl { color: #000; }
    .val { color: #000; font-weight: bold; text-align: right; }

    /* === ANALYST NOTE === */
    .analyst-note-block {
        margin-top: 15px;
        padding-left: 15px;
        border-left: 3px solid #444; /* Thick side border */
        font-size: 9pt;
        font-style: italic;
        line-height: 1.4;
        color: #333;
    }

    /* === SUMMARY SECTION === */
    .summary-grid { font-size: 10pt; }
    .sum-row { 
        display: flex; 
        justify-content: space-between; 
        margin-bottom: 8px; 
    }
    .sum-row.final {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #000;
        font-weight: bold;
    }

    /* === FOOTER === */
    .doc-footer {
        margin-top: 60px;
        font-size: 8pt;
        color: #000;
    }
    .signature-line {
        display: flex;
        justify-content: space-between;
        margin-bottom: 40px;
        padding: 0 40px;
    }
    .sig-block { display: flex; flex-direction: column; width: 40%; }
    /* FIXED: Using CSS border instead of underscores */
    .sig-rule { display: block; border-top: 1px solid #000; margin-bottom: 5px; height: 1px; width: 100%; }
    .sig-label { font-size: 7pt; text-transform: uppercase; font-weight: bold; }

    .legal-disclaimer {
        font-size: 7pt;
        color: #333;
        text-align: justify;
        line-height: 1.3;
    }
}