/* =========================================================
   Partner Logos Grid Block
   ========================================================= */

.plg-section {
    padding: 80px 0;
    background: #F5F5F5;
}

/* ── Grid layout ─────────────────────────────────────────── */

/* Flex-based 3-col grid — last row auto-centred regardless of item count */
.plg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 42px 21px;
    justify-content: center;
}

/* Each card: fixed width for 3 columns.
   Column-gap = 21px, 2 gaps across 3 cards = 42px total ÷ 3 = 14px per card */
.plg-card {
    flex: 0 0 calc(33.333% - 14px);
}

/* ── Card shell ──────────────────────────────────────────── */
.plg-card {
    border-radius: 12px;
    background: #FFF;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 244px;
    /* 3-D flip context */
    /* perspective: 1000px; */
    /* transition: box-shadow 0.3s ease; */
}

/* Only colour the card on hover when it has interactive hover content */
.plg-card--has-hover:hover {
    background: #544FF8;
}

/* ── Hand cursor + full-card stretched-link click area ── */
.plg-card--has-link {
    cursor: pointer;
}

/* ── FRONT FACE ──────────────────────────────────────────── */
.plg-card__front {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 28px 66px;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

/* ── Logo image ──────────────────────────────────────────── */
.plg-card__logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.plg-card__logo {
    max-height: 98px;
}

/* ── "Learn More" — pinned 31px from card bottom ─────────── */
.plg-card__front-footer {
    position: absolute;
    bottom: 31px;
    left: 0;
    right: 0;
    text-align: center;
}

.plg-card__learn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.plg-card__learn-more:hover,
.plg-card__learn-more:focus {
    color: #544FF8;
    text-decoration: none;
}

/* ── BACK FACE (hover overlay) ───────────────────────────── */

.plg-card--has-hover .plg-card__back{
    display: none;
}
.plg-card__back {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 55px 62px;
    transition: opacity 0.3s ease;
}

/* Reveal back on card hover */
.plg-card--has-hover:hover .plg-card__back {
    display: block;
    pointer-events: auto;
    cursor: pointer;
}

/* Fade / push front out on hover */
.plg-card--has-hover:hover .plg-card__front {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
}

/* ── Back inner content ──────────────────────────────────── */
.plg-card__back-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.plg-card__back-title {
   color: #FFF;
    text-align: center;
    font-size: 23px;
    font-style: normal;
    font-weight: 500;
    line-height: 140%; /* 32.2px */
    margin-bottom: 10px;
}

.plg-card__back-subtitle {
    color: #FFF;
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px; /* 112.5% */
    margin-bottom: 12px;
}

.plg-card__back-desc {
    color: #F5F5F5;
    text-align: center;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px; /* 138.462% */
}

/* ── Back "Learn More" button – pinned 31px from card bottom */
.plg-card__back-btn {
    position: absolute;
    bottom: 31px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #FFF;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    text-decoration: none;
    margin-top: 0;
}


.plg-card__back-btn img {
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease;
}

/* =========================================================
   Responsive
   ========================================================= */

/* Tablet – 2 columns */
@media (max-width: 1199.98px) {
    .plg-section {
        padding: 80px 0;
    }
    .plg-grid {
        gap: 20px 20px;
    }

    /* 2 per row: 1 gap of 20px ÷ 2 cards = 10px per card */
    .plg-card {
        flex: 0 0 calc(50% - 10px);
        min-height: 244px;
    }

    .plg-card__front {
        padding: 28px 22px 66px;
    }

    .plg-card__back-title {
        font-size: 18px;
    }
}

/* Mobile – 1 column */
@media (max-width: 767.98px) {
    .plg-section {
        padding: 60px 0;
    }

    .plg-grid {
        gap: 16px;
    }

    /* 1 per row: full width */
    .plg-card {
        flex: 0 0 100%;
    }

    .plg-card__front {
        padding: 24px 20px 66px;
    }

    .plg-card__logo {
        max-width: 130px;
        max-height: 60px;
    }

    .plg-section-title {
        font-size: 24px;
        margin-bottom: 28px;
    }

}

/* ── Disable hover overlay below 1199px and on touch devices  */
@media (max-width: 1199.98px), (hover: none) {
    .plg-card--has-hover:hover .plg-card__back,
    .plg-card--has-hover:focus-within .plg-card__back {
        opacity: 0 !important;
        transform: translateY(8px) scale(0.97) !important;
        pointer-events: none !important;
    }

    .plg-card--has-hover:hover .plg-card__front,
    .plg-card--has-hover:focus-within .plg-card__front {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }

    /* Prevent background colour change */
    .plg-card--has-hover:hover {
        background: #FFF;
    }
}