/* Home "Resources and FAQ" section (template-parts/home/resources-faq.php). Fonts and --amh-* colours: home-hero.css. */

.amr-section {
    --amr-navy: #01216a;
    --amr-blue: #0381f8;
    --amr-link: #0a6ff0;
    --amr-icon: #1677ee;
    --amr-text: #3a4f72;
    --amr-line: #dce9f8;
    --amr-gap: clamp(40px, 5.2vw, 84px);
    position: relative;
    overflow: hidden;
    padding: clamp(56px, 4.4vw, 84px) 0 clamp(64px, 5vw, 96px);
    background:
        radial-gradient(70% 90% at 108% 8%, rgba(206, 228, 251, .9), rgba(206, 228, 251, 0) 60%),
        radial-gradient(45% 60% at -4% 30%, rgba(214, 232, 252, .8), rgba(214, 232, 252, 0) 70%),
        linear-gradient(180deg, #f5f9fe 0%, #eef5fd 100%);
    color: var(--amr-text);
}

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

/* Section heading, centred. */
.amr-header {
    text-align: center;
}

.amr-eyebrow,
.amr-column-eyebrow {
    margin: 0 0 clamp(8px, .7vw, 12px);
    color: var(--amr-blue);
    font-size: clamp(14px, 1.05vw, 19px);
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.3;
    text-transform: uppercase;
}

.amr-title {
    margin: 0;
    padding: 0;
    color: var(--amr-navy);
    font-family: inherit;
    font-size: clamp(32px, 3.1vw, 60px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.amr-description {
    max-width: 780px;
    margin: clamp(12px, 1vw, 18px) auto 0;
    color: var(--amr-text);
    font-size: clamp(16px, 1.05vw, 20px);
    line-height: 1.45;
}

/* Two columns with a line between them. */
.amr-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr);
    column-gap: var(--amr-gap);
    margin-top: clamp(36px, 2.8vw, 54px);
}

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

.amr-faq {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.amr-columns:not(.amr-columns-single) .amr-faq::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--amr-gap) / -2);
    width: 1px;
    background: linear-gradient(180deg, rgba(220, 233, 248, 0), var(--amr-line) 12%, var(--amr-line) 88%, rgba(220, 233, 248, 0));
    content: '';
}

.amr-column-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: clamp(16px, 1.5vw, 28px);
}

.amr-column-icon {
    display: grid;
    width: clamp(56px, 4vw, 76px);
    height: clamp(56px, 4vw, 76px);
    place-items: center;
    border-radius: 12px;
    background: #e4f0fd;
    box-shadow: 0 8px 22px rgba(1, 33, 106, .07);
    color: var(--amr-icon);
}

.amr-column-icon svg {
    width: 56%;
    height: 56%;
}

.amr-column-eyebrow {
    margin-bottom: 4px;
    font-size: clamp(13px, .85vw, 16px);
}

.amr-column-title {
    margin: 0;
    padding: 0;
    color: var(--amr-navy);
    font-family: inherit;
    font-size: clamp(22px, 1.55vw, 30px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
}

.amr-column-description {
    max-width: 520px;
    margin: clamp(8px, .6vw, 12px) 0 0;
    color: var(--amr-text);
    font-size: clamp(15px, .9vw, 17px);
    line-height: 1.45;
}

/* Guide cards */
.amr-guides {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, .7vw, 14px);
    margin: clamp(22px, 1.6vw, 30px) 0 0;
    padding: 0;
    list-style: none;
}

.amr-guide {
    display: flex;
    min-width: 0;
    flex-direction: column;
    margin: 0;
    padding: 8px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(1, 33, 106, .07);
}

.amr-guide-media {
    position: relative;
}

.amr-guide-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 264 / 140;
    border-radius: 8px;
    object-fit: cover;
}

/* Sized in % of the picture so it always covers the badge cut out of the design pictures. */
.amr-guide-badge {
    position: absolute;
    bottom: 0;
    left: 2.4%;
    display: grid;
    width: 23%;
    min-width: 36px;
    aspect-ratio: 1;
    place-items: center;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(1, 33, 106, .12);
    color: var(--amr-icon);
}

.amr-guide-badge svg {
    width: 50%;
    height: 50%;
}

.amr-guide-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(14px, 1vw, 18px) clamp(6px, .5vw, 10px) clamp(8px, .6vw, 12px);
}

.amr-guide-title {
    margin: 0;
    padding: 0;
    color: var(--amr-navy);
    font-family: inherit;
    font-size: clamp(16px, 1.05vw, 19px);
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.25;
}

.amr-guide-description {
    margin: clamp(8px, .6vw, 10px) 0 clamp(14px, 1vw, 20px);
    color: var(--amr-text);
    font-size: clamp(13.5px, .82vw, 15px);
    line-height: 1.45;
}

.amr-guide-link,
.amr-faq-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--amr-link);
    font-size: clamp(14px, .88vw, 16px);
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

.amr-guide-link {
    margin-top: auto;
}

.amr-arrow {
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
    transition: transform .2s ease;
}

.amr-guide-link:hover .amr-arrow,
.amr-guide-link:focus-visible .amr-arrow,
.amr-faq-all:hover .amr-arrow,
.amr-faq-all:focus-visible .amr-arrow {
    transform: translateX(3px);
}

.amr-guide-link:hover,
.amr-guide-link:focus-visible {
    color: #0753c4;
}

/* FAQ */
.amr-faq-list {
    display: grid;
    gap: clamp(7px, .5vw, 9px);
    margin-top: clamp(22px, 1.6vw, 30px);
}

.amr-faq-item {
    border: 1.5px solid var(--amr-line);
    border-radius: 7px;
    background: #fff;
}

.amr-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: clamp(46px, 2.6vw, 50px);
    padding: 10px clamp(14px, 1vw, 18px);
    color: var(--amr-navy);
    font-size: clamp(15px, .92vw, 17px);
    font-weight: 500;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}

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

.amr-faq-question:focus-visible,
.amr-guide-link:focus-visible,
.amr-faq-all:focus-visible {
    outline: 3px solid var(--amr-blue);
    outline-offset: 3px;
}

/* Plus that turns into a minus. */
.amr-faq-toggle {
    position: relative;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

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

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

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

.amr-faq-answer {
    padding: 0 clamp(14px, 1vw, 18px) clamp(12px, .9vw, 16px);
    color: var(--amr-text);
    font-size: clamp(14px, .85vw, 16px);
    line-height: 1.55;
}

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

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

.amr-faq-answer a {
    color: var(--amr-link);
}

.amr-faq-all {
    justify-content: center;
    min-height: clamp(50px, 3vw, 56px);
    margin-top: clamp(18px, 1.3vw, 24px);
    padding: 10px 20px;
    border-radius: 7px;
    background: #dcebfc;
}

.amr-faq-all:hover,
.amr-faq-all:focus-visible {
    background: #cfe3fb;
    color: #0753c4;
}

/* Columns one under the other. */
@media (max-width: 1240px) {
    .amr-columns {
        grid-template-columns: minmax(0, 1fr);
        row-gap: clamp(48px, 6vw, 64px);
    }

    .amr-columns:not(.amr-columns-single) .amr-faq::before {
        display: none;
    }
}

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

/* Phones: picture beside the text. */
@media (max-width: 700px) {
    .amr-guides {
        grid-template-columns: minmax(0, 1fr);
    }

    .amr-guide {
        flex-direction: row;
        gap: 14px;
    }

    .amr-guide-media {
        width: 40%;
        flex: 0 0 40%;
        align-self: flex-start;
    }

    .amr-guide-body {
        padding: 4px 4px 4px 0;
    }
}

@media (max-width: 520px) {
    .amr-column-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .amr-guide-description {
        margin-bottom: 10px;
    }
}

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