/* ── Member Card Component (mcard) ──────────────────────────────────
   Prefix: mcard-  (unique, won't clash with Bootstrap or site CSS)
   ─────────────────────────────────────────────────────────────────── */

/* ── Outer wrapper — white bg, rounded, contains slider + button ── */
.mcard-outer {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.10);
    padding-bottom: 14px;
}

.mcard-wrap {
    padding: 0;
}

.mcard {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    transition: none;
}

.mcard:hover {
    transform: none;
    box-shadow: none;
}

/* ── Photo — passport size ratio (3:4) ──────────────────────────── */
.mcard-photo {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    position: relative;
    background: #c8d4e8;
    display: block;
    line-height: 0;
}

/* Blurred background from same image */
.mcard-photo-blur {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(14px) brightness(0.65);
    transform: scale(1.12);
    z-index: 0;
}

.mcard-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
}

.mcard:hover .mcard-photo img {
    transform: scale(1.04);
}

/* Role badge on photo — bottom center */
.mcard-role {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 30px;
    padding: 10px 18px;
    letter-spacing: 0.4px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.msc-img-badge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    max-width: 85%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── White info section ─────────────────────────────────────────── */
.mcard-info {
    background: #fff;
    padding: 10px 14px 6px;
    text-align: center;
}

.mcard-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color, #1a2a6c);
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── View All button — inside card, full width ──────────────────── */
.mcard-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 6px 14px 0;
    padding: 8px 16px;
    background: transparent;
    color: var(--text-color, #1a2a6c) !important;
    border: 1.5px solid var(--text-color, #1a2a6c);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.25s;
    letter-spacing: 0.2px;
    box-sizing: border-box;
}

.mcard-view-all:hover {
    background: var(--background-color, #1a2a6c);
    color: #fff !important;
    border-color: var(--background-color, #1a2a6c);
    text-decoration: none !important;
}

/* ── Carousel nav ───────────────────────────────────────────────── */
.mcard-slider {
    position: relative;
}

.mcard-slider .carousel-control-prev,
.mcard-slider .carousel-control-next {
    width: 32px;
    height: 32px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    border: none;
    opacity: 1;
    transition: background 0.2s;
    position: absolute;
}

.mcard-slider .carousel-control-prev {
    left: 8px;
}

.mcard-slider .carousel-control-next {
    right: 8px;
}

.mcard-slider .carousel-control-prev:hover,
.mcard-slider .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.75);
}

.mcard-slider .carousel-control-prev-icon,
.mcard-slider .carousel-control-next-icon {
    width: 14px;
    height: 14px;
    background-size: 100%;
}

/* ── Indicators — below photo, above info ───────────────────────── */
.mcard-slider .carousel-indicators {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.mcard-slider .carousel-indicators li {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    margin: 0;
    transition: all 0.3s;
    cursor: pointer;
}

.mcard-slider .carousel-indicators li.active {
    width: 20px;
    border-radius: 4px;
    background: var(--background-color, #1a2a6c);
}

@media only screen and (max-width: 768px) {
    .mcard-outer {
        width: min(285px, 92vw);
        margin: 0 auto 16px;
        border-radius: 12px;
        padding-bottom: 9px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
    }

    .mcard-photo {
        aspect-ratio: 1 / 1;
    }

    .mcard-photo-blur {
        filter: blur(12px) brightness(0.72);
        transform: scale(1.08);
    }

    .mcard-role,
    .msc-img-badge {
        bottom: 7px;
        max-width: 78%;
        padding: 4px 10px;
        font-size: 9px;
        line-height: 1.1;
    }

    .mcard-info {
        padding: 8px 10px 4px;
    }

    .mcard-name {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .mcard-view-all {
        width: auto;
        min-width: 180px;
        max-width: calc(100% - 24px);
        margin: 5px auto 0;
        padding: 7px 14px;
        font-size: 11px;
        line-height: 1.2;
    }

    .mcard-slider .carousel-control-prev,
    .mcard-slider .carousel-control-next {
        width: 26px;
        height: 26px;
    }

    .mcard-slider .carousel-control-prev {
        left: 6px;
    }

    .mcard-slider .carousel-control-next {
        right: 6px;
    }

    .mcard-slider .carousel-control-prev-icon,
    .mcard-slider .carousel-control-next-icon {
        width: 11px;
        height: 11px;
    }

    .mcard-slider .carousel-indicators {
        gap: 4px;
        margin: 5px 0 0;
    }

    .mcard-slider .carousel-indicators li {
        width: 5px;
        height: 5px;
    }

    .mcard-slider .carousel-indicators li.active {
        width: 16px;
    }
}
