/* ==========================================================================
   Homepage & Modular Components Styles
   ========================================================================== */

/* --- Utilities --- */
.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--on-surface);
}

.main-content {
    padding-top: 56px;
    /* Offset for fixed header */
}

/* --- Hero Section --- */
.hero-section {
    /* Replace the radial-gradient with your new image */
    background-image: url('/images/hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Optional: Add a subtle white overlay if the image makes the text hard to read */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.4);
    /* Adjust 0.4 opacity as needed */
    z-index: 1;
}

.hero-container {
    max-width: 800px;
    position: relative;
    z-index: 2;
    /* Keeps text above the overlay */
}

.headline-hero {
    white-space: pre-line;
    margin-bottom: 24px;
}

.hero-subtitle {
    margin-bottom: 40px;
    padding: 0 24px;
}

.hero-actions {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: center;
}

/* --- Features Section --- */
.features-section {
    background-color: var(--surface-container-lowest);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 24px;
}

.feature-item .headline-sm {
    margin-bottom: 12px;
}

/* --- Services Section --- */
.services-section {
    background-color: var(--surface-container-low);
}

.services-section .headline-lg {
    margin-bottom: 48px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--surface-container-lowest);
    border-radius: var(--rounded-xl);
    padding: 48px 32px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
}

.service-card .headline-sm {
    margin-bottom: 12px;
}

/* --- Process Section (Modular - BEM) --- */
.process {
    background-color: #262729;
    /* Dark Charcoal matching diagnostic banner */
    padding: 80px 0;
}

.process__main-title {
    margin-bottom: 64px;
    color: var(--apple-white);
}

.process__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-gutter);
    position: relative;
}

.process__line {
    position: absolute;
    /* Centers line perfectly behind the 48px circle (48/2 = 24. 24 - 1px half-height = 23px) */
    top: 23px;
    /* Starts at the center of the first circle */
    left: 24px;
    /* Spans exactly to the center of the 4th circle, accounting for the grid gaps */
    width: calc(75% + calc(var(--spacing-gutter) * 0.75));
    height: 2px;
    background-color: #414753;
    z-index: 1;
}

.process__step {
    position: relative;
    z-index: 2;
    /* Keeps the circle and background above the connecting line */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-right: 16px;
}

.process__number {
    width: 48px;
    height: 48px;
    background-color: #262729;
    border: 2px solid #414753;
    border-radius: var(--rounded-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-container);
    /* Updated to primary blue */
    margin-bottom: 24px;
}

.process__step-title {
    margin-bottom: 16px;
    color: var(--apple-white);
}

.process__step-desc {
    color: #a1a1a6;
    line-height: 1.6;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .process__grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .process__line {
        display: none;
        /* Safely hides the horizontal line when stacked vertically */
    }

    .process__step {
        align-items: center;
        text-align: center;
        padding-right: 0;
    }
}

/* --- FAQ Section (Modular) --- */
.faq-section {
    background-color: var(--surface-container-low);
}

.faq-container {
    max-width: 800px;
}

.faq-section .headline-lg {
    margin-bottom: 48px;
}

.faq-list {
    border-top: 1px solid var(--surface-container-high);
    margin-bottom: 48px;
}

.faq-item {
    border-bottom: 1px solid var(--surface-container-high);
}

.faq-question {
    padding: 24px 0;
    cursor: pointer;
    list-style: none;
    position: relative;
    color: var(--on-surface);
}

/* Custom Accordion Chevron */
.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--on-surface-variant);
    border-bottom: 2px solid var(--on-surface-variant);
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
    transform: translateY(-50%) rotate(-135deg);
}

.faq-answer {
    padding-bottom: 24px;
    padding-right: 48px;
    /* Leave room on right to avoid text overlapping chevron area */
}

.faq-footer p {
    margin-bottom: 8px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .hero-actions {
        flex-direction: column;
    }

    .process-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .process-line {
        display: none;
        /* Hide horizontal line on mobile layout */
    }

    .process-step {
        align-items: center;
        text-align: center;
        padding-right: 0;
    }
}