/* Premium Heritage Blue Design System Variables - Premium Apple Spacing with Refined Blue/Slate Tones */
:root {
    --bg-primary: #F8F9FA;
    /* Clean Slate-Gray base */
    --bg-secondary: #EDF0F2;
    /* Slightly darker slate-gray for cards/sections */
    --bg-tertiary: #a1d0ef;
    /* Slightly darker slate-gray for cards/sections */
    --text-main: #1D2A3A;
    /* Deep Charcoal / Ink Blue for primary typography and headings */
    --text-muted: #5A6A7E;
    /* Muted slate-blue-gray for body copy */
    --brand-blue: #002F6C;
    /* Primary brand color (ASE Midnight Blue) */
    --brand-blue-hover: #001F47;
    --success-green: #2E7D32;
    /* High-contrast green */
    --accent-red: #C62828;
    --border-color: #DDE2E5;
    /* Slate-gray border */
    --max-width: 1000px;
    --font-display: 'Racing Sans One', sans-serif;
    --font-body: 'Overpass', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Focus Styles for ADA/WCAG Compliance */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--brand-blue);
    outline-offset: 2px;
}

footer a:focus {
    outline: 3px solid #FFFFFF !important;
}

/* Skip Link CSS for Keyboard Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    background-color: var(--brand-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    z-index: 9999;
    border-radius: 0 0 10px 10px;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--accent-red);
    outline-offset: 2px;
}

/* Typography Layout */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

/* Container Layouts */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation Bar */
header {
    background-color: rgba(237, 240, 242, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--brand-blue);
    text-decoration: none;
    transition: opacity 0.2s ease;
    max-width: 60%;
    line-height: 1.2;
}

.logo-line {
    display: inline;
}

.logo-text:hover {
    opacity: 0.8;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--brand-blue);
    color: white;
    text-decoration: none;
    padding: 0.7rem 1.35rem;
    border-radius: 980px;
    /* Pill style */
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cta-icon {
    display: none;
}

.cta-icon img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

.nav-cta:hover {
    background-color: var(--brand-blue-hover);
}

.nav-cta:active {
    transform: scale(0.96);
}

/* Hero Section */
.hero-section {
    padding: 6.5rem 0;
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at top right, rgba(0, 47, 108, 0.05) 0%, transparent 60%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 0.9375fr 1.0625fr;
    gap: 4rem;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(0, 47, 108, 0.05);
    color: var(--brand-blue);
    padding: 0.45rem 1.1rem;
    border-radius: 980px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success-green);
    border-radius: 50%;
    display: inline-block;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.hero-ctas {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-primary {
    background-color: var(--brand-blue);
    color: white;
    padding: 0.95rem 1.9rem;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.btn-primary:hover {
    background-color: var(--brand-blue-hover);
}

.btn-primary:active {
    transform: scale(0.96);
}

.btn-secondary {
    background-color: transparent;
    color: var(--brand-blue);
    padding: 0.95rem 1.9rem;
    border-radius: 980px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    border: 1px solid var(--brand-blue);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.btn-wrap {
    white-space: normal !important;
}

.btn-secondary:hover {
    background-color: rgba(0, 47, 108, 0.04);
}

.btn-secondary:active {
    transform: scale(0.96);
}

.hero-placeholder-img {
    background-color: #FFFFFF;
    border-radius: 9px;
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-weight: 500;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 47, 108, 0.01);
}

/* Reviews Section */
.reviews-section {
    background-color: var(--bg-secondary);
    padding: 6.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 3.5rem auto;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.review-card {
    background-color: #FFFFFF;
    padding: 2.25rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0, 47, 108, 0.01);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 47, 108, 0.04);
}

.stars {
    color: #D69E2E;
    /* Warm Gold */
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.review-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.reviews-footer {
    text-align: center;
}

.reviews-footer a {
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.reviews-footer a:hover {
    opacity: 0.8;
}

/* Experience Walkthrough Section */
.experience-section {
    padding: 6.5rem 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.step-card {
    position: relative;
}

.step-number {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    color: rgba(0, 47, 108, 0.12);
    /* Soft ASE Blue */
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* Services Grid Section */
.services-section {
    background-color: var(--bg-secondary);
    padding: 6.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.service-card {
    background-color: #FFFFFF;
    padding: 2.5rem;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    box-shadow: 0 6px 18px rgba(0, 47, 108, 0.01);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 47, 108, 0.04);
}

.service-benefit {
    display: inline-block;
    background-color: rgba(0, 47, 108, 0.08);
    color: var(--brand-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 980px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
}

/* Second Opinion Form Section */
.form-section {
    padding: 6.5rem 0;
}

.form-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 4rem;
    align-items: start;
}

.form-card {
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 47, 108, 0.02);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-body);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    transition: all 0.25s ease;
}

.form-control:focus {
    background-color: #FFFFFF;
    border-color: var(--brand-blue);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* FAQ Section */
.faq-section {
    padding: 6.5rem 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

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

.faq-question {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.faq-answer {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Footer System */
footer {
    background-color: var(--brand-blue);
    /* ASE Midnight Blue background */
    color: #FFFFFF;
    padding: 5.5rem 0;
}

footer p {
    color: #C5D6EC;
    /* Light Blue-Gray with high contrast (above 7:1) for WCAG compliance */
}

footer h2 {
    color: white;
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 4rem;
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #1A447C;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    color: #C5D6EC;
}

/* Mobile Sticky Call Bar Base */
.mobile-sticky-bar {
    display: none;
}

/* Responsive Layouts (Tablet and Mobile) */
@media (max-width: 1024px) {

    /* General Elements */
    h1 {
        font-size: 2.5rem;
    }

    body {
        padding-bottom: 76px;
    }

    .logo-line {
        display: block;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    /* Navbar CTA to Icon */
    .cta-text {
        display: none;
    }

    .cta-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-cta {
        width: 25%;
        max-width: 120px;
        min-width: 60px;
        padding: 0.65rem 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 980px;
    }

    /* Hero Grid Stacking */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* Reviews/Testimonial Grid (2x2 with 3rd item spanning 2 columns) */
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .reviews-grid>.review-card:last-child {
        grid-column: span 2;
    }

    /* Steps Grid (2x2 with 3rd item spanning 2 columns) */
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .steps-grid>.step-card:last-child {
        grid-column: span 2;
    }

    /* Services Grid (2x2) */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Form Section (Compact side-by-side) */
    .form-layout {
        grid-template-columns: 1fr 1.1fr;
        gap: 2.5rem;
    }

    .form-card {
        padding: 2rem;
    }

    /* FAQ List Viewport Width */
    .faq-list {
        max-width: 100%;
        width: 100%;
    }

    /* Footer Grid (Readable 2-col) */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .footer-grid>div:first-child {
        grid-column: span 2;
    }

    /* Sticky Mobile Footbar display */
    .mobile-sticky-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: var(--brand-blue);
        z-index: 999;
        padding: 1.1rem;
        box-shadow: 0 -4px 12px rgba(0, 47, 108, 0.08);
    }

    .mobile-sticky-bar a {
        display: block;
        color: white;
        text-align: center;
        text-decoration: none;
        font-weight: 700;
        font-size: 1.15rem;
    }
}

/* Mobile Layouts (Up to 600px) */
@media (max-width: 600px) {

    /* General Elements */
    h1 {
        font-size: 2.15rem;
    }

    /* Hero Section */
    .hero-grid {
        gap: 2rem;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary,
    .btn-secondary {
        text-align: center;
    }

    /* Reviews/Testimonial Grid Stacking */
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .reviews-grid>.review-card:last-child {
        grid-column: auto;
    }

    /* Steps Grid Stacking */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .steps-grid>.step-card:last-child {
        grid-column: auto;
    }

    /* Services Grid Stacking */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Form Layout Stacking */
    .form-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-card {
        padding: 1.5rem;
    }

    /* Footer Stacking */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-grid>div:first-child {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
}