/* =========================================================
   FAYADH WEBSITE — PROVIDERS PAGE (providers.html)
   Page hero, benefit cards, joining steps and FAQ.
   The Download section reuses css/download.css.
========================================================= */


/* =========================================================
   1. PAGE HERO
   Text + buttons on one side, the provider image on the
   other (mirrored in Arabic so its green shapes face the text).
========================================================= */

.page-hero {
    padding-top: 64px;

    overflow: hidden;

    background:
        radial-gradient(circle at 10% 0%, var(--secondary-tint), transparent 45%),
        var(--background-cool);
}

.page-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;

    gap: 40px;
}

.page-hero-content {
    padding-bottom: 64px;
}

.page-hero-title {
    margin-top: 18px;

    color: var(--heading);

    font-size: clamp(34px, 4.6vw, 54px);
    font-weight: 800;
    line-height: 1.12;

    letter-spacing: -0.02em;
}

html[dir="rtl"] .page-hero-title {
    line-height: 1.35;
    letter-spacing: 0;
}

.page-hero-text {
    max-width: 520px;

    margin-top: 18px;

    color: var(--text);

    font-size: 17px;
    line-height: 1.7;
}

.page-hero-actions {
    margin-top: 32px;

    display: flex;
    flex-wrap: wrap;

    gap: 12px;
}

.page-hero-media {
    align-self: end;
}

.page-hero-media img {
    width: 100%;
    height: auto;
}

html[dir="rtl"] .page-hero-media img {
    transform: scaleX(-1);
}


/* =========================================================
   2. BENEFIT CARDS
========================================================= */

.benefits-section {
    background: var(--white);
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 20px;

    list-style: none;
}

.benefit-card {
    padding: 28px 24px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 18px;

    transition: var(--transition);
}

.benefit-card:hover {
    border-color: var(--primary-light);

    box-shadow: var(--shadow-md);
}

.benefit-card-icon {
    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary-light);
    color: var(--primary);

    border-radius: 14px;
}

.benefit-card-icon svg {
    width: 26px;
    height: 26px;
}

.benefit-card-title {
    margin-top: 20px;

    color: var(--heading);

    font-size: 17px;
    font-weight: 800;
    line-height: 1.3;
}

.benefit-card-text {
    margin-top: 8px;

    color: var(--text);

    font-size: 14px;
    line-height: 1.65;
}


/* =========================================================
   3. HOW JOINING WORKS
   Five numbered steps in a row, joined by a line; a vertical
   timeline on smaller screens.
========================================================= */

.join-section {
    background: var(--background);
}

.join-steps {
    position: relative;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));

    gap: 24px;

    list-style: none;
}

/* The line behind the numbers (from the first to the last). */

.join-steps::before {
    content: "";

    position: absolute;

    top: 26px;
    inset-inline: 10%;

    height: 2px;

    background: repeating-linear-gradient(
        to right,
        var(--text-light) 0 8px,
        transparent 8px 16px
    );
}

.join-step {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

.join-step-number {
    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    background: var(--primary);
    color: var(--white);

    border: 5px solid var(--background);
    border-radius: 50%;

    box-shadow: 0 0 0 1px var(--primary-light);

    font-family: var(--font-en);
    font-size: 18px;
    font-weight: 800;
}

.join-step-title {
    margin-top: 18px;

    color: var(--heading);

    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.join-step-text {
    margin-top: 8px;

    color: var(--text);

    font-size: 14px;
    line-height: 1.6;
}


/* =========================================================
   4. FAQ
   Native <details>/<summary>: keyboard and screen-reader
   friendly, no JavaScript.
========================================================= */

.faq-section {
    background: var(--white);
}

.faq-list {
    max-width: 820px;

    margin-inline: auto;

    display: grid;

    gap: 12px;
}

.faq-item {
    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 14px;

    transition: var(--transition);
}

.faq-item[open] {
    border-color: var(--primary-light);

    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 20px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    color: var(--heading);

    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;

    list-style: none;

    cursor: pointer;
}

/* Hide the browser's default triangle. */

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;

    border-radius: 14px;
}

/* Plus that turns into a minus when open. */

.faq-icon {
    position: relative;

    width: 28px;
    height: 28px;

    flex-shrink: 0;

    background: var(--primary-light);

    border-radius: 50%;
}

.faq-icon::before,
.faq-icon::after {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 12px;
    height: 2px;

    background: var(--primary);

    border-radius: 2px;

    transform: translate(-50%, -50%);

    transition: var(--transition);
}

.faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item[open] .faq-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.faq-answer {
    padding: 0 22px 20px;

    color: var(--text);

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   5. RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .benefit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Steps become a vertical timeline. */

    .join-steps {
        max-width: 560px;

        margin-inline: auto;

        grid-template-columns: 1fr;

        gap: 28px;
    }

    .join-steps::before {
        top: 27px;
        bottom: 27px;
        inset-inline: auto;
        inset-inline-start: 26px;

        width: 2px;
        height: auto;

        background: repeating-linear-gradient(
            to bottom,
            var(--text-light) 0 8px,
            transparent 8px 16px
        );
    }

    .join-step {
        flex-direction: row;
        align-items: flex-start;

        gap: 18px;

        text-align: start;
    }

    .join-step-title {
        margin-top: 12px;
    }

}

@media (max-width: 900px) {

    .page-hero {
        padding-top: 48px;
    }

    .page-hero-layout {
        grid-template-columns: 1fr;

        gap: 0;

        text-align: center;
    }

    .page-hero-content {
        padding-bottom: 36px;
    }

    .page-hero-text {
        margin-inline: auto;
    }

    .page-hero-actions {
        justify-content: center;
    }

    /* The photo's straight edge meets the screen edge: cancel
       the container's 24px side margin on the inline-end side. */

    .page-hero-media {
        width: 100%;
        max-width: 520px;

        margin-inline-start: auto;
        margin-inline-end: -24px;
    }

}

@media (max-width: 600px) {

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

    .benefit-card {
        padding: 22px 20px;
    }

    .page-hero-actions .button {
        width: 100%;

        white-space: normal;
    }

    .faq-question {
        padding: 18px;

        font-size: 15px;
    }

    .faq-answer {
        padding: 0 18px 18px;
    }

}
