/**
 * Image with Icon Content
 * Maroon intro panel with linked pathway image cards and icon content items.
 */

.image-with-icon-content__intro-panel.bg-maroon {
    background-color: #47131c;
    overflow: hidden;
    padding: 70px 0 140px;
    position: relative;
    border-radius: 0 0 170px 0;
}

.image-with-icon-content__intro {
    margin: 0 auto;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.image-with-icon-content__intro .sub-heading {
    margin-bottom: 10px;
}

.image-with-icon-content__intro h2 {
    margin-bottom: 15px;
}

.image-with-icon-content__heading-accent {
    font-style: italic;
}

.image-with-icon-content__intro-text {
    margin: 0;
}

.image-with-icon-content__cards {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: -40px;
    position: relative;
    z-index: 1;
}

.image-with-icon-content__card {
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    color: var(--color-text-inverse);
    display: block;
    margin: 0;
    overflow: hidden;
    position: relative;
    text-decoration: none;
}

.image-with-icon-content__card-img {
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    transition: transform 0.3s ease;
    width: 100%;
    z-index: 0;
}

.image-with-icon-content__card::before {
    background-color: rgba(0, 0, 0, 0.25);
    content: "";
    inset: 0;
    position: absolute;
    z-index: 1;
}

.image-with-icon-content__card-overlay {
    background: linear-gradient(180deg, rgba(71, 19, 28, 0.1) 0%, rgba(71, 19, 28, 0.8) 100%);
    inset: 0;
    opacity: 0;
    position: absolute;
    transition: opacity 0.3s ease;
    z-index: 2;
}

a.image-with-icon-content__card:hover .image-with-icon-content__card-overlay,
a.image-with-icon-content__card:focus-visible .image-with-icon-content__card-overlay {
    opacity: 1;
}

.image-with-icon-content__card-body {
    background-image: linear-gradient(180deg, rgba(37, 35, 35, 0) 40%, rgba(37, 35, 35, 0.85) 100%);
    bottom: 0;
    left: 0;
    padding: 20px;
    position: absolute;
    width: 100%;
    z-index: 3;
}

.image-with-icon-content__card-eyebrow {
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.image-with-icon-content__card:hover .image-with-icon-content__card-eyebrow,
.image-with-icon-content__card:hover .image-with-icon-content__card-desc,
.image-with-icon-content__card:hover .image-with-icon-content__card-cta-text,
.image-with-icon-content__card:hover .icon-arrow {
    color: var(--color-text-inverse);
}

.image-with-icon-content__card-title {
    color: var(--color-text-inverse);
    font-size: 20px;
    margin: 0 0 10px;
}

.image-with-icon-content__card-desc {
    font-size: 14px;
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

a.image-with-icon-content__card:hover .image-with-icon-content__card-desc,
a.image-with-icon-content__card:focus-visible .image-with-icon-content__card-desc {
    margin-top: 8px;
    max-height: 100px;
    opacity: 1;
}

.image-with-icon-content__card-cta {
    align-items: center;
    display: inline-flex;
    margin-top: 10px;
}

.image-with-icon-content__card-cta-text {
    font-weight: var(--font-weight-bold);
    margin-right: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.3s ease, margin-right 0.3s ease, opacity 0.3s ease;
    white-space: nowrap;
}

a.image-with-icon-content__card:hover .image-with-icon-content__card-cta-text,
a.image-with-icon-content__card:focus-visible .image-with-icon-content__card-cta-text {
    margin-right: 8px;
    max-width: 160px;
    opacity: 1;
}

.image-with-icon-content__card-body .icon-arrow {
    display: inline-block;
    font-size: 18px;
}

.image-with-icon-content__items {
    display: flex;
    flex-direction: column;
    gap: 30px;
    list-style: none;
    margin: 40px 0 0;
    padding: 0;
}

.image-with-icon-content__item {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.image-with-icon-content__icon {
    display: inline-flex;
    flex-shrink: 0;
}

.image-with-icon-content__icon [class^="icon-"] {
    color: var(--color-primary);
    font-size: 53px;
    line-height: 1;
}

.image-with-icon-content__icon svg {
    fill: var(--color-primary);
    height: 48px;
    width: 53px;
}

.image-with-icon-content__icon-img {
    height: 50px;
    object-fit: contain;
    width: 60px;
}

.image-with-icon-content__item-title {
    color: var(--color-heading);
    font-size: 18px;
    margin-bottom: 12px;
}

.image-with-icon-content__item-text {
    color: var(--color-paragraph);
    font-size: 16px;
    margin: 0;
}

@media (min-width: 768px) {
    .image-with-icon-content__intro-panel {
        padding: 60px 0 100px;
    }

    .image-with-icon-content__cards {
        flex-direction: row;
        gap: 0;
        margin-top: -70px;
    }

    .image-with-icon-content__cards--two {
        margin-left: auto;
        margin-right: auto;
        max-width: 66.666%; /* two of three equal columns */
    }

    .image-with-icon-content__card {
        aspect-ratio: 3 / 4;
        border-radius: 0;
        flex: 1 1 0;
    }

    .image-with-icon-content__card:first-child {
        border-radius: 20px 0 0 20px;
    }

    .image-with-icon-content__card:last-child {
        border-radius: 0 20px 20px 0;
    }

    .image-with-icon-content__items {
        flex-direction: row;
        margin-top: 50px;
    }

    .image-with-icon-content__item {
        flex: 1 1 0;
    }
}

@media (min-width: 1200px) {
    .image-with-icon-content__intro-panel {
        padding: 80px 0 130px;
    }

    .image-with-icon-content__intro-panel.bg-maroon {
        padding: 80px 0 200px;
        border-radius: 0 0 270px 0;
    }
    
    .image-with-icon-content__cards {
        margin-top: -160px;
    }

    .image-with-icon-content__card-title {
        font-size: 30px;
    }

    .image-with-icon-content__item-title {
        max-width: 336px;
        font-size: 22px;
    }

    a.image-with-icon-content__card:hover .image-with-icon-content__card-img,
    a.image-with-icon-content__card:focus-visible .image-with-icon-content__card-img {
        transform: scale(1.05);
    }
}
