/* ========================================================
   BGC FOUNDATION - OUR CAUSES 3D FLIP CARDS (#FFFFFF, #111111, #ed2227)
   ======================================================== */

.bg-white {
    background-color: #FFFFFF !important;
}

.text-red {
    color: #ed2227 !important;
}

/* Light Badge Pill */
.bgc-light-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #F5F5F5;
    padding: 6px 18px;
    border-radius: 50px;
    border: 1px solid #E0E0E0;
}

.bgc-light-badge .badge-dot {
    width: 8px;
    height: 8px;
    background-color: #ed2227;
    border-radius: 50%;
    box-shadow: 0 0 8px #ed2227;
}

.bgc-light-badge .badge-text {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #111111;
}

/* ========================================================
   3D FLIP CARD ENGINE (FIXED MIRRORING & ULTA TEXT ISSUE)
   ======================================================== */

.cause-flip-wrapper {
    background-color: transparent;
    height: 390px;
    perspective: 1200px; /* Essential for smooth 3D depth */
    -webkit-perspective: 1200px;
    cursor: pointer;
}

.cause-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    border-radius: 20px;
}

/* Flip Trigger on Hover & Mobile Tap */
.cause-flip-wrapper:hover .cause-flip-inner,
.cause-flip-wrapper.flipped .cause-flip-inner {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

/* Strict Backface Hiding for Front & Back */
.cause-flip-front,
.cause-flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ========================================================
   FRONT CARD SIDE
   ======================================================== */
.cause-flip-front {
    border: 1px solid #E2E8F0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    background-color: #111111;
    z-index: 2;
    transform: rotateY(0deg);
    -webkit-transform: rotateY(0deg);
}

.cause-front-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cause-flip-wrapper:hover .cause-front-img {
    transform: scale(1.08);
}

.front-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.88) 100%);
}

.cause-tag-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #ed2227;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 30px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(237, 34, 39, 0.4);
}

.front-card-content {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    z-index: 2;
}

.cause-front-title {
    font-size: 26px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Front Check Here Button */
.btn-check-here {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #FFFFFF !important;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 8px 20px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.cause-flip-wrapper:hover .btn-check-here {
    background: #ed2227;
    border-color: #ed2227;
    box-shadow: 0 4px 15px rgba(237, 34, 39, 0.5);
}

/* ========================================================
   BACK CARD SIDE (PRE-ROTATED 180deg TO KEEP TEXT STRAIGHT)
   ======================================================== */
.cause-flip-back {
    background: #FFFFFF;
    border: 2px solid #ed2227;
    padding: 28px 24px;
    /* CRUCIAL: Pre-rotating 180deg prevents mirrored/ulta text */
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    box-shadow: 0 15px 35px rgba(237, 34, 39, 0.15);
    z-index: 1;
}

.back-tag-badge {
    font-size: 12px;
    font-weight: 700;
    color: #ed2227;
    letter-spacing: 1px;
    margin-bottom: 6px;
    display: inline-block;
}

.cause-back-title {
    font-size: 24px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 10px;
}

.cause-back-desc {
    font-size: 13.5px;
    color: #333333;
    line-height: 1.6;
    margin-bottom: 12px;
}

.cause-highlights {
    margin-bottom: 16px;
}

.cause-highlights li {
    font-size: 13px;
    color: #111111;
    margin-bottom: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* Back Action Button */
.btn-cause-back {
    background: linear-gradient(135deg, #ed2227 0%, #990B0F 100%);
    color: #FFFFFF !important;
    padding: 12px 20px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-cause-back:hover {
    box-shadow: 0 8px 20px rgba(237, 34, 39, 0.4);
    transform: translateY(-2px);
}

/* Responsive Fixes */
@media (max-width: 991.98px) {
    .cause-flip-wrapper {
        height: 370px;
    }
    .cause-back-title {
        font-size: 22px;
    }
}