/* ====================================
   1. Reset and Base Styles
==================================== */

/* Font loading states to prevent FOUT */
.font-loading {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.fonts-loaded body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 10px;
    background-color: #F4F1E8;
    color: #333;
    font-size: 14px;
    font-display: swap; /* Enable font swapping */
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    background-color: #FFFFFF;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 15px;
}

/* ====================================
   2. Typography
==================================== */
h1, h2, h3 {
    font-family: inherit; /* Inherit from body for consistent font loading */
}

.fonts-loaded h1,
.fonts-loaded h2, 
.fonts-loaded h3 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

h1 {
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 15px;
    color: #8e4300;
}

h2 {
    font-size: 1.4em;
    border-bottom: 1px solid #666;
    margin-top: 20px;
    margin-bottom: 15px;
    color: #1e2579;
}

/* Definition List Styles */
dl {
    margin: 1.5rem 0;
    padding: 0;
}

dt {
    font-weight: 600;
    color: #2c3e50;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.4;
}

dt:first-child {
    margin-top: 0;
}

dd {
    margin: 0 0 1.5rem 1.5rem;
    color: #34495e;
    line-height: 1.6;
    padding-left: 1rem;
    border-left: 3px solid #3498db;
}

dd:last-child {
    margin-bottom: 0;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    dd {
        margin-left: 1rem;
    }
}

/* ====================================
   3. Header Styles
==================================== */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e5e5e5;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: #2c3e50;
}

.brand a {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.brand a:hover,
.brand a:focus {
    text-decoration: none;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 10px;
}

.site-logo {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

.site-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #2c3e50;
    line-height: 1.2;
}

.site-description {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin: 0;
    line-height: 1.3;
}

/* ====================================
   3.5 Breadcrumb Navigation
==================================== */
.breadcrumbs {
    margin: 0 0 20px 0;
    padding: 8px 15px;
    background-color: #f8f8f8;
    border-radius: 4px;
    border: 1px solid #e7e7e7;
}

.breadcrumbs ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.breadcrumbs li {
    display: inline-block;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin: 0 8px;
    color: #6c757d;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
    color: #2980b9;
    text-decoration: underline;
}

.breadcrumbs li[aria-current="page"] {
    color: #6c757d;
    font-weight: 500;
}

.pagination {
    margin: 0 auto;
    width: 200px;
    text-align: center;
}

/* For mobile responsiveness */
@media (max-width: 576px) {
    .breadcrumbs {
        padding: 6px 10px;
        margin-bottom: 15px;
    }
    
    .breadcrumbs li {
        font-size: 13px;
    }
}

/* ====================================
   4. Form Styles
==================================== */
.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 10px;
    position: relative;
}

label {
    display: block;
    margin: 5px 0;
    font-weight: bold;
    word-wrap: break-word;
    min-height: 40px;
    color: #2c3e50;
}

/* Required field indicator */
.form-group label.required::after {
    content: "*";
    color: #e74c3c;
    margin-left: 4px;
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[readonly] {
    background: none;
    cursor: not-allowed;
    border: none;
    color: maroon;
    font-weight: bold;
    padding-left: 0;
}

/* Form Validation and Error States */
input.invalid {
    border-color: #e74c3c;
    background-color: #fff3f3;
    box-shadow: 0 0 3px #e74c3c;
}

.error-message {
    color: #c0392b;
    background-color: #ffebee;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

.validation-summary {
    background-color: #fff3f3;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: #c0392b;
}

/* Focus States */
input:focus,
button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

/* ====================================
   5. Button Styles
==================================== */
button:not(.menu-toggle) {
    width: 100%;
    padding: 10px;
    background-color: #2C3E50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin: 10px 0;
}

button:not(.menu-toggle):hover {
    background-color: #34495E;
}

button:not(.menu-toggle):disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* ====================================
   6. Loading Indicator
==================================== */
#loadingIndicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* ====================================
   7. Results Section
==================================== */
#results {
    margin-top: 20px;
    background-color: #FFFFFF;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#resultsBox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ECF0F1;
    padding-bottom: 20px;
}

.resultBlock {
    padding: 15px;
    background-color: #F9F7F2;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resultBlock h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #2C3E50;
}

.resultBlock p {
    font-size: 1.2em;
    font-weight: bold;
    margin: 10px 0 0;
    color: #27AE60;
}

.resultBlock .result-value {
    font-size: 1.2em;
    font-weight: bold;
    margin: 10px 0 5px;
    color: #27AE60;
}

.resultBlock .result-description {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

#decisionStatement {
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    margin: 25px 0;
    color: #8e4300;
    padding: 15px;
    background-color: #F9F7F2;
    border-radius: 8px;
    border-left: 4px solid #8e4300;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Update tabs container */
.tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px auto;
    text-align: center;
    width: 100%;
}

/* Update tab buttons */
.tablink {
    background-color: #FFFFFF;
    color: #2C3E50;
    border: 2px solid #2C3E50;
    padding: 12px 30px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    min-width: 150px;
    margin: 0 5px;
}

/* Hover state */
.tablink:hover {
    background-color: #ECF0F1;
    color: #2C3E50;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Active state */
.tablink.active {
    background-color: #2C3E50;
    color: #FFFFFF;
    border-color: #2C3E50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Active + Hover state */
.tablink.active:hover {
    background-color: #34495E;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Focus state */
.tablink:focus-visible {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* Update graph container */
#graph {
    height: 500px;
    width: 100%;
    padding: 20px;
    margin: 20px 0;
    overflow: hidden;
}

/* Update canvas container */
#myChart {
    max-width: 100%;
    height: 100% !important;
    width: 100% !important;
}

.tabcontent {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.table-wrapper {
    position: relative;
    width: 100%;
    overflow-x: auto;
}

.table-container {
    margin-bottom: 60px; /* Space for the button */
}

.button-container {
    position: relative;
    padding: 20px 0;
    text-align: left;
}

.download-button {
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
}

p.excel {
    margin: 10px auto;
    display: block;
    width: 600px;
}

a.button.primary.download-button {
    position: relative;
    border-radius: 20px;
    text-decoration: none;
    margin: 0 auto;
}

section.calcjump1 {
    position: relative;
    padding: 0;
    margin: 0;
    height: auto;
}

p.download-wrapper.calcjump {
    display: block;
    width: 240px;
    margin: 0 auto;
}

.calcjump a.button.primary.download-button {
    position: relative;
    width: 200px;
    display: block;
    top: 0px;
    left: 0;
}

.tool-screenshot {
    float: right;
    margin: 10px 0 10px 10px;
    width:clamp(180px,32%,309px);
  }
  
.tool-screenshot img {
    display: block;
    width: 100%;
    height: auto;
}

figcaption {
    font-size: 0.9rem;
    text-align: center;
    color: #393939;
}

.download-button:hover {
    background-color: #27ae60;
    color: white;
}

.download-button:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

.formula-box {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 12px 16px;
    margin: 8px 0 16px 0;
    font-family: 'Courier New', monospace;
    border-radius: 4px;
}

.related-topics li {
    display: inline;
    margin-right: 10px;
    border-right: #8e4300 3px solid;
    padding-right: 10px;
}

.related-topics ul { 
    display: inline; margin: 0; padding:0;
}

.related-topics p {
    font-weight: 700;
    margin-top: 25px;
    font-size: 1.1rem;
}

/* Make sure table content is scrollable if needed */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #2C3E50;
    color: white;
}

@media (max-width:768px){
    .tool-screenshot{
      float:none; 
      margin:0 auto 1rem;
      width:90%;
      max-width:309px;
    }
}
/* ====================================
   8. FAQ Section
==================================== */
.faq-section {
    margin-top: 40px;
    padding: 30px;
    background-color: #F9F7F2;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.faq-section h2 {
    color: #2C3E50;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: none;
}

.faq-section h3 {
    color: #34495E;
    font-size: 1.1em;
    margin: 20px 0 10px;
    cursor: pointer;
    padding: 15px;
    background-color: #FFFFFF;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid #ECF0F1;
    position: relative;
}

.faq-section h3:hover {
    background-color: #ECF0F1;
    transform: translateX(5px);
}

.faq-section h3::after {
    content: "+";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
    color: #666;
}

.faq-section h3.active::after {
    content: "-";
}

.faq-section div[itemprop="text"] {
    padding: 20px;
    color: #444;
    line-height: 1.6;
    background-color: #FFFFFF;
    border-radius: 0 0 6px 6px;
    margin-top: -10px;
    border: 1px solid #ECF0F1;
    border-top: none;
}

/* Add bullets for lists in FAQ answers */
.faq-section div[itemprop="text"] ul {
    margin: 10px 0;
    padding-left: 20px;
}

.faq-section div[itemprop="text"] li {
    margin-bottom: 5px;
}

/* Add visual indicator for answers */
.faq-section div[itemprop="acceptedAnswer"] {
    position: relative;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Format bullet points in answers */
/*.faq-section div[itemprop="text"] {
    white-space: pre-line;
}*/




/* ====================================
   9. Accessibility
==================================== */
.skip-to-main-content {
    position: absolute;
    top: -9999px;
    left: -9999px;
    z-index: 999;
    padding: 0.8em 1.2em;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    overflow: hidden;
    transition: top 0.3s ease, left 0.3s ease, transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    font-weight: 600;
}

.skip-to-main-content:focus {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.skip-to-main-content:hover {
    background-color: #3498db;
}

.skip-to-main-content:focus-visible {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .form-group label,
    button,
    input[type="text"] {
        forced-color-adjust: none;
    }
}

/* ====================================
   10. Footer Styles
==================================== */
.site-footer {
    margin-top: 60px;
    padding: 40px 0 20px;
    background-color: #2C3E50;
    color: #ECF0F1;
    border-radius: 0 0 15px 15px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-section h2 {
    color: #ECF0F1;
    font-size: 1.2em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #34495E;
}

.footer-section p {
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-section a {
    color: #3498DB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #2980B9;
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #34495E;
    text-align: center;
    font-size: 0.85em;
    color: #BDC3C7;
}

.footer-bottom p {
    margin: 5px 0;
}

.footer-bottom a {
    color: #3498DB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #2980B9;
    text-decoration: underline;
}

.footer-section a:focus,
.footer-bottom a:focus {
    outline: 2px solid #3498DB;
    outline-offset: 2px;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.footer-nav li a {
    color: #3498DB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav li a:hover {
    color: #2980B9;
    text-decoration: underline;
}

.footer-subnav {
    margin-top: 1rem;
    border-top: 1px solid #34495E;
    padding-top: 0.75rem;
}

.footer-subnav .footer-policies {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: 0.85em;
}

.footer-subnav .footer-policies li a {
    color: #3498DB;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-subnav .footer-policies li a:hover {
    color: #2980B9;
    text-decoration: underline;
}

.download-button {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.download-button:hover {
    background-color: #27ae60;
}

.download-button:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

/* ====================================
   11. Media Queries
==================================== */
/* Mobile touch targets */
@media (max-width: 768px) {
    /* Improved site header layout for mobile */
    .site-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        position: relative;
        flex-wrap: nowrap;
    }

    .brand {
        flex-direction: row;
        align-items: center;
        margin-right: 0;
        flex: 1;
    }
    
    /* Better hamburger menu toggle positioning */
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 1001;
        position: relative;
        background: transparent;
        border: none;
        width: 44px;
        height: 44px;
        padding: 0;
        cursor: pointer;
        margin-left: auto;
        flex-shrink: 0;
    }

    /* Hamburger icon (closed state) - only when menu is NOT open */
    .menu-toggle[aria-expanded="false"] .menu-toggle-icon,
    .menu-toggle:not([aria-expanded="true"]) .menu-toggle-icon {
        display: block;
        width: 26px;
        height: 2px;
        background-color: #2c3e50;
        position: relative;
        transition: all 0.3s ease-in-out;
    }

    .menu-toggle[aria-expanded="false"] .menu-toggle-icon::before,
    .menu-toggle[aria-expanded="false"] .menu-toggle-icon::after,
    .menu-toggle:not([aria-expanded="true"]) .menu-toggle-icon::before,
    .menu-toggle:not([aria-expanded="true"]) .menu-toggle-icon::after {
        content: '';
        display: block;
        width: 26px;
        height: 2px;
        background-color: #2c3e50;
        position: absolute;
        left: 0;
        transition: all 0.3s ease-in-out;
    }

    .menu-toggle[aria-expanded="false"] .menu-toggle-icon::before,
    .menu-toggle:not([aria-expanded="true"]) .menu-toggle-icon::before {
        top: -7px;
    }

    .menu-toggle[aria-expanded="false"] .menu-toggle-icon::after,
    .menu-toggle:not([aria-expanded="true"]) .menu-toggle-icon::after {
        bottom: -7px;
    }

    /* Menu toggle when menu is open - perfect circle */
    .menu-toggle[aria-expanded="true"] {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        background-color: #fff !important;
        border-radius: 50% !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        max-width: 48px !important;
        max-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 1002;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
        border: 2px solid #e5e5e5;
    }

    /* Icon container when open - centered square */
    .menu-toggle[aria-expanded="true"] .menu-toggle-icon {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        display: block !important;
        position: relative !important;
        background: transparent !important;
    }

    /* X icon lines when menu is open */
    .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before,
    .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
        content: '' !important;
        display: block !important;
        position: absolute !important;
        width: 20px !important;
        height: 2px !important;
        background-color: #2C3E50 !important;
        border-radius: 1px !important;
        top: 50% !important;
        left: 50% !important;
        margin: 0 !important;
        transform-origin: center !important;
        transition: all 0.3s ease !important;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
        transform: translate(-50%, -50%) rotate(45deg) !important;
    }

    .menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
        transform: translate(-50%, -50%) rotate(-45deg) !important;
    }
    
    /* Mobile Nav Container positioning */
    .nav-container {
        position: fixed;
        top: 0;
        right: -360px;
        width: 360px;
        max-width: 85vw;
        height: 100%;
        background-color: #ffffff;
        z-index: 1000;
        overflow-y: auto;
        transition: right 0.3s ease;
        padding-top: 5rem;
        box-shadow: -3px 0 20px rgba(0,0,0,0.3);
    }
    
    .nav-container.open {
        right: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .brand-text {
        text-align: left;
    }

    .site-logo {
        width: 60px;
        height: 60px;
    }

    .site-title {
        font-size: 1.5em;
        margin-bottom: 0.2rem;
    }

    .site-description {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .main-nav {
        width: 100%;
        padding: 0;
    }

    .main-nav ul,
    .nav-menu {
        justify-content: flex-start;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-nav .nav-link,
    .nav-link {
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1rem;
        color: #2C3E50;
        text-decoration: none;
        display: block;
        text-align: left;
        font-weight: 500;
        transition: background-color 0.2s ease;
    }

    .main-nav .nav-link:hover,
    .nav-link:hover {
        background-color: #f8f9fa;
        color: #3498DB;
    }

    .nav-link.active,
    .nav-item.active > .nav-link {
        background-color: rgba(52, 152, 219, 0.08);
        color: #3498DB;
        font-weight: 600;
    }

    /* Dropdown toggle styling for mobile */
    .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown-icon {
        display: inline-block !important;
        margin-left: auto !important;
        font-size: 1.1rem !important;
        color: #3498DB !important;
        font-weight: bold !important;
        transition: transform 0.3s ease !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .dropdown-toggle[aria-expanded="true"] .dropdown-icon {
        transform: rotate(180deg) !important;
    }

    /* Mobile dropdown menu */
    .dropdown-menu {
        position: static !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        background-color: #f8f9fa !important;
        border-radius: 0 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transform: none !important;
        transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0s 0.4s !important;
    }

    .dropdown-menu.show {
        visibility: visible !important;
        opacity: 1 !important;
        max-height: 600px !important;
        width: 250px !important;
        transition: max-height 0.4s ease, opacity 0.3s ease !important;
    }

    .dropdown-item {
        display: block !important;
        width: 100% !important;
        padding: 0.875rem 1rem 0.875rem 1.75rem !important;
        font-size: 0.9rem !important;
        color: #34495e !important;
        text-decoration: none !important;
        text-align: left !important;
        background-color: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        transition: background-color 0.2s ease !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        line-height: 1.5 !important;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #e9ecef !important;
        color: #3498DB !important;
    }

    .dropdown-item.active {
        background-color: rgba(52, 152, 219, 0.12) !important;
        color: #3498DB !important;
        font-weight: 600 !important;
    }

    input[type="text"],
    button {
        min-height: 44px;
    }
    
    .form-group label {
        min-height: 35px;
        padding: 2px 0;
    }
    
    .form-row {
        margin: 0 -5px;
    }

    .form-group {
        margin: 0 5px 15px;
    }

    button {
        width: auto;
        min-width: 150px;
    }

    .form-row button {
        margin: 5px auto;
    }

    .table-wrapper {
        -webkit-overflow-scrolling: touch;
        position: relative;
        background-color: #fefefe;
    }
    
    .table-wrapper::after {
        content: '→';
        position: absolute;
        right: 10px;
        top: 50%;
        opacity: 0.5;
        animation: pulse 2s infinite;
    }

    #resultsBox {
        grid-template-columns: repeat(3, 1fr);
    }

    .tablink {
        padding: 15px 30px;
    }

    #graph {
        height: 500px;
    }

    .faq-section {
        padding: 40px;
    }

    .faq-section h2 {
        font-size: 2em;
    }

    .faq-section h3 {
        font-size: 1.2em;
        padding: 20px;
    }

    .faq-section div[itemprop="text"] {
        padding: 25px;
    }

    #decisionStatement {
        font-size: 1.5em;
        margin: 30px 0;
    }

    .main-nav {
        width: 100%;
        text-align: center;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease;
    }

    .main-nav.expanded {
        max-height: 300px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .site-header {
        flex-wrap: wrap;
    }
    
    .brand {
        margin-right: auto;
    }

}

@media (min-width: 769px) and (max-width: 1100px) {
    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .main-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .site-logo {
        width: 100px;
        height: 100px;
    }
    
    .site-title {
        font-size: 1.3rem;
    }
    
    .site-description {
        font-size: 0.85rem;
    }
}

/* Tablet and desktop styles */
@media (min-width: 768px) {
    body {
        padding: 20px;
        font-size: 16px;
    }

    .container {
        padding: 20px;
        max-width: 1200px;
    }

    h1 {
        font-size: 2.4em;
    }

    h2 {
        font-size: 1.8em;
    }

    .form-row {
        flex-direction: row;
        flex-wrap: wrap;
        margin: 0 -10px;
    }

    .form-group {
        flex: 1 0 21%;
        margin: 0 10px 20px;
    }

    button {
        width: auto;
        min-width: 150px;
    }

    .form-row button {
        margin: 10px auto;
    }

    #resultsBox {
        grid-template-columns: repeat(3, 1fr);
    }

    .tablink {
        padding: 15px 30px;
    }

    #graph {
        height: 500px;
    }

    .faq-section {
        padding: 40px;
    }

    .faq-section h2 {
        font-size: 2em;
    }

    .faq-section h3 {
        font-size: 1.2em;
        padding: 20px;
    }

    .faq-section div[itemprop="text"] {
        padding: 25px;
    }

    #decisionStatement {
        font-size: 1.5em;
        margin: 30px 0;
    }

    .site-logo {
        width: 120px;
        height: 120px;
    }

    /* .site-title {
        font-size: 2.2em;
    }

    .site-description {
        font-size: 1.2rem;
    } */

    .terms-section {
        margin-bottom: 3rem;
    }

    .terms-section h2 {
        font-size: 1.5em;
    }

    .footer-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }

    .footer-bottom {
        grid-column: 1 / -1;
    }

    /* Ensure all menu toggle buttons are hidden on desktop */
    .menu-toggle,
    button#menuToggle,
    [id="menuToggle"],
    button.menu-toggle {
        display: none !important;
    }
}

/* About page specific styles */
.about-section {
    margin-bottom: 2.5rem;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.about-section h2 {
    color: #2C3E50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ECF0F1;
}

.about-section ul {
    list-style-type: none;
    padding-left: 0;
}

.about-section ul li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.about-section ul li::before {
    content: "•";
    color: #3498DB;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.about-section a {
    color: #3498DB;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.about-section a:hover {
    border-bottom-color: #3498DB;
}

.main-nav {
    margin-left: auto;
    padding: 1rem 0;
    width: 100%;
}

.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.main-nav .nav-link {
    color: #2C3E50;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: block;
    text-align: center;
    line-height: 1.2;
    font-size: 0.95rem;
}

.main-nav .nav-link:hover {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498DB;
}

.main-nav .nav-link.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498DB;
    font-weight: 600;
}

/* Update the existing focus styles */
:focus-visible {
    outline: 3px solid #3498db;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Ensure proper contrast for error messages */
.error-message {
    color: #c0392b;
    background-color: #ffebee;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Unified section styles */
.section {
    margin-bottom: 2rem;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.15);
}

.section h2 {
    color: #2C3E50;
    margin:0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ECF0F1;
    font-size: 1.3em;
}

.section p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.section ul {
    list-style-type: none;
    padding-left: 0;
    margin: 1rem 0 0.5rem 0;
}

.section li {
    margin-bottom: 0.2rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.section li::before {
    content: "•";
    color: #3498DB;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Mobile styling */
@media (max-width: 768px) {
    .section {
        padding: 20px;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .section h2 {
        font-size: 1.8em;
    }

    .section p {
        line-height: 1.6;
    }

    .section ul {
        margin: 1rem 0;
        padding-left: 2rem;
    }

    .section li {
        margin-bottom: 0.5rem;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Adding styles for Knowledge Base page */

/* Knowledge Base articles listing - Index page specific styles */
.kb-articles {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.kb-article {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kb-article:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.kb-article h2 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #2c3e50;
}

.kb-article h2 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.kb-article h2 a:hover {
    color: #3498db;
}

.kb-article p {
    margin-bottom: 1rem;
    color: #34495e;
    line-height: 1.6;
}

/* Knowledge Base topics grid */
.topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 1.5rem;
    margin: 2rem 0;
}

.topic-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topic-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.topic-card h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.2rem;
}

.topic-card p {
    color: #34495e;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Navigation with dropdowns */
.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    gap: 0.75rem;
}

.nav-item {
    position: relative;
}

.nav-item.active > .nav-link {
    color: #3498db;
    font-weight: 600;
}

.nav-item.has-dropdown.open > .dropdown-toggle .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-toggle .dropdown-icon {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: #3498db;
    transition: transform 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 220px;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* Desktop dropdown hover behavior */
@media (min-width: 769px) {
    .dropdown:hover .dropdown-menu {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }
    
    .dropdown:hover .dropdown-icon {
        transform: rotate(180deg);
    }
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #34495e;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa;
    color: #3498db;
}

.dropdown-item.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: #3498db;
    font-weight: 500;
}

/* Mobile dropdown styling */
/* Navigation Menu Styles */
.site-navigation {
    margin-left: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-item.active .nav-link {
    color: #3498db;
}

.nav-link:hover {
    color: #3498db;
}

.dropdown-toggle {
    cursor: pointer;
}

/* Dropdown icon styling */
.dropdown-icon {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: #3498db;
    transition: transform 0.3s ease;
}

.dropdown-toggle[aria-expanded="true"] .dropdown-icon {
    transform: rotate(180deg);
}

/* Hover effect for dropdown icon */
.nav-link:hover .dropdown-icon {
    color: #2980b9;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    min-width: 220px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    list-style: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: #f0f5fa;
    color: #3498db;
}

/* Knowledge Base Styles */
.kb-main {
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.25rem;
    color: #7f8c8d;
    max-width: 700px;
    margin: 0 auto;
}

/* Calculators page specific styling for lead paragraph */
.calculators-page .lead {
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    text-align: center !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.kb-featured,
.kb-recent,
.kb-topics {
    margin-bottom: 4rem;
}

.kb-featured h2,
.kb-recent h2,
.kb-topics h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Featured KB articles - grid layout with images 
   Different from the main KB index listing which uses vertical layout */
.kb-articles {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

/* Card style articles for featured sections - grid layout */
.kb-featured .kb-article {
    flex: 1 1 calc(33.333% - 2rem);
    min-width: 300px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.kb-featured .kb-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.article-image {
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-image figcaption {
    font-size: 0.9rem;
    color: #7f8c8d;
    padding: 0.5rem 0;
    text-align: center;
    font-style: italic;
}

.kb-featured .kb-article:hover .article-image img {
    transform: scale(1.05);
}

.article-date {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.75rem;
}

.read-more {
    display: inline-block;
    color: #3498db;
    font-weight: 500;
    text-decoration: none;
    padding: 0.25rem 0;
    position: relative;
}

.read-more::after {
    content: '→';
    display: inline-block;
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.read-more:hover::after {
    transform: translateX(4px);
}

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content li {
    color: #555;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Author profile styles */
.author-profile {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background-color: #F9F7F2;
    border: 1px solid #ECF0F1;
    border-left: 4px solid #8e4300;
    border-radius: 8px;
}

.author-profile h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #2C3E50;
    border-bottom: none;
}

.author-profile .author p {
    margin: 0.5rem 0;
    color: #34495e;
}

.author-profile a {
    text-decoration: none;
}

.author-profile a:hover {
    text-decoration: underline;
}

.btn-outline {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-outline:hover {
    background-color: #3498db;
    color: #fff;
}

.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.topic-card {
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.topic-card i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
}

.topic-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

.topic-card p {
    color: #7f8c8d;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.topic-link {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.topic-link i {
    font-size: 0.75rem;
    margin-left: 0.5rem;
    color: #3498db;
    transition: transform 0.3s;
}

.topic-link:hover {
    color: #2980b9;
}

.topic-link:hover i {
    transform: translateX(3px);
}

/* Mobile styles for navigation and KB page */
@media (max-width: 768px) {
    /* Article listing styles (used in KB index) */
    .kb-article {
        padding: 1.25rem;
    }

    .kb-article h2 {
        font-size: 1.2rem;
    }

    /* Article grid styles (used in featured sections) - ensure this doesn't conflict */
    .kb-featured .kb-article {
        flex: 1 1 100%;
    }

    .topic-grid {
        grid-template-columns: 1fr;
    }

    .menu-open {
        overflow: hidden;
    }
}

/* Fix conflicts between nav-item and dropdown classes */
.nav-item.dropdown {
    position: relative;
}

/* Ensure dropdown menu has consistent styling */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    min-width: 220px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    list-style: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Removing empty space above H1 */
main h1 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-top: 10px;
    text-align: center;
    color: #8e4300;
    font-size: 1.8em;
}

/* Subtle reviewed meta block */
.reviewed {
    margin: 8px 0 16px;
    padding: 8px 12px;
    background-color: #fafafa;
    border-left: 3px solid #e0e0e0;
    border-radius: 4px;
}

.reviewed-text {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7885;
}

.reviewed .reviewed-date {
    font-weight: 600;
    color: #4a4a4a;
}

/* Contact page specific styles */
.contact-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 2rem 0;
}

.contact-method {
    flex: 1 1 40%;
    min-width: 280px;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.contact-method h3 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-method h3 i {
    color: #3498db;
    font-size: 1.2rem;
}

.contact-method p {
    margin: 0.5rem 0;
    color: #34495e;
    line-height: 1.5;
}

.contact-method a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.contact-method a:hover {
    color: #2980b9;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .contact-methods {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .contact-method {
        width: 100%;
    }
}

/* ====================================
   Global Link Styling
==================================== */
/* Base link styling for all content areas */
main a {
    color: #2980b9;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    font-weight: 500;
    transition: all 0.2s ease;
}

main a:hover {
    color: #3498db;
    text-decoration-thickness: 2px;
}

main a:focus-visible {
    outline: 3px solid #3498db;
    outline-offset: 2px;
    border-radius: 2px;
    text-decoration: none;
}

main a:active {
    color: #1a5276;
}

/* ====================================
   Further Reading Section Styles
==================================== */
.further-reading {
    margin-top: 3rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.further-reading h2 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #e7e7e7;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.further-reading ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.further-reading li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.further-reading li::before {
    content: "→";
    color: #3498db;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.further-reading a {
    font-weight: 600;
}

.further-reading .source-info {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.25rem;
}

/* Hide debug UI elements but keep functionality intact - using stronger specificity */
html body .debug-ui-element,
.debug-ui-element,
#dev-mode-banner,
#debug-mode-button,
div[id*="debug"],
div[class*="debug"],
form#calculatorForm + div {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
}

/* Ensure the page layout isn't affected by the hidden elements */
#calculatorForm {
    margin-top: 20px; /* Add space where the debug banner would have been */
}

/* Calculator Grid Styles */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.calculator-card {
    background: #fff;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.calculator-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.calculator-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.calculator-card .btn-primary {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.calculator-card .btn-primary:hover {
    background-color: #2980b9;
}

/* Benefits Grid Styles */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.benefit-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #3498db;
}

.benefit-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.benefit-item p {
    color: #666;
    margin: 0;
}

/* Enhanced dropdown styles for hover behavior */
@media (min-width: 769px) {
    .nav-item.dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        display: none;
        position: absolute;
        background-color: #fff;
        min-width: 200px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        z-index: 1000;
        border-radius: 4px;
        padding: 0.5rem 0;
        transition: opacity 0.3s ease, transform 0.3s ease;
        opacity: 0;
        transform: translateY(10px);
        top: 100%;
        left: 0;
    }
    
    .dropdown-menu.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }
    
    .dropdown-item {
        display: block;
        padding: 0.75rem 1rem;
        color: #2C3E50;
        text-decoration: none;
        transition: background-color 0.2s ease;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #f8f9fa;
        color: #3498DB;
    }
    
    .dropdown-item.active {
        background-color: rgba(52, 152, 219, 0.1);
        color: #3498DB;
        font-weight: 600;
    }
}

