/* 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');
}

/* NEW ROBOTO FONTS FOR PRINT */
@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; 
    font-style: normal;
}

@font-face {
    font-family: 'Roboto';
    src: url('../../fonts/Roboto-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

/* Page Background Color */
body {
    background-color: #F4F4F4;
    font-family: 'ProductSans-Light', sans-serif;
    line-height: 1.5;
}

/* ============================ */
/* Hero Section                 */
/* ============================ */
.hero-section {
    width: 100%;
    height: 40vh; 
    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; 
    overflow: hidden; 
}

.hero-nav { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    gap: 3vh; 
    z-index: 10; 
    margin-top: 1vh;
}

.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: 15vh; 
    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: nowrap;
    text-align: center;
    line-height: 1.1;
    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: 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; 
}

.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;
}

/* ============================ */
/* CORE QUESTION (Native)       */
/* ============================ */
.core-question-wrapper {
    width: 100%;
    padding: 0 8vw;
    margin-top: 50px;
    margin-bottom: -30px; /* Pull closer to tool */
}

.core-question-wrapper h2 {
    font-family: 'ProductSans-Thin', sans-serif;
    font-size: 3.5rem;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.1;
}

.core-question-wrapper p {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    line-height: 1.4;
}

/* ============================ */
/* Calculator Main Layout       */
/* ============================ */
.calculator-container {
    width: 100%;
    padding: 0 8vw; 
    margin-top: 60px; 
    margin-bottom: 8vh;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; 
    gap: 80px; 
}

.calc-section {
    min-width: 300px;
}

/* Left Section (Inputs) - Compact Width */
.left-section {
    flex: 1.2; 
}

/* Right Section (Results) - STICKY ENABLED */
.right-section {
    flex: 1;
    /* Sticky Positioning */
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 20px; /* Distance from top of screen */
    
    /* Ensure it doesn't stretch to parent height, or sticky won't work */
    align-self: flex-start; 
    z-index: 10;
}

/* Header Row for Inputs */
.header-row {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 2vh; 
}

/* "Inputs" and "Results" Headers - MASSIVE & INDEPENDENT */
.calc-section h2 {
    font-family: 'ProductSans-Thin', sans-serif;
    font-weight: 300;
    /* Massive Size for Desktop */
    font-size: 5.5rem; 
    color: #333;
    margin: 0;
    white-space: nowrap; 
    line-height: 1.1;
}

/* Left Section Specifics */
.left-section h2 {
    text-align: left;
}

/* Right Section Specifics */
.right-section h2 {
    text-align: left; 
    margin-bottom: 10px; /* Reduced to fit buttons */
}

/* ============================ */
/* Inputs Styling (GRID)        */
/* ============================ */

/* Main Grid Container for Inputs */
.input-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columns Side-by-Side */
    column-gap: 40px; 
    row-gap: 30px; 
    width: 100%;
}

/* Section Headers within Grid */
.section-header {
    grid-column: 1 / -1; 
    margin-top: 30px;      /* Separates from section above */
    margin-bottom: -25px;  /* Negative margin pulls inputs very close to header */
    border-bottom: none; 
    padding-bottom: 0;
    z-index: 1;            /* Ensures header stays on top */
    position: relative;
}

.section-header h3 {
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 500;  /* Standard Weight */
    font-size: 2.2vh;  /* Size Preserved */
    color: #000;
    letter-spacing: 0.5px;
    text-transform: uppercase; 
}

/* Input Wrappers */
.input-wrapper {
    width: 100%;
    /* FIX: Prevents grid column blowout from long text */
    min-width: 0; 
}

.input-wrapper.full-width {
    grid-column: 1 / -1;
}

/* Label Styling - Using '>' to avoid selecting nested labels (like toggles) */
.input-wrapper > label {
    display: flex;               
    align-items: flex-end;       
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    color: #666;
    margin-bottom: 5px;
    
    /* Force minimum height to accommodate 2 lines of text */
    min-height: 4.5vh; 
    line-height: 1.2;
}

.input-group {
    position: relative;
    width: 100%;
}

/* Number Input - ALIGNMENT FIX */
.input-group input[type=number] {
    width: 100%;
    border: none; 
    background: transparent;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2.2vh;
    color: #333;
    outline: none;
    -moz-appearance: textfield;
    
    /* FIXED HEIGHT to match Toggle Wrapper */
    height: 3.5vh; 
    line-height: 3.5vh; /* Vertically center text */
    padding: 0;
}

.input-group input[type=number]::-webkit-outer-spin-button,
.input-group input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Date Input Styling */
.input-group input[type=date] {
    width: 100%;
    margin-top: 3px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 300;
    font-size: 2.2vh;
    color: #333;
    background-color: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.3s ease;
}

.input-group input[type=date]:hover {
    border-color: #D4BCA9;
}

.input-group input[type=date]:focus {
    border-color: #B5855E;
}

/* Slider Styling - BROWN THEME */
.input-group input[type=range] {
    -webkit-appearance: none; 
    appearance: none;
    width: 100%; 
    height: 20px; 
    border: 9px solid transparent; /* Creates the empty space around track */
    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,
.input-group input[type=range].active-slider { 
    border-width: 7px; /* Expands track */
    opacity: 1; 
}

/* Thumb (Hidden) */
.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;
}

/* FAKE SLIDER (The Empty Track below Toggles) */
.fake-slider {
    width: 100%;
    height: 20px;
    border: 9px solid transparent;
    border-left: 0; border-right: 0; 
    background-color: #e0e0e0; /* Gray Track */
    background-clip: content-box; 
    transition: border-width .2s ease; 
    margin-top: 2px; /* Matches real slider margin */
    cursor: default;
}

/* Expand on Hover (Simulate Slider Interaction) */
.input-wrapper:hover .fake-slider {
    border-width: 7px;
}

/* ============================ */
/* Custom Dropdown BOXED        */
/* ============================ */
.custom-dropdown-container {
    position: relative;
    width: 100%;
    box-sizing: border-box; 
    margin-top: 3px; 
}

.hidden-select {
    display: none;
}

/* SHARED TRIGGER STYLE (Dropdown & Date) */
.custom-dropdown-trigger,
.custom-date-trigger {
    width: 100%;
    display: block;
    border: 2px solid #e0e0e0; 
    border-radius: 8px;        
    padding: 10px 12px;        
    height: auto;
    font-size: 2.2vh; 
    color: #333;
    
    /* CONTRAST FIX: Light Gray Background */
    background-color: #F5F5F5;
    
    outline: none;
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 300;
    cursor: pointer;
    text-align: left;
    
    /* OVERFLOW FIX: Ensure dots appear */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Dropdown Arrow */
.custom-dropdown-trigger {
    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; 
    /* OVERLAP FIX: Padding prevents text from touching arrow */
    padding-right: 40px; 
}

/* Date Icon - REMOVED AS REQUESTED */
.custom-date-trigger {
    background-image: none;
}

/* Hover State - Brown */
.custom-dropdown-trigger:hover,
.custom-date-trigger:hover {
    border-color: #D4BCA9;
    background-color: #f0f0f0; /* Slightly darker on hover */
}

/* Active State - Brown */
.custom-dropdown-container:focus-within .custom-dropdown-trigger,
.custom-dropdown-container:focus-within .custom-date-trigger,
.custom-date-trigger.active {
    border-color: #B5855E; 
    background-color: #ffffff; /* White when active */
}

/* Popup Menu */
.custom-dropdown-menu,
.custom-calendar-popup {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border: none; 
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 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;
    overflow: hidden;
}

.custom-dropdown-menu.active,
.custom-calendar-popup.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Calendar Specific Styles */
.custom-calendar-popup {
    padding: 15px;
    min-width: 280px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calendar-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #B5855E; /* Brown */
    padding: 5px;
}

.calendar-header span {
    font-weight: 500;
    font-size: 1.8vh;
    color: #333;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.calendar-day-name {
    font-size: 1.4vh;
    color: #999;
    padding-bottom: 5px;
}

.calendar-day {
    padding: 8px 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6vh;
    color: #333;
    transition: background 0.2s, color 0.2s;
}

.calendar-day:hover {
    background-color: #eae5df; 
}

.calendar-day.selected {
    background-color: #B5855E; /* Brown */
    color: #fff;
}

.calendar-day.empty {
    pointer-events: none;
}

/* Dropdown Option Styles */
.dropdown-options-wrapper {
    overflow-y: auto;
    max-height: 250px;
    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); 
}

/* ============================ */
/* Toggles & Radios             */
/* ============================ */

/* Toggle Switch - ALIGNMENT FIX */
.toggle-wrapper {
    display: flex;
    align-items: center;
    margin-top: 0; 
    
    /* FIXED HEIGHT to match Input Number */
    height: 3.5vh; 
    min-height: auto;
    padding-top: 0; 
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px; /* Compact Width */
    height: 20px; /* Compact Height */
    margin-left: 12px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e0e0e0; 
    transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 34px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); 
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 16px; 
    width: 16px; 
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider-round {
    background-color: #B5855E; /* Brown */
}

input:checked + .slider-round:before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 2.2vh; 
    color: #333;
    font-family: 'ProductSans-Light', sans-serif;
    line-height: 1;
}

/* Radio Buttons Group */
.radio-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.8vh;
    color: #555;
}

.radio-option input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s;
}

.radio-option input:checked {
    border-color: #B5855E; /* Brown */
    background-color: #fff;
}

.radio-option input:checked::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    background-color: #B5855E; /* Brown */
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Checkbox Group */
.checkbox-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.7vh;
    color: #555;
}

.checkbox-option input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-option input:checked {
    background-color: #B5855E; /* Brown */
    border-color: #B5855E;
}

.checkbox-option input:checked::after {
    content: '✔';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -55%);
    color: white;
    font-size: 12px;
}

/* Severity Meter */
.severity-bar-container {
    width: 100%;
    height: 14px;
    background-color: #e0e0e0;
    border-radius: 7px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.severity-bar-fill {
    height: 100%;
    width: 0%; 
    background-color: #66bb6a;
    transition: width 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.5s ease;
}

/* ============================ */
/* Results Styling              */
/* ============================ */

/* NEW ACTION BUTTONS ROW */
.action-buttons-row {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    margin-bottom: 30px; /* Space between buttons and first result block */
}

.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;
    }
}

/* Gross Value Headline */
.gross-value-container {
    margin-bottom: 40px;
}

.gross-value-label {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.8vh;
    color: #666;
    margin-bottom: 5px;
}

.gross-value-number {
    font-family: 'ProductSans-Thin', sans-serif;
    font-size: 5vh;
    color: #333;
    line-height: 1.1;
    margin-bottom: 5px;
}

/* Uncollectible Warning */
.policy-limit-warning {
    display: inline-block;
    background-color: #f0f0f0;
    color: #777;
    font-size: 1.4vh;
    padding: 4px 10px;
    border-radius: 4px;
    margin-top: 5px;
    border: 1px solid #ddd;
}

.policy-limit-warning .warning-text {
    text-decoration: none; 
    font-weight: 500;
}

/* Waterfall Stacked Bar Chart */
.waterfall-container {
    margin-bottom: 40px;
}

.chart-title {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    color: #666;
    margin-bottom: 10px;
}

.stacked-bar-chart {
    width: 100%;
    height: 35px;
    background-color: #e0e0e0;
    border-radius: 8px;
    display: flex;
    overflow: hidden;
    margin-bottom: 15px;
}

.bar-segment {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.4vh;
    font-weight: 500;
    transition: width 0.5s ease;
    white-space: nowrap;
    overflow: hidden;
}

.bar-segment span {
    padding: 0 5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.bar-segment.attorney { background-color: #ef5350; } 
.bar-segment.liens { background-color: #ffa726; }    
.bar-segment.net { background-color: #66bb6a; }      

.chart-legend {
    display: flex;
    gap: 20px;
    font-size: 1.4vh;
    color: #555;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.dot.attorney { background-color: #ef5350; }
.dot.liens { background-color: #ffa726; }
.dot.net { background-color: #66bb6a; }

/* Verdict Section */
.verdict-container {
    background-color: #ffffff;
    border: none; 
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.verdict-icon {
    font-size: 3vh;
    line-height: 1;
}

.verdict-text {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.7vh;
    color: #333;
    line-height: 1.4;
}

/* Disclaimer Text - UPDATED FOR ALIGNMENT */
.disclosure-text {
    font-size: 1.5vh; 
    color: #999;
    margin-top: 5px;
    
    /* FIX: Force minimum height so text blocks align horizontally */
    min-height: 4vh;
    line-height: 1.3;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* ============================ */
/* NEW EXPANDED SEO STYLING     */
/* ============================ */
.seo-section-wrapper {
    width: 100%;
    /* No separate background color or border */
    background-color: transparent; 
    border: none;
    padding: 0 8vw; /* Matches .calculator-container padding */
    margin-top: 40px;
    margin-bottom: 80px;
}

.seo-container {
    width: 100%;
    /* Allow it to flow naturally, align with left/right logic of calc */
    max-width: 100%; 
    margin: 0 auto;
}

.seo-header {
    margin-bottom: 50px;
    text-align: left;
    max-width: 800px;
}

.seo-header h2 {
    font-family: 'ProductSans-Thin', sans-serif;
    font-size: 4rem; /* Massive, clean header */
    color: #333;
    margin-bottom: 15px;
    line-height: 1.1;
}

.seo-intro-text {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.3rem;
    color: #666;
}

/* Container for Vertical Flow (No Grid anymore) */
.seo-content-block {
    display: block;
    width: 100%;
}

/* --- SEO Article Formatting --- */
.seo-article {
    width: 100%;
    max-width: 900px; /* Reading width */
    margin-bottom: 80px; /* Space between article and FAQ */
}

.seo-article h3 {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2rem;
    color: #222;
    margin-top: 50px;
    margin-bottom: 20px;
    font-weight: 600;
}

.seo-article h3:first-child {
    margin-top: 0;
}

.seo-article p {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.15rem;
    color: #4a4a4a;
    line-height: 1.8;
    margin-bottom: 20px;
}

.seo-article strong {
    font-weight: 600;
    color: #000;
}

.seo-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.seo-list li {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.15rem;
    color: #4a4a4a;
    line-height: 1.7;
    margin-bottom: 15px;
    position: relative;
    padding-left: 25px;
}

.seo-list li:before {
    content: "•";
    color: #B5855E; /* Brand Brown */
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

/* Info Card (Grey Box) within Article */
.info-card {
    background-color: #eae5df; /* Very Light Brown/Grey */
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
}

.info-card h4 {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.plain-list {
    list-style: none;
}

.plain-list li {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #444;
}

/* --- SEO FAQ Styling --- */
.seo-faq-section {
    background-color: transparent; 
    padding: 0;
    border: none;
    width: 100%;
    margin-top: 20px;
    border-top: 2px solid #f0f0f0; /* Separator line */
    padding-top: 60px;
}

.seo-faq-section h3 {
    font-family: 'ProductSans-Thin', sans-serif;
    font-size: 3rem;
    color: #333;
    margin-bottom: 50px;
    font-weight: 300;
}

/* Grid for FAQ Items */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columns */
    column-gap: 60px; 
    row-gap: 40px;
}

.faq-item h4 {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.25rem;
    color: #B5855E; /* Question in Brown */
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.faq-item p {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.05rem;
    color: #666;
    line-height: 1.6;
}

/* ============================ */
/* PDF Tutorial Overlay Styles  */
/* ============================ */
.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-title {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2rem;
    font-weight: 300;
    color: #333;
}

.tutorial-instruction {
    font-size: 1.1rem;
    color: #555;
    text-align: center;
}

.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; 
    border: 1px solid #eee;
}

@media (max-width: 600px) { 
    .tut-img-wrapper { 
        width: 100%; 
    } 
}

.tut-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
}

.tutorial-caption {
    font-size: 0.9rem;
    color: #999;
}

.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 PRINT STYLING (THE REPORT)       */
/* ========================================= */
.print-view { display: none; }

@media print {
    @page { 
        size: letter; 
        margin: 0.5in; 
    }
    
    body {
        background-color: #fff;
    }
    
    body > *:not(#print-view-container) { display: none !important; }
    
    #print-view-container { 
        display: block !important; 
        width: 100%; 
        color: #000; 
        background: #fff;
        font-family: 'Roboto', sans-serif !important; 
    }

    /* --- LAYOUT STRUCTURE --- */
    .doc-wrapper {
        width: 100%;
        max-width: 100%;
    }

    /* HEADER: THICK BORDERS SANDWICH */
    .doc-header-block {
        border-top: 4px solid #000;
        border-bottom: 4px solid #000;
        padding: 15px 0;
        margin-bottom: 25px;
    }

    .header-content-row {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 30px;
    }

    .doc-logo {
        height: 60px;
        width: auto;
    }

    .doc-title-stack {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .doc-title-stack h1 {
        font-size: 14pt;
        font-weight: 600; /* Roboto Bold */
        margin: 0;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #000;
    }

    .doc-title-stack h2 {
        font-size: 10pt;
        font-weight: 300; /* Roboto Light */
        margin: 4px 0 0 0;
        color: #000;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    /* META GRID */
    .doc-meta-grid {
        display: flex;
        justify-content: space-between;
        margin-bottom: 30px;
        font-size: 9pt;
        font-family: 'Roboto', sans-serif;
    }
    
    .meta-col {
        width: 48%;
    }

    .meta-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 8px;
    }

    .meta-lbl {
        font-weight: 600;
        margin-right: 10px;
        color: #000;
    }

    .meta-val {
        border-bottom: 1px solid #999;
        flex-grow: 1;
        padding-left: 5px;
        color: #333;
    }

    /* SECTIONS */
    .doc-section {
        margin-bottom: 25px;
        page-break-inside: avoid;
    }

    .section-title {
        border-bottom: 1px solid #ccc; /* THIN line */
        padding-bottom: 3px;
        margin-bottom: 15px;
        font-weight: 600;
        font-size: 10pt;
        text-transform: uppercase;
        color: #000;
        letter-spacing: 0.05em;
    }

    .section-content {
        padding: 0;
    }
    
    .section-content.with-sidebar {
        /* No grid here, just flow but with margin for note later */
    }

    .context-text {
        font-size: 9pt;
        margin-bottom: 5px;
        font-weight: 300;
    }
    .context-text strong { font-weight: 600; }

    /* DATA TABLES */
    .data-table-grid {
        display: block;
        width: 100%;
        margin-bottom: 15px;
    }

    .dt-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 5px;
        font-size: 9pt;
        padding: 2px 0;
    }

    .dt-lbl {
        color: #333;
        font-weight: 300;
        width: 35%; 
    }

    .dt-val {
        font-weight: 400;
        text-align: right;
        width: 15%;
        margin-right: 5%; /* Spacer */
    }
    /* Second column in row */
    .dt-row .dt-lbl:nth-of-type(2) {
        width: 30%;
        text-align: left;
    }
    .dt-row .dt-val:nth-of-type(2) {
        width: 15%;
        text-align: right;
        margin-right: 0;
    }

    .total-row {
        margin-top: 10px;
        padding-top: 5px;
        border-top: 1px dashed #999;
        font-weight: 600;
    }
    .total-row .dt-lbl { width: 50%; font-weight: 600; }
    .total-row .dt-val { width: 50%; text-align: left; font-weight: 600; }

    /* SUMMARY LIST */
    .summary-list {
        width: 100%;
        margin-bottom: 15px;
        font-size: 10pt;
    }

    .sum-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 4px;
    }
    .sum-item.top { margin-bottom: 10px; }
    .sum-item.final { margin: 5px 0; font-weight: 600; font-size: 11pt; }
    
    .sum-lbl { font-weight: 300; }
    .sum-val { text-align: right; }

    .sum-divider {
        font-family: 'Courier New', monospace; /* Monospace for ascii-like lines */
        font-size: 8pt;
        color: #000;
        letter-spacing: -1px;
        overflow: hidden;
        white-space: nowrap;
        margin: 5px 0;
        font-weight: 300;
    }

    /* ANALYST NOTE - THICK VERTICAL BORDER */
    .analyst-note {
        border-left: 5px solid #000; /* Thick Vertical Line */
        padding-left: 15px;
        margin-left: 5px;
        font-size: 8pt;
        font-style: italic; /* Italic Text */
        color: #444;
        line-height: 1.4;
        margin-top: 10px;
        font-family: 'Roboto', sans-serif;
        font-weight: 300;
    }
    .analyst-note strong {
        font-style: normal;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 7pt;
        display: block;
        margin-bottom: 2px;
        color: #000;
    }

    /* FOOTER */
    .doc-footer {
        margin-top: 50px;
    }

    .sig-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 30px;
    }
    
    .sig-block {
        display: flex;
        flex-direction: column;
    }

    .sig-line {
        color: #000;
        font-weight: 300;
    }
    .sig-txt {
        font-size: 8pt;
        text-transform: uppercase;
        margin-top: 5px;
        font-weight: 600;
    }

    .doc-disclaimer {
        font-size: 7pt;
        color: #666;
        text-align: justify;
        line-height: 1.3;
        font-weight: 300;
    }
}

/* ============================ */
/* Responsive                   */
/* ============================ */

/* TABLET & INTERMEDIATE: (1214px and below) */
@media (max-width: 1214px) {
    .calc-section h2, .seo-header h2 {
        font-size: 3.5rem; /* RESPONSIVE SIZE */
    }
}

/* MOBILE STACKING */
@media (max-width: 990px) {
    .calculator-container {
        padding: 0 5vw;
        flex-direction: column; 
        gap: 60px; 
        align-items: center; 
    }

    .calc-section {
        width: 100%;
        max-width: 600px; 
    }

    .right-section h2 {
        text-align: left; 
    }
    
    /* Disable sticky on mobile */
    .right-section {
        position: static;
        align-self: auto;
    }
    
    .result-box {
        text-align: left; 
    }
    
    .seo-section-wrapper {
        padding: 0 5vw;
    }

    /* FAQ becomes 1 column on mobile */
    .faq-grid {
        grid-template-columns: 1fr;
        row-gap: 30px;
    }
    
    /* FIX: On mobile, auto-height is better as alignment matters less */
    .input-wrapper > label, .disclosure-text {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    /* RESPONSIVE MASSIVE SIZE MOBILE */
    .calc-section h2, .seo-header h2, .seo-faq-section h3 {
        font-size: 2.8rem; 
    }

    /* Revert Inputs to Single Column on Mobile */
    .input-grid-container {
        grid-template-columns: 1fr; 
    }
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* ============================ */
/* 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;
    }
}