.ftwa-content-cards {
    display: flex;
    flex-direction: column;
    /* Figma "Cards_mobile" (node 714:3158): 62px vertical / 36px side padding */
    padding: 62px 36px;
}

@media only screen and (min-width: 1024px) {
    .ftwa-content-cards {
        /* Figma "4 Cards_Services_Desktop" (node 767:918): 60px vertical / 120px side padding */
        padding: 60px 120px;
    }
}

.ftwa-content-cards__title {
    /* Figma "Built for advisors who want to advise" (node 717:7284) */
    margin: 0 0 60px;
    max-width: 1199px;
    font-family: var(--font-family-ptsans-bold, "Mixta Didone", Georgia, serif);
    font-weight: 500;
    font-size: var(--ftwa-h2-size, 60px);
    line-height: var(--ftwa-heading-line-height, 1.3);
    letter-spacing: var(--ftwa-h2-letter-spacing, 1.2px);
    text-align: center;
    align-self: center;
    color: var(--brand-primary-teal, #005A5C);
}

.ftwa-content-cards__grid {
    display: flex;
    flex-flow: row wrap;
    /* Figma "Content" (node 1564:9238) "Top Row": gap-[48px] between cards. */
    gap: 48px;
}

/* Figma "Filter" (node 952:18462): single-select chip row above the grid. */
.ftwa-content-cards__filters {
    display: flex;
    flex-flow: row wrap;
    gap: 24px;
    margin: 0 0 48px;
}

.ftwa-content-cards__filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--brand-primary-lapis, #00205B);
    border-radius: 4px;
    font-family: var(--font-family-ptsans-regular, Arial, Helvetica, sans-serif);
    font-size: 14px;
    line-height: 14px;
    color: #333;
    cursor: pointer;
}

.ftwa-content-cards__filter-check {
    display: none;
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--brand-primary-teal, #005A5C);
    position: relative;
}

.ftwa-content-cards__filter-check::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 4px;
    width: 8px;
    height: 4px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg);
}

.ftwa-content-cards__filter.is-active {
    background: var(--brand-primary-light-gray, #EBEBEB);
}

.ftwa-content-cards__filter.is-active .ftwa-content-cards__filter-check {
    display: block;
}

.ftwa-content-cards__card {
    box-sizing: border-box;
    /* Half of the grid's 48px gap. */
    flex: 1 1 calc(50% - 24px);
}

.ftwa-content-cards--boxed .ftwa-content-cards__card {
    padding: 64px;
    background: var(--brand-primary-light-gray, #ECE6DC);
}

.ftwa-content-cards--bordered .ftwa-content-cards__card {
    /* Figma "Primary Content Card" (node 1564:9243 etc.): top rule, no background box */
    padding: 24px 0 0;
    background: none;
    border-top: 1px solid var(--brand-primary-teal, #005A5C);
}

/* Tighter row gap (vertical) than the column gap (horizontal) between bordered cards. */
.ftwa-content-cards--bordered .ftwa-content-cards__grid {
    gap: 24px 48px;
}

.ftwa-content-cards__heading {
    margin: 0 0 24px;
    font-family: var(--font-family-ptsans-bold, "Mixta Didone", Georgia, serif);
    font-weight: 500;
    font-size: var(--ftwa-h4-size, 36px);
    line-height: var(--ftwa-heading-line-height, 1.3);
    letter-spacing: var(--ftwa-h4-letter-spacing, 0.72px);
    color: var(--brand-primary-teal, #005A5C);
}

.ftwa-content-cards__body {
    display: flex;
    flex-direction: column;
}

.ftwa-content-cards__body p,
.ftwa-content-cards__body ul {
    margin: 0 0 10px;
    font-family: var(--font-family-ptsans-regular, Arial, Helvetica, sans-serif);
    font-size: var(--ftwa-body-size, 18px);
    line-height: var(--ftwa-body-line-height, 1.5);
    letter-spacing: var(--ftwa-body-letter-spacing, 0.198px);
    color: #333;
}

.ftwa-content-cards__body p:last-child,
.ftwa-content-cards__body ul:last-child {
    margin-bottom: 0;
}

.ftwa-content-cards__body ul {
    padding-left: 20px;
}

@media only screen and (max-width: 1023px) {
    .ftwa-content-cards__card {
        flex: 1 1 100%;
    }
}

@media only screen and (max-width: 767px) {
    .ftwa-content-cards--boxed .ftwa-content-cards__card {
        padding: 32px;
    }

    .ftwa-content-cards--bordered .ftwa-content-cards__card {
        /* Figma "Overline Mobile" variant (node 714:3176): top rule, no background box */
        padding: 20px 0 0;
    }

    /* Figma mobile list items render as plain spaced lines, no bullets */
    .ftwa-content-cards__body ul {
        list-style: none;
        padding-left: 0;
    }

    .ftwa-content-cards__body li {
        margin-bottom: 10px;
    }

    .ftwa-content-cards__body li:last-child {
        margin-bottom: 0;
    }
}

/* Figma "Content Container" (node 1142:2068): 3-up "Resource-Card" grid -
   teal media block with a tag badge, date, title, description and CTA. */
.ftwa-content-cards--resource .ftwa-content-cards__grid {
    gap: 48px;
}

.ftwa-content-cards--resource .ftwa-content-cards__card {
    flex: 1 1 calc(33.333% - 32px);
    display: flex;
    flex-direction: column;
    background: #f1f0f0;
    overflow: hidden;
}

.ftwa-content-cards__media {
    position: relative;
    display: flex;
    align-items: center;
    padding: 24px;
    background: var(--brand-primary-teal, #005A5C);
}

/* Figma "Resource-Card" (node 1181:4959 etc.): media block color keys off the
   tag - fall back to teal above for blank/unrecognized tags. */
.ftwa-content-cards__media[data-tag="PDF" i] {
    background: var(--ftwa-tertiary-light-sandstone, #ECE6DC);
}

.ftwa-content-cards__media[data-tag="VIDEO" i] {
    background: var(--ftwa-primary-malachite, #005A5C);
}

.ftwa-content-cards__media[data-tag="PODCAST" i] {
    background: var(--ftwa-tertiary-zircon, #91B8C8);
}

.ftwa-content-cards__media[data-tag="ARTICLE" i] {
    background: var(--ftwa-tertiary-kyanite, #003858);
}

.ftwa-content-cards__media[data-tag="WEBINAR" i] {
    background: var(--ftwa-tertiary-sunstone, #D0A589);
}

.ftwa-content-cards__media[data-tag="PRESS RELEASE" i] {
    background: var(--ftwa-secondary-sandstone, #E0D7C7);
}

.ftwa-content-cards__media-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ftwa-content-cards__tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 18px;
    color: #00205b;
}

.ftwa-content-cards--resource .ftwa-content-cards__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 32px;
    background: #fbfaf9;
    flex: 1 1 auto;
}

.ftwa-content-cards__date {
    margin: 0;
    font-family: var(--font-family-ptsans-regular, Arial, Helvetica, sans-serif);
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: 0.198px;
    color: #333;
}

.ftwa-content-cards--resource .ftwa-content-cards__heading {
    margin: 0;
    font-size: 24px;
    letter-spacing: 0.48px;
    color: #00205b;
}

.ftwa-content-cards--resource .ftwa-content-cards__body p {
    margin: 0;
}

.ftwa-content-cards__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    background: var(--brand-primary-teal, #005A5C);
    color: #fff;
    font-family: var(--font-family-ptsans-bold, "Mixta Didone", Georgia, serif);
    font-weight: 500;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: 0.72px;
    text-decoration: none;
}

@media only screen and (max-width: 1023px) {
    .ftwa-content-cards--resource .ftwa-content-cards__card {
        flex: 1 1 100%;
    }
}
