/**
 * Text with Cards component styles
 *
 * @package MBM_Theme
 * @since 1.0.0
 */

.text-with-cards {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: clamp(4rem, 7vw, 6rem) 0;
    background-color: var(--la-gold-muted);
}

.text-with-cards.bg-white {
    background-color: var(--la-white);
}

.text-with-cards.bg-blue-smoke {
    background-color: var(--color-bg);
}

.text-with-cards.bg-blue {
    background-color: var(--la-blue);
    color: var(--la-white);
}

.text-with-cards.bg-gold {
    background-color: var(--la-gold-muted);
}

.text-with-cards.bg-black {
    background-color: var(--la-black);
    color: var(--la-white);
}

.text-with-cards__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: var(--text-with-cards-bg-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

.text-with-cards__container {
    position: relative;
    z-index: 1;
}

.text-with-cards__intro {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}

.text-with-cards__title {
    margin: 0 0 1.25rem;
    color: var(--la-blue);
    font-size: clamp(1.75rem, 2.4vw, 2.35rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.text-with-cards__text {
    margin: 0 auto;
    max-width: 760px;
    color: var(--la-black);
    font-size: 1rem;
    line-height: 1.65;
}

.text-with-cards__text p {
    margin-top: 0;
}

.text-with-cards__text p:last-child {
    margin-bottom: 0;
}

.text-with-cards__bold-text {
    margin: 1.35rem auto 0;
    max-width: 760px;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 600;
}

.text-with-cards__bold-text--white {
    color: var(--la-white);
}

.text-with-cards__bold-text--blue-smoke {
    color: var(--la-blue-40);
}

.text-with-cards__bold-text--blue {
    color: var(--la-blue);
}

.text-with-cards__bold-text--gold {
    color: var(--la-gold);
}

.text-with-cards__bold-text--black {
    color: var(--la-black);
}

.text-with-cards__grid {
    display: grid;
    grid-template-columns: repeat(var(--text-with-cards-count, 3), minmax(0, 1fr));
    gap: clamp(1rem, 2.5vw, 2rem);
    margin-top: clamp(2.5rem, 4vw, 3.5rem);
}

.text-with-cards__card {
    text-align: center;
}

.text-with-cards__card-media {
    display: block;
    margin: 0 0 1.15rem;
    border-radius: 14px;
    overflow: hidden;
    background: #e8e8ed;
    aspect-ratio: 1 / 1;
}

.text-with-cards__card-media .text-with-cards__card-image,
.text-with-cards__card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-with-cards__card-title {
    margin: 0 0 0.65rem;
    color: var(--la-blue);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    font-weight: 600;
    line-height: 1.25;
}

.text-with-cards__card-text {
    margin: 0 auto;
    max-width: 280px;
    color: var(--la-black);
    font-size: 0.95rem;
    line-height: 1.55;
}

.text-with-cards__footer {
    margin-top: clamp(2.5rem, 4vw, 3.5rem);
    text-align: center;
}

.text-with-cards__bottom-text {
    max-width: 760px;
    margin: 0 auto;
    color: var(--la-black);
    font-size: 0.95rem;
    line-height: 1.65;
}

.text-with-cards__bottom-text p {
    margin-top: 0;
}

.text-with-cards__bottom-text p:last-child {
    margin-bottom: 0;
}

.text-with-cards__cta {
    margin-top: 1.75rem;
    display: flex;
    justify-content: center;
}

.text-with-cards.bg-blue .text-with-cards__text,
.text-with-cards.bg-blue .text-with-cards__card-text,
.text-with-cards.bg-blue .text-with-cards__bottom-text,
.text-with-cards.bg-black .text-with-cards__text,
.text-with-cards.bg-black .text-with-cards__card-text,
.text-with-cards.bg-black .text-with-cards__bottom-text {
    color: rgba(255, 255, 255, 0.92);
}

.text-with-cards.bg-blue .text-with-cards__title,
.text-with-cards.bg-blue .text-with-cards__card-title,
.text-with-cards.bg-black .text-with-cards__title,
.text-with-cards.bg-black .text-with-cards__card-title {
    color: var(--la-white);
}

@media (max-width: 991px) {
    .text-with-cards__grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 575px) {
    .text-with-cards {
        padding: 3rem 0;
    }
}
