/* General Body and HTML Styling */
html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto Flex','Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    /* Example gradient background */
    /* background: linear-gradient(120deg, #f8fafc 0%, #e0e7ef 100%); */
    /* Or use a solid color: */
    background: #ffffff;
    min-height: 100vh;
}

/* --- Responsive Navigation Bar --- */
.main-nav {
    width: 100%;
    background: #ffffff;
    color: #304e62;
    display: flex;
    align-items: center;
    justify-content: center; /* Changed from space-between to center */
    padding: 0;
    height: 163px;
    position: relative;
    z-index: 100;
    /* box-shadow: 0 2px 8px rgba(0,0,0,0.04); */
    /* border-bottom: 2px solid black; 1px thin black line */
}

.second-nav {
    width: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
/* End of nav styling */

/* Logo image styling */
.nav-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-logo img {
    max-height: 120px;        /* Adjust height as needed */
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;      /* Maintain aspect ratio */
    display: block;
}

.nav-links {
    font-family: 'Roboto Flex', sans-serif;
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0 8px 0 0; /* Add 8px right padding */
    align-items: center;
}

.nav-links li {
    margin: 0 10px;
    align-items: center;
}

.nav-links a {
    color: #304e62;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-links a:hover {
    background: rgba(128, 128, 128, 0.2);
    color: #2c3e50;
}

/* Hamburger menu styles */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    flex-direction: column;
    justify-content: center;
    height: 60px;
    cursor: pointer;
    padding: 0 10px;
}

.nav-toggle-label span {
    display: block;
    width: 28px;
    height: 3px;
    margin: 5px 0;
    background: #000000;
    border-radius: 2px;
    transition: 0.3s;
}

/* Main Container for Content */
.container {
    background: #ffffff;
    /* background: rgba(255,255,255,0.97); */
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    padding: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    /* Add a blue border to all containers */
    border-radius: 8px;        /* optional: rounded corners */
    padding: 16px;             /* optional: space inside the border */
    box-sizing: border-box;    /* ensures padding doesn't increase width */
}

/* Header Styling */
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 600;
}

h2 {
    color: #34495e;
    margin-top: 0px;
    margin-bottom: 0px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    font-size: 1.8em;
    font-weight: normal;
}

h3 {
    color: #555;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4em;
}

/* Form Styling */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    
}

/* Collapsible Account Details Styling */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
}

.collapsible-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: width 0.3s ease;
}

.collapsible-header:hover {
    background-color: #f8f9fa;
    padding: 15px;
    margin: 0 -15px 15px -15px;
    border-radius: 6px;
    border-bottom: 2px solid transparent;
}

.collapsible-header:hover::after {
    width: 100%;
}

.collapsible-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.4em;
}

.toggle-icon {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    transition: transform 0.3s ease, color 0.3s ease;
    user-select: none;
    background: #f0f8ff;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #007bff;
}

.toggle-icon:hover {
    background: #007bff;
    color: white;
}

.toggle-icon.rotated {
    transform: rotate(45deg);
}

/* Account Summary Styling */
.account-summary {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.summary-row {
    margin-bottom: 8px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.account-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.account-status {
    font-size: 16px;
    font-weight: bold;
    width: 20px;
    text-align: center;
    transition: color 0.3s ease;
}

.account-status.selected {
    color: #28a745; /* Green for selected */
}

.account-status.not-selected {
    color: #dc3545; /* Red for not selected */
}

.account-sentence {
    color: #495057;
    font-size: 0.95em;
    line-height: 1.4;
    flex-grow: 1;
}

.trades-label {
    font-weight: 600;
    color: #495057;
}

.trades-value {
    font-weight: 700;
    color: #007bff;
    font-size: 1.1em;
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
    opacity: 0;
}

.collapsible-content.expanded {
    max-height: 2000px; /* Large enough to accommodate content */
    opacity: 1;
    transition: max-height 0.4s ease-in, opacity 0.4s ease-in;
}
.form-group.checkbox-group {
    display: none;
}

.form-group {
    margin-bottom: 10px;  /* Less vertical space between fields */
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    /* font-weight: bold; */
    color: #555;
    font-size: 0.97em;
}

.form-group input[type="number"],
.form-group input[type="text"] {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 6px 8px;     /* Smaller input fields */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.97em;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;      /* <-- Add this line */
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield; /* <-- Add this line */
}

/* Checkbox/Toggle Switch Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.checkbox-group label {
    margin-right: 15px;
    font-weight: normal;
    color: #333;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Submit Button */
.submit-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #28a745; /* Green for action */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #218838;
}

/* Email Results Form Styling */
.email-results-container {
    margin: 2rem 0;
    padding: 0 1rem;
}

.email-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.email-form-wrapper h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.email-form-wrapper p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.email-form input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.email-form input[type="email"]:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.email-form .checkbox-group {
    margin-bottom: 1.5rem;
}

.email-form .checkbox-group label {
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-form .checkbox-group input[type="checkbox"] {
    margin: 0;
}

.email-form .privacy-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
}


@media (max-width: 768px) {
    /* Add these new styles */
    .broker-advert-section {
        padding: 8px;
        margin: 0;
    }

    .pre-form-container {
        padding: 12px;
        margin: 8px;
    }

    .calculator-section {
        padding: 0;
    }

    .rates-reference-section .container,
    .results-section .container {
        padding: 8px;
    }
}
@media (max-width: 768px) {
    .email-form-wrapper {
        padding: 1.5rem;
    }
}

/* Disabled and Not-Allowed States for Buttons */
.disabled-btn,
.submit-btn:disabled {
    background-color: #ccc !important;
    color: #888 !important;
    cursor: not-allowed !important;
    border: 1px solid #aaa !important;
    opacity: 0.7;
}

/* Results Section Styling */
.results-section {
    margin-top: 0;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden; /* Ensures rounded corners apply to content */
    justify-content: flex-start;
}

.results-table th, .results-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.results-table th {
    background-color: #e9ecef;
    /* font-weight: bold; */
    color: #495057;
    text-transform: uppercase;
    font-size: 0.9em;
}

.results-table tr:hover {
    background-color: #f1f1f1;
}

.results-table tr:last-child td {
    border-bottom: none;
}

/* Highlight best option */
.results-table tr.best-option {
    background-color: #d4edda; /* Light green */
    /* font-weight: bold; */
    border: 2px solid #28a745;
}

.results-table tr.best-option td {
    color: #155724; /* Darker green text */
}

/* Specific columns styling if needed */
.results-table td.total-cost {
    /* font-weight: bold; */
    font-size: 1.1em;
}

/* Explanation Section */
.explanation-container {
    margin-top: 30px;
}

.broker-explanation {
    background-color: #f9f9f9;
    border: 1px solid #e7e7e7;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.broker-explanation-header {
    background-color: #f0f0f0;
    padding: 15px 20px;
    cursor: pointer;
    /* font-weight: bold; */
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.broker-explanation-header:hover {
    background-color: #e5e5e5;
}

.broker-explanation-header .arrow {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.broker-explanation-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.broker-explanation-content.show {
    max-height: 5000px; /* Large enough value to show content */
    padding: 15px 20px;
    transition: max-height 0.6s ease-in, padding 0.6s ease-in;
}

.broker-explanation-header.active .arrow {
    transform: rotate(90deg); /* Rotate arrow when active */
}

.explanation-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.explanation-list li {
    margin-bottom: 8px;
}

.explanation-list li strong {
    color: #2c3e50;
}

.signup-link {
    display: inline-block;
    margin-top: 8px;
    color: #146811;
    font-weight: bold;
    text-decoration: underline;
}

/* MailerLite Form Section */
.signup-section {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.signup-section h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.signup-section p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Best value broker affiliate links */
.best-broker-link {
    color: #2980b9 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #2980b9 !important;
    transition: all 0.2s ease;
    font-weight: inherit;
}

.best-broker-link:hover {
    color: #1f6ba8 !important;
    border-bottom-color: #1f6ba8 !important;
    background-color: rgba(41, 128, 185, 0.05);
}

.quick-scenarios-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-align: center;
}

.quick-scenarios-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.scenario-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Space between buttons */
    justify-content: center;
}
.quick-scenarios-section h2 {
    font-weight: normal;
}
.scenario-buttons button {
    background-color: #4b4c4d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    /* font-weight: bold; */
    transition: background-color 0.2s ease, transform 0.1s ease;
    flex-grow: 1; /* Allows buttons to grow and fill space */
    max-width: 220px; /* Limit individual button width */
    width: 220px;      /* Fixed width for all buttons */
    min-width: 180px;  /* Optional: minimum width */
    max-width: 100%;   /* Prevents overflow on very small screens */
    box-sizing: border-box;
}

.scenario-buttons button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.scenario-buttons button:active {
    transform: translateY(0);
}

/* Chart Section */
.chart-container {
    margin: 40px auto 60px auto;
    width: 95%;
    max-width: 800px;
    padding: 0 10px;
    box-sizing: border-box;
}

.chart-wrapper {
    width: 100%;
    min-height: 400px; /* Ensure minimum height on all screens */
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    box-sizing: border-box;
    display: grid;
    place-items: center;
}

#myChart {
    width: 100% !important;
    height: 100% !important;
    min-height: 370px; /* Allow for padding */
    display: block;
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 768px) {
    .chart-wrapper {
        min-height: 350px;
        padding: 12px;
    }
    
    #myChart {
        min-height: 326px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        width: 100%;
        padding: 0 5px;
    }
    
    .chart-wrapper {
        min-height: 300px;
        padding: 10px;
        margin: 15px auto;
    }
    
    #myChart {
        min-height: 280px;
    }
}

/* Helper for aligning labels and inputs for percentages */
.inline-form-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-form-group label {
    flex-shrink: 0; /* Prevent label from shrinking */
    width: 65px;          /* Make inline labels narrower */
    font-size: 0.97em;
}

.inline-form-group input {
    flex-grow: 1; /* Allow input to take remaining space */
}

/* Columns for account details */
.account-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Less space between columns */
    justify-content: space-between;
}

.account-column {
    flex: 1; /* Each column takes equal space */
    min-width: 220px;     /* Allow columns to be narrower */
    background-color: #f7f7f7;
    padding: 10px 12px;   /* Less padding inside each column */
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 0.97em;    /* Slightly smaller text */
    margin-bottom: 10px;  /* Less space below each column */
}

.account-column h3 {
    margin-top: 0;
    font-size: 1.05em;
    color: #2c3e50;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 6px;
    margin-bottom: 12px;
}


/* Account Fields Row */
.account-fields-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.account-field {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    
}

.account-field label {
    /* min-height: 3.5em; */
    font-size: 0.97em;
    margin-bottom: 3px;
    font-weight: 500;
    color: #555;
}

.input-with-suffix {
    display: flex;
    align-items: center;
    width: 100%;
}

.input-with-suffix input[type="number"] {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.97em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.input-suffix {
    margin-left: 4px;
    font-size: 1em;
    color: #555;
}

.account-field input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.97em;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.account-fields-row > .account-field:first-child > label {
    width: 85px; /* Adjust as needed */
    display: inline-block; /* Ensures width is respected */
    text-align: left;      /* Optional: aligns text to the left */
}

@media (max-width: 600px) {
    .account-fields-row {
        flex-direction: column;
        gap: 6px;
    }
    .account-field label {
        min-height: unset;
    }
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .main-nav {
        padding: 0 10px;
    }
    .nav-links li {
        margin: 0 4px;
    }
    .container {
        margin: 15px;
        padding: 15px;
    }

    h1 {
        font-size: 2em;
    }

    .account-columns {
        flex-direction: column; /* Stack columns vertically on small screens */
    }

    .account-column {
        min-width: 160px;
        padding: 8px 6px;
    }

    .form-group input[type="number"],
    .form-group input[type="text"] {
        padding: 5px 6px;
    }

    .results-table th, .results-table td {
        padding: 8px 10px;
        font-size: 0.9em;
    }

    .results-table {
        font-size: 0.9em;
    }
}

@media (max-width: 700px) {
    .second-nav {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: flex-end; /* Hamburger to the right */
        height: 60px;
    }
    .nav-toggle-label {
        display: flex;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1100; /* Higher than .nav-links */
    }
    .nav-links {
        display: flex;
        position: absolute;
        top: 60px;
        left: 0;
        width: 70%;
        height: calc(50vh - 60px); /* Extend to bottom of viewport */
        background: rgba(44, 62, 80, 0.95); /* Dark blue-gray with transparency */
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start; /* Align items to the top */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 1000; /* Lower than .nav-toggle-label */
        margin: 0 !important; /* Remove default ul margins */
        padding: 0 !important; /* Remove default ul padding */
    }
    .nav-toggle:checked ~ .nav-links {
        max-height: calc(50vh - 60px); /* Match the height */
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .scenario-images {
        flex-direction: column;
        align-items: center;
        gap: 16px; /* Optional: adjust vertical spacing */
    }
    .scenario-img {
        width: 90vw;   /* Optional: make images fit mobile screens */
        max-width: 300px;
    }
    
    /* Add horizontal dividers between mobile menu items */
    /* Add lines between menu items when hamburger menu is open */
    .nav-toggle:checked ~ .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        width: 100%;
        padding: 0; /* Remove any padding from list items */
        margin: 0; /* Remove any margins from list items */
    }
    
    /* Remove bottom border from the last item */
    .nav-toggle:checked ~ .nav-links li:last-child {
        border-bottom: none;
    }
    
    /* Adjust link positioning within list items */
    .nav-toggle:checked ~ .nav-links a {
        padding: 8px 20px;
        width: 100%;
        display: block;
        color: #ffffff; /* White text on dark background */
        transition: background-color 0.2s ease;
    }
    
    /* Add hover effect for mobile menu items */
    .nav-toggle:checked ~ .nav-links a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    
    /* Add some padding to the entire dropdown menu */
    .nav-toggle:checked ~ .nav-links {
        padding: 0; /* Remove all padding to move items to very top */
    }
    
    /* Ensure first menu item starts at the very top */
    .nav-toggle:checked ~ .nav-links li:first-child {
        margin-top: 0 !important;
        padding-top: 8px; /* Add some internal padding for the link */
    }
}

@media (min-width: 601px) {
    .account-column h3 {
        min-height: 60px; /* Only applies on screens wider than 600px */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
    }

    .submit-btn {
        font-size: 1em;
        padding: 10px 15px;
    }
}
h1.handwriting-heading {
    font-family: 'Roboto Flex', sans-serif; /* Fallback font */
    color: #32363B;         /* Grey/blue for the text */
    background: #fff;       /* White background for the header */
    text-transform: uppercase;
    letter-spacing: 0.08em; /* Optional: space out the capitals */
    padding: 24px 0 24px 0; /* Optional: vertical padding */
    margin: 0;
    border-radius: 8px;     /* Optional: rounded corners */
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); /* Optional: subtle shadow */
    text-align: center;
}
/* Handwriting Heading Style */
.handwriting-heading {
    font-family: 'Ephesis', cursive;
    font-size: 2.2em; /* Optional: adjust size as you like */
    font-weight: normal; /* Optional: Ephesis looks best normal */
}

/* Hero Section with Mountain Image */
.hero-section {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    max-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #ffffff;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff !important;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Additional specific selector to ensure white color */
.hero-content .hero-title,
.hero-section .hero-content h1 {
    color: #ffffff !important;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Responsive adjustments for hero section */
@media (max-width: 768px) {
    .hero-section {
        height: 60vh;
        min-height: 350px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 50vh;
        min-height: 300px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
}

.main-nav {
    background: #ffffff;
    /* border-bottom: 1px solid #e0e0e0; */
    padding: 0;
}
.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.nav-links li {
    margin: 0 18px;
}
.nav-links a {
    font: 'Roboto Flex', sans-serif;
    color: #32363B;
    text-decoration: none;
    /* font-weight: 600; */
    padding: 14px 0;
    display: block;
}

/* Newsletter Section */
.newsletter-section {
    margin: 3rem auto;
    max-width: 1168px;
    max-height: 800px;
}

.newsletter-container {
    display: flex;
    max-height: 500px;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.newsletter-form {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

/* MailerLite form overrides */
.newsletter-form .ml-form-embedWrapper {
    background-color: white !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

.newsletter-form .ml-form-embedBody {
    background-color: white !important;
    padding: 0 !important;
}

.newsletter-form .ml-form-embedContent {
    margin-bottom: 25px !important;
}

.newsletter-image {
    flex: 1; /* Make it equal width to the form */
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #f8f9fa;
}

.newsletter-illustration {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive adjustments for newsletter section */
@media (max-width: 768px) {
    .newsletter-container {
        flex-direction: column;
    }
    
    .newsletter-form {
        padding: 1.5rem;
    }
    
    .newsletter-image {
        height: 200px;
        order: -1; /* Places image above form on mobile */
    }
}

/* Brand Carousel */
.brand-carousel-wrapper {
    max-width: 1200px; /* Match your .container max-width */
    margin: 1rem auto;
    padding: 0 1rem;
}

.brand-carousel {
    width: 100%;
    padding: 20px 0;
}

.brand-carousel .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    height: 140px; /* Set a fixed height for the slides */
}

.brand-carousel img {
    max-height: 140px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.2);
    transition: filter 0.2s;
    margin: auto; /* Center the image within the slide */
}

.brand-carousel img:hover {
    filter: grayscale(0);
}

/* Testimonial Sections */
.testimonial-section {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 1rem auto;
}

.testimonial-card {
    background: #f8f9fa;
    border-left: 4px solid #28a745;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.testimonial-card::before {
    content: '"';
    font-size: 4rem;
    color: #28a745;
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: serif;
    line-height: 1;
}

.testimonial-quote {
    font-size: 1.2rem;
    font-style: italic;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.6;
    padding-left: 1rem;
}

.testimonial-author {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
    position: relative;
}

.testimonial-author::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 1px;
    background: #28a745;
    margin-right: 10px;
    vertical-align: middle;
}

/* Responsive adjustments for testimonials */
@media (max-width: 768px) {
    .testimonial-section {
        margin: 1.5rem auto;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Hide the second testimonial on mobile screens */
    .testimonials-grid .testimonial-card:nth-child(2) {
        display: none;
    }
    
    .testimonial-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .testimonial-card::before {
        font-size: 3rem;
        top: -5px;
        left: 15px;
    }
    
    .testimonial-quote {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        padding: 1rem;
    }
    
    .testimonial-quote {
        font-size: 1rem;
        padding-left: 0.5rem;
    }
}

/* Scenario Images Section */
.scenario-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.scenario-img {
    flex: 1 1 180px;   /* Grow, shrink, min width */
    max-width: 300px;  /* Don't get too big */
    width: 100%;       /* Fill available space */
    height: auto;
    cursor: pointer;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.15s, box-shadow 0.15s;
}

.scenario-img:hover, .scenario-img:focus {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

@media (max-width: 700px) {
    .scenario-images {
        flex-direction: column;
        align-items: center;
        gap: 16px; /* Optional: adjust vertical spacing */
    }
    .scenario-img {
        width: 90vw;   /* Optional: make images fit mobile screens */
        max-width: 300px;
    }
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
    width: 20px;          /* Increase checkbox width */
    height: 20px;         /* Increase checkbox height */
    cursor: pointer;      /* Show pointer cursor on hover */
    margin-right: 8px;    /* Add some space after checkbox */
    accent-color: #2196F3; /* Change checkbox color when checked */
}

/* Optional: Style the checkbox label for better alignment */
.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1em;
}


.agent-chat-iframe {
    border: 2px solid #2196F3;   /* Blue border */
    border-radius: 8px;
    width: 70%;
    height: 400px;
    min-height: 300px;
    box-sizing: border-box;
    margin: 2em auto;             /* Center horizontally */
    display: block;               /* Required for margin auto centering */
}

/* Global pre-form styles */
.pre-form-container {
  /* width: 100%; */
  max-width: 1168px;
  min-height: 420px;
  margin: 1.5em auto 1em auto;
  padding: 2em 2.5em 1.5em 2.5em;
  background: #ffffff;
  border-radius: 1.5em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: none;
  position: relative;
  color: #333;
  font-family: 'Roboto Flex', 'Segoe UI', Arial, sans-serif;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  
  /* Light border for all screens */
  border: 1px solid #e0e0e0;
}

.pre-form-container h2 {
    color: #333 !important;
    letter-spacing: 0.5px;
    margin-bottom: 0.8em;
    font-weight: 500;
}

.pre-form-container:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.pre-form-container p {
    font-size: 1.05em;
    margin-bottom: 1.2em;
    font-weight: 300;
    letter-spacing: 0.3px;
    color: #555;
}

.pre-form-container input[type="text"],
.pre-form-container input[type="number"] {
    border: 1px solid #e0e0e0;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
}

.pre-form-container input[type="text"]:focus,
.pre-form-container input[type="number"]:focus {
    box-shadow: 0 0 6px rgba(25, 118, 210, 0.15);
    border-color: rgba(25, 118, 210, 0.3);
    background-color: #ffffff;
    outline: none;
}

.pre-form-container label {
    color: #333;
    font-weight: 400;
    margin-bottom: 6px;
    display: inline-block;
}

.pre-form-container .account-label {
    color: #333;
    font-weight: 500;
    display: block;
    margin-top: 0.3em;
    font-size: 1.05em;
}

/* Portfolio footnote styling */
.portfolio-footnote {
    margin: 0.5em 0 1.5em 0;
    padding: 0.8em 1em;
    background-color: #f8f9fa;
    border-left: 3px solid #1976d2;
    border-radius: 0 4px 4px 0;
}

.portfolio-footnote p {
    color: #555;
    font-size: 0.9em;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

/* Style the account selection container to use flexbox */
.account-selection {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 2em;
    margin-top: 1em;
}

/* Make account option wrappers take up equal width */
.account-option-wrapper {
    flex: 1;
    margin: 0 0.5em;
    cursor: pointer;
}

/* Remove margin from the first and add proper spacing */
.account-option-wrapper:first-child {
    margin-left: 0;
}

/* Remove margin from the last and add proper spacing */
.account-option-wrapper:last-child {
    margin-right: 0;
}

/* Make account-selection buttons stack vertically on smaller screens */
@media (max-width: 768px) {
    .account-selection {
        flex-direction: column;
        margin-bottom: 1.5em;
    }
    
    .account-option-wrapper {
        margin: 0 0 0.8em 0;
        width: 100%;
    }
    
    .account-option-wrapper:last-child {
        margin-bottom: 0;
    }
    
    .account-option {
        padding: 0.8em;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        text-align: left;
    }
    
    .account-option .account-checkbox {
        margin-bottom: 0;
        margin-right: 0.8em;
    }
}

/* Additional adjustments for mobile screens */
@media (max-width: 480px) {
    .account-option {
        padding: 0.7em;
    }
    
    .pre-form-container .account-label {
        font-size: 1em;
    }
    
    .portfolio-footnote {
        padding: 0.7em;
        margin: 0.5em 0 1.2em 0;
    }
    
    .portfolio-footnote p {
        font-size: 0.85em;
        line-height: 1.4;
    }
}

/* Style account options for all screen sizes */
.account-option {
  padding: 1em;
  height: 100%;
  /* Add border styling for all screens */
  border: 1px solid #e0e0e0;
  border-radius: 0.8em;
  background: #f5f5f5;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.account-option:hover {
  border-color: rgba(25, 118, 210, 0.3);
  background: rgba(25, 118, 210, 0.02);
  transform: translateY(-2px);
}

.account-option .account-checkbox {
  margin-bottom: 0.3em;
  transform: scale(1.2);
  cursor: pointer;
}

/* Add borders to value input containers for all screen sizes */
.value-input {
  border: 1px solid #e0e0e0;
  border-radius: 0.8em;
  padding: 0.8em;
  margin-bottom: 1em;
  background: #f5f5f5;
  transition: border-color 0.2s, background 0.2s;
}

/* Trades section border for all screen sizes */
.trades-section {
  border: 1px solid #e0e0e0;
  border-radius: 0.8em;
  padding: 0.8em;
  margin: 1em 0;
  background: #f5f5f5;
  transition: border-color 0.2s, background 0.2s;
}

/* Make account options highlight with blue border when selected */
.account-option input:checked + label {
  color: #1976d2;
}

.account-option:has(input:checked) {
  border-color: #1976d2;
  background: rgba(25, 118, 210, 0.05);
}

/* Value input container highlights when the corresponding checkbox is checked */
.value-input:has(input:not([disabled])) {
  border-color: #1976d2;
  background: rgba(25, 118, 210, 0.05);
}

/* For older browsers that don't support :has() */
.value-input-active {
  border-color: white !important;
  background: rgba(255,255,255,0.2) !important;
}

/* Enhanced mobile styles for pre-form (adjustments for small screens) */
@media (max-width: 768px) {
  .pre-form-container {
    padding: 2em 10px;
    border-radius: 12px;
    
    /* Much smaller white border for mobile */
    outline-width: 4px; 
  }
  
  /* Ensure inputs are easier to tap on mobile */
  .input-with-prefix input,
  .trades-section input {
    padding: 0em;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
}

/* For very small screens, even smaller border */
@media (max-width: 480px) {
  .pre-form-container {
    outline-width: 2px;
    margin: 1em 10px;
  }
}

/* Remove container margins, padding and border on small screens */
@media (max-width: 480px) {
  .container {
    margin: 10px;
    padding: 0px;
    /* border: none !important; Remove border */
    border-radius: 0;
    box-shadow: none; /* Remove any box shadow if present */
  }
  
  /* Also remove any internal padding on the results section */
  .results-section {
    padding: 10px 0;
  }
  
  /* Remove any border radius on child elements too */
  .results-table, 
  .chart-container, 
  .explanation-container {
    border-radius: 0;
  }
}

.pre-form-values input[type="text"] {
  background: rgba(255,255,255,0.05); /* Default background */
  color: rgba(255,255,255,0.5);  /* Default text color */
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pre-form-values input[type="text"]:not([disabled]) {
  background: white;  /* White background when enabled */
  color: #333;        /* Darker text when enabled */
  border-color: rgba(255,255,255,0.8);
}

/* Change background color of disabled value inputs */
.pre-form-values input[type="text"] {
  background: rgba(0, 0, 0, 0.2); /* Darker background when disabled */
  color: rgba(255, 255, 255, 0.5);  /* Default text color */
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 10px;
  border-radius: 4px;
}

.pre-form-values input[type="text"]:not([disabled]) {
  background: white;  /* White background when enabled */
  color: #333;        /* Darker text when enabled */
  border-color: rgba(255, 255, 255, 0.8);
}

#pre-trading-value:disabled,
#pre-isa-value:disabled,
#pre-sipp-value:disabled {
  background: #9cb3cf !important;
  color: #fff !important;
  border-color: #9cb3cf !important;
}

/* Trustpilot score styling */
.trustpilot-score {
  text-align: left !important; /* Override any existing text-align property */
}

.score-container {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Changed from center to flex-start for left alignment */
  gap: 8px;
}

.numeric-score {
  font-weight: bold;
  min-width: 25px;
}

.star-rating {
  height: 18px;
  width: auto;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .star-rating {
    height: 14px;
  }
  
  .score-container {
    flex-direction: column;
    gap: 2px;
  }
}

/* Left-align Trustpilot column as requested earlier */
.trustpilot-score {
  text-align: left !important;
}

.score-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

/* Responsive table styles */
@media (max-width: 768px) {
  .results-table {
    width: 100%; /* Ensure the table takes full width of its container */
    font-size: 0.9rem; /* Slightly reduce font size */
  }
  
  .results-table th,
  .results-table td {
    padding: 6px 4px; /* Reduce cell padding */
  }
}

/* Even more compact for very small screens */
@media (max-width: 480px) {
  .results-table {
    font-size: 0.8rem; /* Further reduce font size */
  }
  
  .results-table th,
  .results-table td {
    padding: 4px 2px; /* Minimal padding */
  }
  
  /* Make the star rating smaller */
  .star-rating {
    height: 12px;
  }
  
  /* Stack score and stars for very narrow screens */
  .score-container {
    flex-direction: column;
    gap: 2px;
  }
  
  /* Format currency values to save space */
  .results-table td:nth-child(2),
  .results-table td:nth-child(3),
  .results-table td:nth-child(4) {
    white-space: nowrap;
  }
}

/* Optional: If table still overflows on very small screens, add horizontal scroll */
@media (max-width: 400px) {
  .results-section {
    overflow-x: auto; /* Allow horizontal scrolling only for the table section */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }
  
  .results-table {
    min-width: 360px; /* Ensure minimum width for readability */
  }
}

.result-row {
    cursor: pointer;
    transition: background 0.2s;
}
.result-row:hover {
    background: #f7f9fc;
}
.expand-details {
    padding: 25px 20px;
    background: #ffffff;
    border-left: 4px solid #2c5aa0;
    font-size: 15px;
    line-height: 1.6;
}

.broker-logo {
    max-height: 40px;
    max-width: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    ;
}

/* Results table specific broker styling */
.results-table .broker-cell {
    display: flex;
    align-items: center;
    padding: 10px;
    min-width: 140px;
    justify-content: flex-start;
}

.results-table .broker-logo {
    max-height: 35px;
    max-width: 120px;
    margin: 0; /* Remove auto margins if present */
}

/* Mobile adjustments for broker logos */
@media (max-width: 768px) {
    .results-table .broker-logo {
        max-height: 30px;
        max-width: 90px;
    }
    
    .results-table .broker-cell {
        min-width: 100px;
        display: flex;
        align-items: center;
        padding: 10px;
        min-width: 140px;
        justify-content: flex-start; /* Change from center to flex-start */
    }
}

.broker-header-logo {
    max-height: 50px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    background: transparent;
}

.best-option {
    background-color: #f2fff2 !important;
    border-left: 4px solid #146811;
    font-weight: bold;
}
.broker-explanation-content h4 {
    margin-top: 18px;
    margin-bottom: 6px;
    font-size: 1.08em;
    color: #146811;
}
.broker-explanation-content p {
    margin: 4px 0;
}
.broker-explanation-content .fee-total {
    margin-top: 10px;
    font-weight: bold;
    color: #146811;
}

.input-with-prefix.input-with-slider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.input-with-prefix .input-prefix {
  margin-right: 4px;
  font-size: 1.1em;
  color: #555;
}

.input-with-prefix input[type="text"] {
  width: 160px;
  min-width: 120px;
  max-width: 220px;
  margin-right: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 1em;
}


.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-grow: 1;
  width: 100%;
}

.value-slider.form-range {
  flex-grow: 1;
  width: 100%;
  min-width: 0;
  margin: 0 8px;
}

/* Increase slider handle size for better touch interaction */
.value-slider.form-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #007bff;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.value-slider.form-range::-webkit-slider-thumb:hover {
  background: #0056b3;
  transform: scale(1.1);
}

.value-slider.form-range::-moz-range-thumb {
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #007bff;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  -moz-appearance: none;
  appearance: none;
}

.value-slider.form-range::-moz-range-thumb:hover {
  background: #0056b3;
  transform: scale(1.1);
}

.slider-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #f1f1f1;
  border: 2px solid #28a745;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;  /* Prevents zooming on rapid taps */
  -webkit-touch-callout: none; /* Prevents callout */
  -webkit-user-select: none;   /* Prevents selection */
  user-select: none;           /* Prevents selection */
  position: relative;          /* For pseudo-element positioning */
  transition: transform 0.1s ease, background-color 0.2s ease;
}

/* Increase touch area with invisible pseudo-element */
/* Removed empty ruleset for .slider-btn::before */

/* Active/pressed state for better touch feedback */
.slider-btn:active {
  transform: scale(0.95);
  background: #e0e0e0;
}

  
  /* Larger buttons for mobile touch */
  .slider-btn {
    width: 50px;
    height: 50px;
    font-size: 24px;
    border-radius: 12px;
  }
  
  /* Even larger touch area on mobile */
  .slider-btn::before {
    top: -35px;
    left: -35px;
    right: -35px;
    bottom: -35px;
  }
  
  /* Larger slider handles for mobile */
  .value-slider.form-range::-webkit-slider-thumb {
    height: 32px;
    width: 32px;
    border: 3px solid #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  }
  
  .value-slider.form-range::-moz-range-thumb {
    height: 32px;
    width: 32px;
    border: 3px solid #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  }

/* Medium mobile devices and tablets */
@media (max-width: 768px) and (min-width: 577px) {
  .slider-btn {
    width: 46px;
    height: 46px;
    font-size: 23px;
  }
  
  .slider-btn::before {
    top: -32px;
    left: -32px;
    right: -32px;
    bottom: -32px;
  }
  
  .slider-row {
    gap: 10px;
  }
  
  /* Medium-sized slider handles for medium mobile */
  .value-slider.form-range::-webkit-slider-thumb {
    height: 28px;
    width: 28px;
    border: 2px solid #fff;
  }
  
  .value-slider.form-range::-moz-range-thumb {
    height: 28px;
    width: 28px;
    border: 2px solid #fff;
  }
}

/* === Loading Animation === */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.show {
    display: flex;
    opacity: 1;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 90%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.progress-container {
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease-out;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .loading-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .loading-text {
        font-size: 1.1rem;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
}

/* Remove extended touch areas for +/- buttons only */
.pre-form-container .slider-btn.decrease::before,
.pre-form-container .slider-btn.increase::before {
  display: none;
}

/* Keep the buttons themselves properly sized but with no extended touch */
.pre-form-container .slider-btn.decrease,
.pre-form-container .slider-btn.increase {
  /* Ensure buttons are appropriately sized */
  width: 42px;
  height: 42px;
  /* Remove any inherited extended touch behavior */
  position: relative;
}

/* Special Offers Styling */

/* Special Offers in Expandable Rows */
.special-offers {
    margin-top: 0;
    margin-bottom: 0px;
    padding: 0px 0;
}

.offer-details h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
}

.special-offers h4 {
    color: #495057;
    margin-top: 0px;
    margin-bottom: 8px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.offer-details {
    /* background: linear-gradient(135deg, #f0f8ff, #e8f4fd);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #b3d9ff;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.1); */
    margin: 0px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #6c757d;
}

.offer-item {
    margin-bottom: 12px;
    color: #333;
    line-height: 1.5;
    /* padding-left: 20px; */
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.offer-item::before {
    list-style: none;           /* Remove default list bullets */
    list-style-type: none;      /* Extra precaution for list bullets */
    content: "";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1em;
}

.offer-text {
    list-style: none;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: #333;
}

.offer-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.offer-expires {
    margin-top: 15px;
    padding-left: 20px;
    position: relative;
    color: #e74c3c;
    font-size: 0.95em;
    font-weight: 500;
    line-height: 1.5;
    font-style: italic;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.offer-button {
    margin-top: 15px;
}

.offer-expires::before {
    content: "⏰";
    position: absolute;
    left: 0;
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1em;
}

/* No Special Offers Styling */
.no-special-offers {
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #dee2e6;
    color: #6c757d;
    font-style: italic;
    text-align: center;
}

/* Broker Summary Section */
.broker-summary {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #6c757d;
}

.broker-summary-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.broker-summary-text {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 1.2em;
}

.broker-key-features {
    margin: 1.5em 0;
}

.broker-key-features h4 {
    color: #2c5aa0;
    margin-bottom: 0.8em;
    font-size: 1.1em;
}

.broker-key-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.broker-key-features li {
    position: relative;
    padding-left: 1.5em;
    margin-bottom: 0.5em;
    color: #495057;
    line-height: 1.5;
}

.broker-key-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Action Buttons Container */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.special-offer-link {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #02541e);
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(40, 167, 69, 0.25);
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.special-offer-button {
    display: inline-block;
    background: linear-gradient(135deg, #15983c, #06791f);
    color: white !important;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(44, 90, 160, 0.2);
    width: 200px;
    text-align: center;
}

.special-offer-button:hover {
    background: linear-gradient(135deg, #1aa085, #218838);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(44, 90, 160, 0.3);
    text-decoration: none;
}

.special-offer-link:hover {
    background: linear-gradient(135deg, #218838, #1aa085);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(40, 167, 69, 0.35);
}

/* Regular Sign Up Link */
.signup-link {
    display: inline-block;
    background: linear-gradient(135deg, #2c5aa0, #1e4080);
    color: white !important;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(44, 90, 160, 0.2);
    width: 200px;
}

.signup-link:hover {
    background: linear-gradient(135deg, #1e4080, #163366);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(44, 90, 160, 0.3);
}

/* Special Offers Page */
.special-offers-page {
    padding: 0;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    color: #2c5aa0;
    margin-bottom: 15px;
    font-size: 2.5em;
}

.page-header p {
    color: #666;
    font-size: 1.2em;
    max-width: 600px;
    margin: 0 auto;
}

.special-offers-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

.special-offers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
}

.special-offers-table th {
    background: linear-gradient(135deg, #2c5aa0, #1e4080);
    color: white;
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1em;
}

.special-offers-table td {
    padding: 20px 15px;
    border-bottom: 1px solid #e8e8e8;
    vertical-align: top;
}

.special-offers-table tr:hover {
    background-color: #f8f9fa;
}

.broker-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.broker-logo-large {
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Broker logo for results table (consistent sizing) */
/* .broker-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    margin-right: 10px;
    vertical-align: middle;
    background: #fff;
    box-shadow: 0 1px 4px rgba(44,90,160,0.08);
} */

/* Broker logo for static rates table (aligned horizontally with name) */
.broker-logo-small {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(44,90,160,0.08);
    flex-shrink: 0;
}

.rates-reference-table .broker-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 0;
}

.rates-reference-table .broker-name {
    display: block;
    font-size: 1em;
    font-weight: 600;
    color: #2c5aa0;
    margin-left: 10px;
    text-align: left;
}
.broker-name {
    font-weight: 600;
    color: #2c5aa0;
    min-width: 120px;
    text-align: center;
}

.offers-list {
    line-height: 1.6;
    list-style: none;
}

.offers-list .offer-item {
    list-style: none;
    margin-bottom: 10px;
    color: #333;
}

.offers-list .offer-expires {
    margin-top: 15px;
    padding: 8px 12px 8px 30px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    color: #856404;
    font-size: 1.1em;
    position: relative;
}

.offers-list .offer-expires::before {
    content: "⏰";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1em;
}

.claim-offer-btn {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white !important;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
    margin-top: 15px;
    width: fit-content;
}

.claim-offer-btn:hover {
    background: linear-gradient(135deg, #218838, #1aa085);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.offers-disclaimer {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.offers-disclaimer h3 {
    color: #856404;
    margin-bottom: 15px;
}

.offers-disclaimer ul {
    color: #666;
    line-height: 1.6;
}

.offers-disclaimer li {
    margin-bottom: 8px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .special-offers-table {
        font-size: 0.85em;
        background: #f5f5f7;
        padding: 15px;
    }

    .table-row {
        display: flex;
        flex-direction: column;
        background: white;
        margin-bottom: 15px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        padding: 15px;
        border: 1px solid #e0e0e0;
    }

    .table-header {
        display: none;
    }
    
    .table-cell {
        padding: 12px 8px;
        border-bottom: 1px solid #eee;
        position: relative;
    }

    .table-cell:last-child {
        border-bottom: none;
    }

    .table-cell:before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 0.9em;
        display: block;
        margin-bottom: 5px;
    }
    
    .broker-info {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .broker-name {
        min-width: 100px;
        max-width: 100px;
        word-break: break-word;
        line-height: 1.3;
        font-size: 0.9em;
    }
    
    .table-cell.broker-cell {
        text-align: center;
        padding: 15px 8px;
    }

    .table-cell.offer-cell {
        padding: 15px 8px;
    }

    .table-cell.action-cell {
        text-align: center;
        padding: 15px 8px;
    }
    
    .claim-offer-btn {
        padding: 12px 24px;
        font-size: 0.95em;
        width: 100%;
        margin-top: 0;
    }

    .broker-logo-large {
        max-width: 120px;
        max-height: 80px;
    }
    
    .page-header h1 {
        font-size: 2em;
    }
}

/* Mobile Responsive for Expandable Rows */
@media (max-width: 768px) {
    .expand-details {
        padding: 20px 15px;
        font-size: 14px;
    }
    
    .expand-details > strong:first-child {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }

    .signup-link,
    .special-offer-button {
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .offer-details {
        padding: 15px 20px;
    }
    
    .broker-summary {
        padding: 12px 15px;
        margin: 15px 0;
    }
    
    .special-offers h4 {
        font-size: 1.1em;
    }
}

/* ===== CASH INTEREST CALCULATOR STYLES ===== */

.calculator-section {
    background: #ffffff;
    padding: 0;
}

.calculator-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.calculator-form h2 {
    margin-bottom: 25px;
    color: #2c5aa0;
    font-size: 1.8rem;
    text-align: center;
}

/* Use the same pre-form-values styling for calculator form */
.calculator-form .pre-form-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.calculator-form .pre-form-values .value-input {
    background: white;
    border-radius: 12px;
    padding: 0;
}

.calculator-form .pre-form-values input[type="text"] {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #333;
}

.calculator-form .pre-form-values input[type="text"]:focus {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.calculate-btn, .clear-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.calculate-btn {
    background: linear-gradient(135deg, #2c5aa0, #1a4480);
    color: white;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #1a4480, #2c5aa0);
    transform: translateY(-2px);
}

.clear-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.clear-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
}

.rates-reference-section {
    background: white;
    padding: 5px 0;
}

.rates-reference-section h3 {
    color: #2c5aa0;
    font-size: 2rem;
    margin-bottom: 15px;
    text-align: center;
}

.rates-disclaimer {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 30px;
}

.rates-table-container {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rates-reference-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 700px;
}

.rates-reference-table th {
    background: #2c5aa0;
    color: white;
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #1a4480;
}

.rates-reference-table th:first-child {
    border-top-left-radius: 12px;
}

.rates-reference-table th:last-child {
    border-top-right-radius: 12px;
}

.rates-reference-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    line-height: 1.5;
}

/* Broker cell styling for rates reference table */
.rates-reference-table .broker-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

.rates-reference-table .broker-info {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.rates-reference-table .broker-logo-container {
    width: 120px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.rates-reference-table .broker-logo-large {
    max-width: 120px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Source and date styling within rate cells */
.rate-source {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #e9ecef;
}

.rate-source a {
    color: #007bff;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
}

.rate-source a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.rate-date {
    margin-top: 4px;
    color: #6c757d;
    font-size: 0.8em;
    font-style: italic;
}

/* Freetrade special calculation styling */
.freetrade-special {
    background-color: #f0f8ff;
    border: 2px solid #007bff;
    border-radius: 8px;
    margin: 15px 0;
    padding: 15px;
}

.freetrade-special h5 {
    color: #007bff;
    margin-bottom: 12px;
}

.freetrade-special .calc-step {
    margin-bottom: 6px;
    font-weight: 500;
}

.freetrade-special .calc-note {
    margin-top: 10px;
    font-size: 0.9em;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    padding-top: 8px;
}

.rates-reference-table tr:nth-child(even) {
    background: #f8f9fa;
}

.rates-reference-table tr:hover {
    background: #e3f2fd;
}

.broker-logo-small {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 12px;
    vertical-align: middle;
}

.calculations-section {
    background: #f8f9fa;
    padding: 50px 0;
}

.calculations-section h3, .calculations-section h4 {
    color: #2c5aa0;
    margin-bottom: 15px;
}

.calculation-info {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calculation-info ul {
    margin: 20px 0;
    padding-left: 20px;
}

.calculation-info li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.example-calc {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.example-calc p {
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    color: #1a4480;
}

.chart-section {
    background: white;
    padding: 50px 0;
}

.chart-section h3 {
    color: #2c5aa0;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
}



/* Interest Calculation Styling */
.account-calculation {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5aa0;
}

.account-calculation h5 {
    margin: 0 0 15px 0;
    color: #2c5aa0;
    font-size: 1.2em;
    font-weight: 600;
}

.calculation-details {
    margin-left: 10px;
}

.rate-info {
    color: #6c757d;
    font-size: 0.9em;
    margin: 5px 0;
    font-style: italic;
}

.calc-step {
    margin: 8px 0;
    font-family: 'Courier New', monospace;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 0.9em;
}

.calc-result {
    margin: 12px 0 0 0;
    padding: 10px 15px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    color: #1565c0;
    font-weight: 600;
}

.total-calculation {
    margin-top: 30px;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 8px;
    border: 2px solid #4caf50;
}

.total-calculation h5 {
    margin: 0 0 15px 0;
    color: #2e7d32;
    font-size: 1.3em;
    font-weight: 700;
}

.total-sum {
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    color: #2e7d32;
    margin: 0;
    text-align: center;
    font-weight: 600;
}

/* Mobile Responsiveness for Calculator */
@media (max-width: 768px) {
    .calculator-form {
        padding: 20px;
        margin: 0 10px;
    }
    
    .calculator-form .pre-form-values {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .calculate-btn, .clear-btn {
        width: 100%;
        max-width: 250px;
    }
    
    .rates-reference-table {
        font-size: 14px;
    }
    
    .rates-reference-table th,
    .rates-reference-table td {
        padding: 12px 8px;
    }    
}
    


/* Homepage Options Styling */
.homepage-options {
    padding: 0px 0;
}

.homepage-options .page-header {
    text-align: center;
    margin-bottom: 50px;
}

.homepage-options .page-header h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.homepage-options .page-header p {
    font-size: 1.2em;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.comparison-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.option-card {
    background: linear-gradient(135deg, #ccd1d8 0%, #d7dee9 100%);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(14, 0, 92, 0.2);
    border: 1px solid #eee;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.option-icon {
    text-align: center;
    margin-bottom: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 150px;
}

.option-icon img, .homepage-icon {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0px auto;
}

.option-icon .icon-placeholder {
    font-size: 3em;
    display: block;
    line-height: 1;
}

/* Responsive styles for the homepage icons */
@media (max-width: 768px) {
    .option-icon {
        height: 150px;
        margin-top: 10px;
        margin-bottom: 25px;
    }
    
    .option-icon img, .homepage-icon {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .option-icon {
        height: 150px;
        margin-top: 5px;
        margin-bottom: 20px;
    }
    
    .option-icon img, .homepage-icon {
        width: 120px;
        height: 120px;
    }
}

.option-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

.option-content h2 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 15px;
    text-align: center;
}

.option-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.option-features {
    list-style: none;
    padding: 0;
    margin: 0px 0;
}

.option-features li {
    padding: 5px 0;
    color: #555;
    font-size: 0.95em;
}

.option-btn {
    display: block;
    text-align: center;
    padding: 15px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: auto;
    border: 2px solid;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.primary-btn {
    background: #2c3e50;
    border-color: #2c3e50;
    color: white;
}

.primary-btn:hover {
    background: #3a516a;
    border-color: #3a516a;
    transform: translateY(-2px);
}

.secondary-btn {
    background: #304e62;
    border-color: #304e62;
    color: white;
}

.secondary-btn:hover {
    background: #3e637b;
    border-color: #3e637b;
    transform: translateY(-2px);
}

.tertiary-btn {
    background: #445d6e;
    border-color: #445d6e;
    color: white;
}

.tertiary-btn:hover {
    background: #526d82;
    border-color: #526d82;
    transform: translateY(-2px);
}

.homepage-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}

.homepage-summary h2 {
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 20px;
}

.homepage-summary p {
    color: #666;
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 30px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive adjustments for homepage */
@media (max-width: 768px) {
    .homepage-options .page-header h1 {
        font-size: 2em;
    }
    
    .comparison-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .option-card {
        padding: 20px;
    }
    
    .option-content h2 {
        font-size: 1.5em;
    }
    
    .homepage-summary {
        padding: 30px 20px;
    }
    
    .homepage-summary h2 {
        font-size: 1.6em;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 2em;
    }
}

/* Footer Styling */
.site-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e7e7e7;
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    margin: 1.5rem 0;
    text-align: center;
}

.footer-logo img {
    max-width: 160px;
    height: auto;
}

.footer-links {
    width: 100%;
    margin-bottom: 0.5rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links li {
    margin: 0 1rem 0.5rem;
}

.footer-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #1976d2;
}

.footer-info {
    flex: 0 0 100%;
    margin-top: 1rem;
    text-align: center;
    color: #666;
    font-size: 0.9em;
}

.footer-disclaimer {
    font-size: 0.8em;
    color: #888;
    max-width: 600px;
    margin: 0.5rem auto 0;
}

/* Footer Responsive */
@media (max-width: 768px) {
    .footer-logo {
        margin: 1.2rem 0;
    }
    
    .footer-links li {
        margin: 0 0.6rem 0.5rem;
    }
}

/* FAQ Page Styling */
.faq-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 20px;
}

.faq-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 2rem;
}

.faq-content h2 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.faq-item {
    margin-bottom: 1.8rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    color: #1976d2;
    margin-bottom: 0.7rem;
    font-size: 1.2rem;
}

/* About Page Styling */
.about-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 20px;
}

.about-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 2rem;
}

.about-content h2 {
    color: #333;
    margin: 1.5rem 0 1rem;
}

.about-content h2:first-child {
    margin-top: 0;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.about-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.about-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.about-content a {
    color: #1976d2;
    text-decoration: none;
}

.about-content a:hover {
    text-decoration: underline;
}

/* Special Offers Table Styles */
.special-offers-table-container {
    margin-bottom: 40px;
    overflow-x: auto;
}

.special-offers-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

/* Table rows as flex containers */
.table-row {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.table-header {
    background-color: #2c3e50;
    color: #ffffff;
}

.table-cell {
    padding: 15px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.table-cell.broker-cell {
    flex: 1;
    max-width: 160px;
    min-width: 140px;
    justify-content: center;
    border-right: 1px solid #e0e0e0;
}

.table-cell.offer-cell {
    flex: 3;
    flex-direction: column;
    align-items: flex-start;
}

.table-cell.account-cell {
    flex: 1;
    justify-content: center;
    text-align: center;
    border-right: 1px solid #e0e0e0;
}

.table-cell.expiry-cell {
    flex: 1;
    justify-content: center;
    text-align: center;
    border-right: 1px solid #e0e0e0;
}

.table-cell.action-cell {
    flex: 1;
    justify-content: center;
}

.table-header .table-cell {
    font-weight: 600;
    border-right: 1px solid #3a4e63;
}

.table-header .table-cell:last-child {
    border-right: none;
}

.special-offers-table thead {
    background-color: #2c3e50;
    color: #ffffff;
}

.special-offers-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.special-offers-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.special-offers-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.special-offers-table td {
    padding: 15px;
    vertical-align: middle;
}

.broker-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.broker-logo-container {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.broker-logo-large {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.broker-name-text {
    text-align: center;
    font-size: 1.1em;
}

.offers-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.offer-content {
    list-style: none;
    flex-grow: 1;
    padding-right: 20px;
}

.offer-action {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.offer-item {
    margin-bottom: 10px;
    line-height: 1.4;
}

.offer-expires {
    color: #e74c3c;
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.claim-offer-btn {
    display: inline-block;
    background: #2c3e50;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    font-weight: 500;
    transition: background 0.3s;
    border: 2px solid #2c3e50;
}

.claim-offer-btn:hover {
    background: #3a516a;
    border-color: #3a516a;
}

.account-types {
    font-weight: 500;
}

.expiry-date {
    font-weight: 500;
    white-space: nowrap;
}

.no-offers {
    color: #7f8c8d;
    font-style: italic;
}

.no-offer-row {
    background-color: #f9f9f9;
}

.offers-disclaimer {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.offers-disclaimer h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
}

.offers-disclaimer ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 0;
}

.offers-disclaimer li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #555;
}

/* Broker Advertisement Section Styles */
.broker-advert-section {
    margin-bottom: 20px;
    padding: 0;
    background: none;
    box-shadow: none;
    text-align: center;
    width: 100%;
    max-width: 1168px;
    margin-left: auto;
    margin-right: auto;
}

.broker-advert-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.broker-advert {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.broker-advert-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    width: 100%;
}

.broker-advert-link:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(44, 62, 80, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
    pointer-events: none;
}

.broker-advert-link:hover:after {
    opacity: 1;
}

.broker-advert-image {
    max-width: 100%;
    height: auto;
    border-radius: 1em;
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.broker-advert-link:hover .broker-advert-image {
    transform: scale(1.01);
}

@media (max-width: 768px) {
    .table-cell {
        padding: 10px;
    }
    
    .broker-logo-container {
        height: auto;
        margin-bottom: 6px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .broker-logo-large {
        max-width: 180px;
        max-height: 90px;
    }
    
    .broker-name-text {
        font-size: 1.0em;
    }
    
    .offer-item {
        font-size: 1.0em;
        line-height: 1.5;
        margin-bottom: 8px;
    }
    
    .broker-name {
        white-space: normal;
        text-align: center;
    }
    
    .offers-list {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .offer-content {
        list-style: none;
        padding-right: 0;
        margin-bottom: 10px;
    }
    
    .offer-action {
        align-self: flex-end;
        width: 100%;
    }
    
    .claim-offer-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Responsive flexbox table */
    .table-row {
        flex-direction: column;
        margin-bottom: 20px;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 15px;
        border: 1px solid #e9ecef;
    }
    
    .table-row.no-offer-row {
        background-color: #f8f9fa;
        border: 1px solid #dee2e6;
    }
    
    .table-cell {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
        max-width: 100%;
        padding: 8px 0;
    }
    
    .table-cell.broker-cell {
        max-width: 100%;
        min-width: 0;
        border-bottom: 2px solid #e9ecef;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .table-cell:last-child {
        border-bottom: none;
    }
    
    .table-header {
        display: none; /* Hide header on mobile */
    }
    
    .table-cell.account-cell::before,
    .table-cell.expiry-cell::before,
    .table-cell.action-cell::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 8px;
        min-width: 100px;
    }
    
    /* Hide "Link:" label on mobile for cleaner look */
    .table-cell.action-cell::before {
        display: none;
    }
    
    /* Hide broker name text on mobile, keep only logo */
    .broker-name-text {
        display: none;
    }
    
    /* Make offer text consistent with other mobile text sizes */
    .offer-item {
        font-size: 1.1em;
        line-height: 1.5;
        margin-bottom: 8px;
    }
    
    .no-offers {
        font-size: 1.1em;
        color: #6c757d;
        font-style: italic;
    }
    
    .table-cell.account-cell,
    .table-cell.expiry-cell {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .table-row {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .table-cell {
        padding: 6px 0;
    }
    
    .broker-logo-container {
        height: auto;
        margin-bottom: 4px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    .broker-logo-large {
        max-width: 150px;
        max-height: 80px;
    }
    
    /* Ensure broker name text stays hidden on very small screens */
    .broker-name-text {
        display: none;
    }
    
    /* Make buttons more touch-friendly on very small screens */
    .claim-offer-btn {
        padding: 12px 18px;
        font-size: 1.0em;
    }
    
    /* Consistent text sizing on very small screens */
    .offer-item {
        font-size: 1.0em;
        margin-bottom: 8px;
        line-height: 1.5;
    }
    
    .no-offers {
        font-size: 1.0em;
    }
    
    .table-cell.account-cell,
    .table-cell.expiry-cell {
        font-size: 1.0em;
    }
    
    .offer-item {
        font-size: 0.85em;
        margin-bottom: 8px;
    }
    
    .offer-expires {
        font-size: 1.1em;
        margin-top: 6px;
        margin-bottom: 10px;
    }
    
    .claim-offer-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .special-offers-table-container {
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }
    
    .broker-advert-section {
        padding: 20px 10px;
        width: 100%;
        margin-bottom: 0px;
    }
    
    .broker-advert-section h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    .broker-advert-link {
        max-width: 100%;
    }
    
    .table-cell.account-cell::before,
    .table-cell.expiry-cell::before,
    .table-cell.action-cell::before {
        min-width: 80px;
        font-size: 0.9em;
    }
}

/* Newsletter Form Overrides */
.ml-form-embedWrapper {
    background: white !important;
    max-width: 600px !important;
}

.ml-form-embedBody {
    background: white !important;
}

.ml-form-embedContent {
    margin: 0 !important;
    padding: 0 !important;
}
