/* How it works page, seventh section (template-parts/hiw/faq.php, docs/sections/hiw/hiw-platform-preview-faq.png, lower
   part). Fonts and --amh-* colours: home-hero.css (body .amerlink-genesis-home). */

.hiw-faq {
    position: relative;
    overflow: hidden;
    padding: clamp(56px, 5vw, 96px) 0;
    background: linear-gradient(180deg, #eef5fd 0%, #e6effa 100%);
    color: #33446a;
    isolation: isolate;
}

/* The campus on the right, fading into the section behind the questions. */
.hiw-faq-media {
    position: absolute;
    z-index: -1;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
}

.hiw-faq-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 40% 30%;
    opacity: .9;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 35%, #000 70%), linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, #000 32%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .55) 35%, #000 70%), linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, #000 32%);
    mask-composite: intersect;
}

.hiw-faq-inner {
    width: min(100% - 64px, 1510px);
    margin-inline: auto;
}

.hiw-faq-header {
    display: flex;
    max-width: 1240px;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: clamp(24px, 2.2vw, 40px);
}

.hiw-faq-heading {
    min-width: 0;
}

.hiw-faq-eyebrow {
    margin: 0 0 clamp(8px, .7vw, 12px);
    color: var(--amh-pink);
    font-size: clamp(13px, 1vw, 17px);
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hiw-faq-title {
    margin: 0;
    padding: 0;
    color: var(--amh-navy);
    font-family: inherit;
    font-size: clamp(30px, 2.6vw, 50px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.hiw-faq-description {
    margin: clamp(10px, .9vw, 16px) 0 0;
    font-size: clamp(16px, 1.15vw, 21px);
    line-height: 1.5;
}

.hiw-faq-button {
    display: inline-flex;
    min-height: 57px;
    flex: 0 0 auto;
    align-items: center;
    gap: 14px;
    padding: 12px 28px;
    border: 2px solid var(--amh-navy);
    border-radius: 8px;
    background: rgba(255, 255, 255, .7);
    color: var(--amh-navy);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.hiw-faq-button span {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: .7;
}

.hiw-faq-button:hover,
.hiw-faq-button:focus-visible {
    background: var(--amh-navy);
    color: #fff;
}

.hiw-faq-button:focus-visible {
    outline: 3px solid var(--amh-blue);
    outline-offset: 2px;
}

/* Two independent columns: an open answer pushes down only its own column. */
.hiw-faq-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: clamp(14px, 1.4vw, 26px);
    max-width: 1440px;
}

.hiw-faq-column {
    display: grid;
    min-width: 0;
    gap: clamp(10px, .8vw, 14px);
}

.hiw-faq-item {
    border: 1px solid rgba(225, 233, 244, .9);
    border-radius: 10px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 8px 24px rgba(1, 33, 106, .07);
}

.hiw-faq-question {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 16px;
    padding: 12px 22px;
    border-radius: 10px;
    color: #1d2d50;
    cursor: pointer;
    font-size: clamp(16px, 1.05vw, 19px);
    font-weight: 500;
    line-height: 1.35;
    list-style: none;
}

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

.hiw-faq-question:focus-visible {
    outline: 3px solid var(--amh-blue);
    outline-offset: 2px;
}

.hiw-faq-text {
    min-width: 0;
    flex: 1 1 auto;
}

.hiw-faq-chevron {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    margin: 0 4px 0 2px;
    border-top: 2.5px solid var(--amh-pink);
    border-right: 2.5px solid var(--amh-pink);
    transform: rotate(45deg);
    transition: transform .2s ease;
}

.hiw-faq-item[open] .hiw-faq-chevron {
    transform: rotate(135deg);
}

/* "+" closed, "−" open. */
.hiw-faq-toggle {
    position: relative;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.hiw-faq-toggle::before,
.hiw-faq-toggle::after {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    margin-top: -1px;
    border-radius: 2px;
    background: var(--amh-navy);
    content: '';
    transition: transform .2s ease;
}

.hiw-faq-toggle::after {
    transform: rotate(90deg);
}

.hiw-faq-item[open] .hiw-faq-toggle::after {
    transform: rotate(0);
}

.hiw-faq-question:hover .hiw-faq-text {
    color: var(--amh-navy);
}

.hiw-faq-answer {
    padding: 0 22px 18px 52px;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.55;
}

.hiw-faq-answer > :first-child {
    margin-top: 0;
}

.hiw-faq-answer > :last-child {
    margin-bottom: 0;
}

.hiw-faq-answer a {
    color: var(--amh-pink);
}

/* Tablets and phones: one column, the button under the heading, the photo faint behind the heading. */
@media (max-width: 900px) {
    .hiw-faq-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .hiw-faq-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .hiw-faq-media {
        bottom: auto;
        width: 70%;
        height: 420px;
    }

    .hiw-faq-photo {
        opacity: .45;
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%), linear-gradient(180deg, #000 40%, transparent 100%);
        -webkit-mask-composite: source-in;
        mask-image: linear-gradient(90deg, transparent 0%, #000 60%), linear-gradient(180deg, #000 40%, transparent 100%);
        mask-composite: intersect;
    }
}

@media (max-width: 600px) {
    .hiw-faq-inner {
        width: min(100% - 36px, 660px);
    }

    .hiw-faq-question {
        gap: 12px;
        padding: 12px 16px;
    }

    .hiw-faq-answer {
        padding: 0 16px 16px 42px;
    }

    .hiw-faq-button {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hiw-faq-button,
    .hiw-faq-chevron,
    .hiw-faq-toggle::before,
    .hiw-faq-toggle::after {
        transition: none;
    }
}
