/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================ */
/* FONT DEFINITIONS             */
/* ============================ */

/* Existing Fonts */
@font-face {
    font-family: 'Roboto-Light';
    src: url('../../fonts/Roboto-Light.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'ProductSans-Light';
    src: url('../../fonts/ProductSans-Light.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'ProductSans-Thin';
    src: url('../../fonts/ProductSans-Thin.ttf') format('truetype');
    font-display: swap;
}

/* 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-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../../fonts/Roboto-Bold.ttf') format('truetype');
    font-weight: 600; 
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../../fonts/Roboto-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

/* (The light weight below uses the same family name 'Roboto' to work with the footer) */
@font-face {
    font-family: 'Roboto';
    src: url('../../fonts/Roboto-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Page Background Color */
body {
    background-color: #F4F4F4;
    font-family: 'ProductSans-Light', sans-serif;
    overflow-x: hidden; 
    width: 100%;
    color: #333; /* Default darker text color */
}

/* ============================ */
/* Hero Section (UPDATED FOR LCP) */
/* ============================ */
.hero-section {
    width: 100%;
    height: 40vh;
    background-color: #333; /* Fallback */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2vh;
    overflow: hidden; 
}

/* New Class for the LCP Image */
.hero-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; /* Behind content */
    pointer-events: none;
    will-change: opacity; /* Optimizes for paint */
}

/* Ensure content sits on top of the image */
.hero-nav, .hero-logo, .hero-section h1, .breathing-text {
    position: relative;
    z-index: 10;
}

.hero-nav { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 3vh; 
    margin-top: 1vh;
}

.hero-nav a { 
    color: #e0e0e0; /* Lighter for better contrast against dark hero */
    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));
    will-change: transform; /* Performance */
}

.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 5vw; 
    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: #555555; /* Darkened for accessibility */
    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%;
    padding: 0 5vw; 
    margin-top: 2vh;
    margin-bottom: 8vh;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap; 
    gap: 60px; 
    contain: content; /* PERFORMANCE: Isolates layout recalculations */
}

.calc-section {
    min-width: 300px;
}

.left-section {
    flex: 1.5; 
}

/* ================================================= */
/* STICKY RESULTS SECTION (DESKTOP)                  */
/* ================================================= */
.right-section {
    flex: 1;
    min-width: 320px; 
    
    /* Sticky Logic: Pinned to top with fixed viewport height */
    position: -webkit-sticky; 
    position: sticky;
    top: 20px; 
    height: 90vh; /* Fixed height relative to viewport */
    
    background-color: transparent; 
    border-radius: 0; 
    padding: 0; 
    box-shadow: none; 
    overflow: hidden; /* Container hides overflow, child scrolls */
    
    /* NEW: Flex column to manage the header vs scroll area */
    display: flex;
    flex-direction: column;
}

/* Adjusted header styling for inside the scroll wrapper context */
.right-section h2 {
    text-align: left; 
    margin-bottom: 5px; /* Reduced to make room for buttons */
    margin-top: 0;
    /* No flex-shrink so it doesn't get squashed */
    flex-shrink: 0;
}

/* Inner Wrapper: Handles Scroll + Fade Mask */
.results-scroll-wrapper {
    flex: 1; /* Takes up remaining height in the flex container */
    overflow-y: auto;
    
    /* Hide Default Scrollbar */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    
    /* Prevent Scroll Chaining to Body */
    overscroll-behavior: contain;
    
    /* Fade Effect: 25px fade at top and bottom */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 25px, black calc(100% - 25px), transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 25px, black calc(100% - 25px), transparent 100%);
    
    /* Widened Padding: 25px Horizontal to fit shadows, 25px Vertical for fade */
    padding: 25px 25px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.results-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.header-row {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 2vh;
}

.calc-section h2 {
    font-family: 'ProductSans-Thin', sans-serif;
    font-weight: 300;
    font-size: clamp(3rem, 9vw, 6rem);
    color: #333;
    margin: 0;
    line-height: 1.1;
    white-space: normal; 
    overflow-wrap: break-word; 
}

.text-link-btn {
    background: none;
    border: none;
    color: #555555; /* Darkened for accessibility */
    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 h2 {
    text-align: left;
}

/* ============================ */
/* Input Mode Cards             */
/* ============================ */
.mode-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
    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, outline 0.1s;
    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.4vh; 
    color: #ffffff; 
    background: none; 
    text-align: center;
    text-shadow: 0px 2px 5px rgba(0, 0, 0, 1); 
    pointer-events: none; 
}

/* ============================ */
/* CATEGORY BLOCK STYLING       */
/* ============================ */
.input-category-block {
    width: 100%;
    margin-bottom: 40px;
}

.input-category-header {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2.2vh; 
    color: #000000;
    font-weight: 300;
    margin-bottom: 15px;
    display: block;
    text-transform: uppercase;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 30px; 
    row-gap: 30px; 
    width: 100%;
}

.advanced-content {
    margin-top: 0;
}

.full-width-col {
    grid-column: 1 / -1;
}

.input-wrapper {
    margin-bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%; 
}

.input-wrapper .input-group,
.input-wrapper .custom-dropdown-container {
    margin-top: auto;
}

.input-wrapper label {
    display: block;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    color: #555555; /* Darkened for accessibility */
    margin-bottom: 3px;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-split-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.input-split-primary {
    flex: 2;
    min-width: 0; 
}

.input-split-secondary {
    display: grid;
    grid-template-columns: 1fr auto; 
    align-items: center;
    justify-content: end;
    flex: 1;
    min-width: 90px;
    max-width: 140px;
    gap: 5px; 
}

.percent-input {
    width: 100% !important; 
    text-align: right; 
    color: #B5855E !important; 
    padding: 0 !important;
    margin: 0;
    border: none;
    background: transparent;
}

.percent-symbol {
    position: static; 
    font-size: 2.2vh; 
    color: #B5855E; 
    pointer-events: none;
    line-height: 1;
}

.auto-badge {
    position: absolute;
    right: 0;
    top: 2px;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    color: #B5855E;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.auto-badge.visible {
    opacity: 1;
}

.input-group input[type=number],
.input-split-primary {
    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,
.input-group input[type=range].active-slider { 
    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 & Charts             */
/* ============================ */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 20px; 
    margin-bottom: 30px;
    width: 100%;
}

.right-section .advanced-content {
    display: contents; 
}

.right-section .advanced-content.hidden,
.right-section .advanced-content.hidden > * {
    display: none;
}

.result-box {
    margin-bottom: 0; 
    text-align: left; 
    min-width: 0; 
    display: flex;
    flex-direction: column;
    height: 100%;
}

.left-section .result-box {
    text-align: left;
    margin-bottom: 30px;
    display: block; 
    height: auto;
}

.result-label {
    display: block;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    color: #555555; /* Darkened */
    margin-bottom: 5px;
    white-space: normal; 
    line-height: 1.2; 
    flex-grow: 0; 
}

.result-value {
    display: block;
    font-family: 'ProductSans-Thin', sans-serif;
    font-size: clamp(1.8rem, 3vw, 3.2rem); 
    color: #333;
    line-height: 1.1;
    word-wrap: break-word;
    overflow-wrap: break-word; 
    margin-top: auto; 
}

/* ============================ */
/* TRAFFIC LIGHT SYSTEM COLORS  */
/* ============================ */
.text-success { color: #388E3C !important; } 
.text-danger { color: #D32F2F !important; }  
.text-warning { color: #F57C00 !important; } 
.text-neutral { color: #757575 !important; } 

.disclosure-text {
    font-size: 1.5vh; 
    color: #888; /* Darkened */
    margin-top: 5px;
}

.divider {
    display: none; 
    border: none;
    margin: 0;
}

.hidden {
    display: none !important;
}

/* ============================ */
/* Chart + CTA Layout           */
/* ============================ */
.chart-row-wrapper {
    display: flex;
    flex-flow: row wrap; 
    justify-content: center; 
    align-items: stretch; 
    gap: 20px; 
    width: 100%;
    margin-top: 10px; 
    padding-top: 10px;
    border-top: none; /* REMOVED SEPARATION */
}

.visual-card {
    flex: 1 1 260px; 
    min-width: 240px; 
    max-width: 100%; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    box-sizing: border-box; 
    margin: 0 auto; /* Ensure centering if flex doesn't stretch */
}

.chart-card-header {
    margin-top: 0;
    margin-bottom: 25px; 
    width: 100%;
    text-align: center;
    font-family: 'ProductSans-Light', sans-serif; 
    font-size: 2.2vh; 
    color: #000;
    text-transform: uppercase;
    font-weight: 300;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 250px;
    margin-top: 0;
}

#mode-a-results .chart-container {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding-left: 0;
}

.cta-card {
    flex: 1 1 260px;
    min-width: 240px;
    max-width: 100%;
    min-height: 250px; 
    background-color: #333; 
    background-image: url('../../img/Hero.webp'); 
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.15);
    color: #fff;
    margin-top: 0; 
}

.cta-title {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2vh;
    margin-bottom: 15px;
    line-height: 1.3;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.6);
    font-weight: 300;
    color: #fff;
}

.cta-button {
    background: rgba(255, 255, 255, 0.2); 
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cta-button:hover {
    background: #fff;
    color: #B5855E; 
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

/* ============================ */
/* Custom External Tooltip      */
/* ============================ */
#custom-tooltip {
    opacity: 0;
    position: fixed; 
    background: #ffffff;
    color: #333;
    border-radius: 8px; 
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    padding: 10px 15px;
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.6vh;
    z-index: 9999;
    transition: opacity 0.1s ease;
    white-space: nowrap;
}

#custom-tooltip strong {
    display: block;
    text-align: center; 
    font-weight: 500;
    margin-bottom: 4px;
    color: #000000 !important; /* UPDATED: Forces black color override */
}

/* ============================ */
/* Advisor Text Summary         */
/* ============================ */
.summary-container {
    margin-top: 0; 
    border-top: none; /* UPDATED: Removed top border */
    padding-top: 20px;
}

.advisor-text {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.7vh;
    color: #555;
    line-height: 1.5;
    margin-top: 10px;
    max-width: 100%;
}

.advisor-text strong {
    font-weight: 700;
}

/* ============================ */
/* SEO Content Section          */
/* ============================ */
.seo-content-container {
    width: 100%;
    background-color: transparent; 
    padding: 0 5vw; 
    margin-bottom: 100px;
    margin-top: 0;
}

.seo-header {
    margin-bottom: 50px;
    text-align: left; 
    border-bottom: 1px solid #d0d0d0;
    padding-bottom: 20px;
}

.seo-header h2 {
    font-family: 'ProductSans-Thin', sans-serif;
    font-size: 5vmin;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.1;
    text-align: left;
}

.seo-intro {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2.2vh;
    color: #555555; /* Darkened */
    max-width: 800px;
    line-height: 1.6;
    text-align: left;
    margin: 0;
}

.seo-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px; 
    margin-bottom: 60px;
    align-items: start; 
}

.seo-topic {
    margin-bottom: 0;
}

.seo-topic h3 {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 3vh;
    color: #333;
    margin-bottom: 15px;
    font-weight: 300;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
    min-height: 50px; 
    display: flex;
    align-items: flex-end;
}

.seo-topic p {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.8vh;
    color: #555555;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: left;
}

.seo-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.seo-list li {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.7vh;
    color: #555555;
    margin-bottom: 12px;
    padding-left: 15px; 
    position: relative;
    line-height: 1.5;
    text-align: left;
}

.seo-list li::before {
    content: "•";
    color: #B5855E;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.seo-glossary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.glossary-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s ease;
}

.glossary-item:hover {
    transform: translateY(-3px);
}

.glossary-item h4 {
    color: #B5855E;
    font-size: 1.8vh;
    margin-bottom: 8px;
    font-weight: 500;
}

.glossary-item p {
    font-size: 1.5vh;
    color: #555555;
    line-height: 1.4;
    margin: 0;
}

.faq-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #d0d0d0;
}

.faq-section h3 {
    font-family: 'ProductSans-Thin', sans-serif;
    font-size: 4vh;
    color: #333;
    margin-bottom: 30px;
    text-align: left;
}

.faq-item {
    margin-bottom: 30px;
}

.faq-item h4 {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 2.2vh;
    color: #B5855E;
    margin-bottom: 8px;
    font-weight: 400;
    text-align: left;
}

.faq-item p {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.8vh;
    color: #555555;
    line-height: 1.6;
    text-align: left;
    max-width: 900px;
}

.seo-footer {
    margin-top: 60px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    font-size: 1.4vh;
    color: #888;
    text-align: left;
}

/* ============================ */
/* NEW 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 */

@media (max-width: 1214px) {
    .mode-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .calculator-container {
        gap: 40px;
    }
}

@media (max-width: 990px) {
    .calculator-container {
        padding: 0 5vw;
        flex-direction: column; 
        gap: 60px; 
        align-items: center; 
    }

    .calc-section {
        width: 100%;
        max-width: 700px; 
    }

    .right-section h2 {
        text-align: left; 
    }
    
    .right-section .input-category-header {
        text-align: left;
    }
    
    .advisor-text {
        text-align: left;
    }
    
    .result-box {
        text-align: left; 
        align-items: flex-start; 
    }
    
    .metrics-grid {
        gap: 30px; 
    }

    /* Reset the Sticky/Scroll logic for Mobile */
    .right-section {
        position: static;
        max-height: none;
        height: auto; /* Reset fixed height */
        overflow-y: visible; /* Show overflow */
        background-color: transparent; 
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin-top: 40px; 
        /* Undo flex column on mobile to let it flow naturally */
        display: block; 
    }
    
    /* Remove wrapper effects on mobile */
    .results-scroll-wrapper {
        height: auto;
        overflow-y: visible;
        padding-top: 0;
        padding-bottom: 0;
        mask-image: none;
        -webkit-mask-image: none;
        /* Undo flex grow */
        flex: none;
    }

    .seo-columns {
        grid-template-columns: 1fr;
        gap: 40px; 
    }

    /* Footer Mobile */
    .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: 768px) {
    .input-grid {
        grid-template-columns: 1fr; 
    }
    .advanced-content {
        grid-column: span 1;
    }
    
    .calculator-container {
        padding: 0 4vw; 
    }

    .calc-section {
        min-width: auto; 
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr; 
        gap: 15px; 
    }
    
    .result-value {
        font-size: clamp(1.4rem, 6vw, 2.5rem); 
    }

    .result-box {
        text-align: left;
        align-items: flex-start;
    }
    
    .seo-header h2 {
        font-size: 8vmin;
    }
}

@media (max-width: 600px) {
    /* Footer Mobile Small */
    .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;
    }
}

/* =========================================================================
   NEW ACTION BUTTONS & PRINT STYLING
   ========================================================================= */

/* Actions Buttons Styling */
.action-buttons-row { 
    display: flex; 
    gap: 20px; 
    justify-content: flex-start; 
    margin-bottom: 25px;
}
.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;
}
.tutorial-title {
    font-family: 'ProductSans-Light', sans-serif;
    font-weight: 300;
    font-size: 1.8rem;
    margin: 0;
}
.tutorial-instruction {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1.2rem;
    color: #555;
    text-align: center;
}
.tutorial-caption {
    font-family: 'ProductSans-Light', sans-serif;
    font-size: 1rem;
    color: #999;
}
@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 "STATEMENT" PRINT STYLING --- */
.print-view { display: none; }

@media print {
    @page { size: letter; margin: 0.4in; }
    
    body > *:not(#print-view-container) { display: none !important; }
    
    #print-view-container { 
        display: block !important; 
        width: 100%; 
        color: #000; 
        background: #fff;
        font-family: 'Roboto-Light', sans-serif !important; 
        font-size: 10pt;
    }

    .doc-wrapper {
        width: 100%;
    }

    /* === HEADER === */
    .print-header-border {
        border-top: 3px solid #000;
        border-bottom: 3px solid #000;
        margin-bottom: 10px;
    }

    .doc-header {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 15px 0;
    }

    .doc-logo {
        height: 50px;
        width: auto;
        margin-right: 30px;
    }

    .doc-title-block h1 {
        font-size: 14pt;
        font-weight: bold;
        margin: 0;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-family: 'Roboto', sans-serif;
    }

    .doc-title-block h2 {
        font-size: 10pt;
        font-weight: normal;
        margin: 4px 0 0 0;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: #333;
    }

    /* === METADATA === */
    .doc-meta-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        column-gap: 20px;
        margin-bottom: 30px;
        font-size: 9pt;
    }
    .meta-col {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .meta-row { display: flex; align-items: baseline; }
    .meta-label { font-weight: bold; margin-right: 8px; min-width: 60px; font-size: 8pt; }
    .meta-val { font-family: 'Roboto', sans-serif; }

    /* === SECTIONS === */
    .doc-section {
        margin-bottom: 25px;
        page-break-inside: avoid;
    }

    .section-title {
        border-bottom: 1px solid #000;
        padding-bottom: 4px;
        margin-bottom: 10px;
        font-weight: bold;
        font-size: 10pt;
        text-transform: uppercase;
    }

    .data-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
        row-gap: 5px;
    }

    .data-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
    }

    .lbl { color: #333; }
    .val { color: #000; font-family: 'Roboto', sans-serif; }

    /* === ANALYST NOTE === */
    .analyst-note-container {
        margin-top: 15px;
        padding-left: 15px;
        border-left: 4px solid #333;
        font-style: italic;
        font-size: 9pt;
        line-height: 1.4;
        color: #444;
    }
    .note-label {
        font-weight: bold;
        font-style: normal;
        text-transform: uppercase;
        margin-right: 5px;
        color: #000;
    }

    /* === SUMMARY SECTION === */
    .allocation-grid {
        margin-top: 5px;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .alloc-row {
        display: flex;
        justify-content: space-between;
    }

    .total-obligation-box {
        margin-top: 20px;
        border-top: 3px solid #000;
        border-bottom: 3px solid #000;
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12pt;
        font-weight: bold;
    }

    /* === FOOTER & SIG === */
    .doc-footer {
        margin-top: 50px;
    }

    .signature-line {
        display: flex;
        justify-content: space-between;
        margin-bottom: 30px;
        padding-right: 50px;
    }
    .sig-block {
        display: flex;
        flex-direction: column;
        width: 45%;
    }
    .sig-rule {
        border-bottom: 1px solid #000;
        height: 1px;
        margin-bottom: 5px;
    }
    .sig-label {
        font-size: 8pt;
        text-transform: uppercase;
        font-weight: bold;
    }

    .legal-disclaimer {
        font-size: 7pt;
        color: #666;
        text-align: justify;
        line-height: 1.3;
        margin-top: 20px;
    }
}