/* === 1. GLOBAL STYLES & VARIABLES === */
:root {
    --primary-color: #000000;
    --secondary-color: #f1f1f1;
    --accent-color: #333;
    --text-color: #333;
    --background-color: #ffffff;
    --border-color: #ccc;
    
    --font-primary: 'Montserrat', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    --spacing-unit: 1rem; /* Equivalent to 16px */
    --border-radius: 2rem; /* For the rounded look */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: calc(var(--spacing-unit) * 3) 0;
}

/* Fix sticky header overlap for intra page navigation */
section[id] {
    scroll-margin-top: 80px;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    margin-bottom: var(--spacing-unit);
    
}

h1 { font-size: 2.5rem; text-align: center; }
h2 { font-size: 2rem; }
p { margin-bottom: var(--spacing-unit); }
a { color: var(--text-color); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
.full-width-image { border-radius: var(--border-radius); margin-top: calc(var(--spacing-unit) * 2); }

/* === 2. UTILITY & COMPONENT STYLES === */
.bg-secondary {
    background-color: var(--secondary-color);
}

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.button-primary {
    background-color: var(--primary-color);
    color: var(--background-color);
    border-color: var(--primary-color);
}
.button-primary:hover { background-color: #333; }
.button-secondary { background-color: transparent; color: var(--primary-color); border-color: var(--border-color); }
.button-secondary:hover { background-color: var(--secondary-color); }
.button-outline { border: 2px solid var(--border-color); }
.button-outline:hover { background-color: var(--secondary-color); }
.material-symbols-outlined { vertical-align: middle; }
.languages h4 {
    font-size: 0.9rem; /* 14px */
    font-weight: 600;
    margin-bottom: 0.25rem; /* 4px */
    color: #555;
}

.languages p {
    margin-bottom: 0;
}

.panel {
    background-color: var(--secondary-color);
    padding: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    text-align: center;
}

.card {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}
.card-content { padding: calc(var(--spacing-unit) * 2.5); }


/* === 3. HEADER & NAVIGATION === */
.site-header {
    padding: var(--spacing-unit) 0;
    border-bottom: 1px solid var(--border-color);
    /* ADD these properties for the sticky effect */
    position: sticky;
    top: 0;
    z-index: 999; /* Ensures it stays on top of other content */
    background-color: rgba(255, 255, 255, 0.9); /* White with slight transparency */
    backdrop-filter: blur(10px); /* Blurs the content scrolling underneath */
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    /* Ensure the logo doesn't shrink */
    flex-shrink: 0;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* This creates the even spacing */
    width: 28px;  /* SLIGHTLY SMALLER */
    height: 22px; /* SLIGHTLY SMALLER */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
}

.line {
    display: block;
    width: 100%;
    height: 2px; /* THINNER LINES */
    background-color: var(--primary-color);
    border-radius: 2px; /* SHARPER CORNERS */
    transition: all 0.3s ease-in-out;
}

.line3 {
    width: 50%;
}

/* Animation rules for when the menu is active */
.nav-toggle.is-active .line1 {
    transform: translateY(10px) rotate(45deg);
}

.nav-toggle.is-active .line2 {
    opacity: 0;
}

.nav-toggle.is-active .line3 {
	width: 100%;
    transform: translateY(-10px) rotate(-45deg);
}

/* Hide the new desktop link containers on mobile by default */
.nav-links-center,
.nav-links-right {
    display: none;
}

.nav-links-mobile {
    display: none; /* Hidden by default */
    background-color: var(--secondary-color);
    margin-top: var(--spacing-unit);
    border-radius: 1rem;
    padding: var(--spacing-unit);
}
.nav-links-mobile a {
    display: block;
    padding: 0.75rem;
    text-align: center;
    border-radius: 0.5rem;
}
.nav-links-mobile a:hover {
    background-color: #ddd;
}
/* This class is toggled by the JavaScript to show the menu */
.nav-links-mobile.is-active {
    display: block;
}


/* === 4. PAGE SECTIONS === */
.landing, .services-section { 
	text-align: center;
	display: flex;
    flex-direction: column;
    align-items: center;
}
.subtitle { max-width: 700px; margin: 0 auto calc(var(--spacing-unit) * 2) auto; }
.feature-list { list-style: none; }
.feature-list li a { display: block; padding: 0.5rem 0; }

/* Grid Layouts */
.grid-2-col, .grid-3-col, .footer-grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 2);
}
/* All grids are single-column on mobile by default */
.grid-2-col, .grid-3-col, .footer-grid { grid-template-columns: 1fr; }

/* --- Interactive Guide Components --- */

/* General Component Styling */
.guide-section {
    padding: calc(var(--spacing-unit) * 3);
    border-radius: var(--border-radius);
    margin-top: calc(var(--spacing-unit) * 3);
}

.guide-section h2, .guide-section h3 {
    text-align: center;
}

.guide-section h3 {
    margin-top: calc(var(--spacing-unit) * 2);
}

.text-red-700 {
    color: #B91C1C; /* A strong, accessible red */
}

/* Eligibility Checker & Fee Calculator */
.form-grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 2);
    align-items: flex-start;
    grid-template-columns: 1fr; /* This makes it 1-column by default for mobile */
}

.form-grid label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.form-grid .custom-select-wrapper {
    position: relative;
}

.form-grid .custom-select-wrapper::after {
    content: 'expand_more';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.5rem;
    transition: transform 0.3s ease-out;
}

.form-grid select, .form-grid input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease-in-out;
}

.form-grid select:focus, .form-grid input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.radio-group label {
    margin-bottom: 0;
    font-weight: 400;
}
.radio-group input[type="radio"] {
    width: auto;
    accent-color: var(--primary-color);
}

#eligibility-checker > div {
    margin-top: 1.5rem; /* Adds 24px of space */
}

#eligibility-checker > div:first-child {
    margin-top: 0; /* Ensures no extra space is added above the first item */
}

.eligibility-results {
    background-color: var(--background-color);
    padding: var(--spacing-unit);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    min-height: 250px;
}

.eligibility-results ul {
    list-style-position: inside;
    padding-left: 0.5rem;
}

.eligibility-results li {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

#fee-calculator input[type="number"] {
    width: 80px; /* Sets a more appropriate fixed width */
}

.fee-total {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
}
.fee-total .total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin-left: 0.5rem;
}

.chart-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    height: 250px; /* Default height for mobile */
}


/* Tabbed Journey Section */
.tabs-container {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: calc(var(--spacing-unit) * 2);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    transition: all 0.2s ease-in-out;
}

.tab-button.is-active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.process-step {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-left: 3.5rem; /* Space for the number and line */
    margin-bottom: 2rem;
}

.process-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    width: 2px;
    height: calc(100%);
    background-color: var(--border-color);
}

.step-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 42px;
    height: 42px;
    background-color: var(--primary-color);
    color: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.step-content h4 {
    font-size: 1.2rem;
}

/* Accordion Styling */
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-color);
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.accordion-toggle .material-symbols-outlined {
    transition: transform 0.3s ease-out;
}

.accordion-toggle.is-active .material-symbols-outlined {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content-inner {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.accordion-content-inner h4 {
    font-style: italic;
}

.accordion-content-inner a {
    color: var(--primary-color); /* Black */
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease-in-out; /* Add a smooth transition */
}

.accordion-content-inner a:hover {
    color: #0000EE; /* Classic hyperlink blue */
}

.accordion-container, .process-content {
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-color);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

/* Fix for list styles inside accordions */
.accordion-content-inner ul {
    list-style-position: inside;
    margin-top: 1rem;
}

.accordion-content-inner li {
    padding-top: 0.75rem;    /* Adds 12px of space above */
    padding-bottom: 0.75rem; /* Adds 12px of space below */
}

/* Ebook CTA Section */
.ebook-cta-section .grid-2-col {
    align-items: center;
}

.ebook-cta-section {
    padding: calc(var(--spacing-unit) * 4) 0;
}

.ebook-cta-text h2 {
    text-align: left;
}

.ebook-cta-image img {
    max-width: 300px;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Testimonial Slider */
.slider { text-align: center; max-width: 700px; margin: auto; }
.mySlides { display: none; } /* JS will handle showing the active one */
.slider-nav { margin-bottom: 1rem; }
.slider-nav button { background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.more-reviews-container {
    display: flex;
    justify-content: center;
    margin-top: calc(var(--spacing-unit) * 2);
}

/* Pricing Section */
.pricing-container {
    max-width: 900px;
    margin: 0 auto; /* This centers the container */
}

.pricing-grid {
    align-items: stretch;
    margin-top: calc(var(--spacing-unit) * 3);
}

.pricing-card {
    display: flex;
    flex-direction: column;
    position: relative;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease-in-out;
    overflow: visible;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.07);
    
}

.pricing-card .card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.pricing-card h3 {
    font-size: 1.5rem;
}

.pricing-rate {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.pricing-description {
    min-height: 100px;
}

.features-list {
    list-style: none;
    margin: var(--spacing-unit) 0;
    flex-grow: 1;
    text-align: left;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.features-list .material-symbols-outlined {
    color: var(--primary-color);
}

.pricing-card .button {
    width: 100%;
    justify-content: center;
}

.pricing-card.popular {
    border-color: var(--primary-color);
    border-width: 3px;
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 1;
}

.financing-callout {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: #e9ecef;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: var(--spacing-unit) auto;
    flex-grow: 1;
    justify-content: center;
}

.financing-callout .material-symbols-outlined {
    font-size: 1.5rem;
}

/* --- Military Support Section --- */
.discount-note {
    text-align: center;
    font-size: 0.9rem;
    color: #555;
    margin-top: calc(var(--spacing-unit) * 2.5);
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.discount-note p {
    margin-bottom: 0;
}

.discount-note a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.discount-note .material-symbols-outlined {
    font-size: 1.2rem;
    vertical-align: sub;
    margin-right: 0.25rem;
    color: var(--primary-color);
}

.modal-thank-you {
    text-align: center;
    margin-top: calc(var(--spacing-unit) * 2); /* Adds 32px of space above */
    font-weight: 600;
    font-size: 1.1rem;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 2);
    margin-top: calc(var(--spacing-unit) * 3);
}
.team-member {
    display: flex;
    flex-direction: column;
}
.team-member img { border-radius: var(--border-radius) var(--border-radius) 0 0; }

.member-meta {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: flex-start;  /* Align items to the left */
    gap: 2rem;                /* Increase space between the items */
    margin-top: 1rem;
}

/* Contact */
.contact-buttons { display: flex; flex-direction: column; gap: 1rem; align-items: center; margin-top: 2rem; }

/* Locations */
.locations {
    margin-top: calc(var(--spacing-unit) * 3);
}

/* Pre-Footer */
.pre-footer {
    background-color: var(--primary-color);
    color: #e2e6ea;
    padding: calc(var(--spacing-unit) * 3) 0;
}

.pre-footer h4 {
    color: var(--background-color);
    margin-bottom: 0.5rem;
}

.pre-footer p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.pre-footer a {
    color: inherit; /* Inherits the light color from the parent text */
    text-decoration: none;
}

.pre-footer a:hover {
    color: var(--background-color); /* Becomes pure white on hover for a nice effect */
}

/* Main Footer */
.site-footer {
    background-color: var(--secondary-color);
    padding: calc(var(--spacing-unit) * 4) 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    gap: calc(var(--spacing-unit) * 3);
    grid-template-columns: 1fr; /* Mobile first */
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 1rem;
}

.site-footer h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.site-footer a {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
}

.site-footer a:hover {
    color: var(--primary-color);
}

.toll-free-number {
    margin-top: 0.5rem;
}

.toll-free-number a {
    display: inline; /* Prevents it from taking a full line */
    margin-bottom: 0;
    text-decoration: none;
}


/* Sub-Footer */
.sub-footer {
    background-color: #e9ecef;
    padding: calc(var(--spacing-unit) * 1.5) 0;
    text-align: center;
    font-size: 0.8rem;
}

.sub-footer .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sub-footer p {
    margin: 0;
}

.sub-footer a {
    color: #555;
    margin: 0 0.5rem;
}


/* === 5. MEDIA QUERIES (TABLET & DESKTOP) === */
@media (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.5rem; }

    .grid-2-col { grid-template-columns: 1fr 1fr; }
    .grid-3-col { grid-template-columns: repeat(3, 1fr); }
    
    .about-section .grid-2-col { align-items: center; }
    
    .guide-section .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .chart-container {
        height: 300px; /* Taller height on larger screens */
    }

    .team-member {
        flex-direction: row;
    }
    
    .team-member .card-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .team-member img {
        width: 33%;
        border-radius: var(--border-radius) 0 0 var(--border-radius);
    }
    .contact-buttons { flex-direction: row; justify-content: center; }
    
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
    
    .modal-overlay {
        align-items: center; /* Re-center the modal on larger screens */
    }
}

@media (min-width: 1024px) {
    .nav-toggle { display: none; }

    /* Show and style the desktop navigation groups */
    .nav-links-center {
        display: flex;
        justify-content: center;
        gap: 2rem;
    }
    .nav-links-right {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }
}


/* 6. === MODAL STYLES === */

/* --- Base Modal Styles (for all pop-ups) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* CHANGE: Align to top for scrolling */
    z-index: 1000;
    padding: 2rem 0; /* ADD: Gives space at top and bottom */
    overflow-y: auto; /* ADD: Allows the overlay itself to scroll */
}

.modal-content, .modal-content-small, .modal-content-large { /* ADDED .modal-content-large here */
    background-color: var(--background-color);
    border-radius: 10px;
    position: relative;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}


.close-modal {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 1001;
}


/* --- Specific Modal Styles --- */

/* For the small Hourly Services modal */
.modal-content-small {
    padding: calc(var(--spacing-unit) * 3);
    max-width: 600px;
}

.modal-content-small h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.modal-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hourly-services-list {
    list-style: none;
    padding: 0;
}

.hourly-services-list li {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hourly-services-list li:first-child {
    padding-top: 0;
}

.hourly-services-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* For the link that opens the hourly modal */
.hourly-services-link {
    margin-top: 1rem;
    text-align: center;
}

.hourly-services-link button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
}

/* For the larger Financing Options modal */
.modal-content-large {
    background-color: var(--background-color);
    border-radius: 10px;
    position: relative;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: calc(var(--spacing-unit) * 3);
}

.modal-content-large h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.payment-layout {
    display: grid;
    grid-template-columns: 1fr; /* Mobile first */
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 900px) {
    .payment-layout {
        grid-template-columns: 2fr 1fr; /* Two columns on desktop */
    }
}

.total-fee {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.total-fee span {
    font-size: 1.1rem;
    font-weight: 600;
}
.total-fee strong {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0 0.5rem;
}
.total-fee small {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

.phase {
    position: relative;
    padding-left: 45px;
    margin-bottom: 1.5rem;
}

.phase-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.phase-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.phase h4 {
    font-size: 1.1rem;
    margin: 0;
}

.phase p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-box {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.option-box h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.option-box p {
    font-size: 0.9rem;
    margin: 0;
}
