/* ============================================================
   Moms NGO – Featured Campaign Widget
   ============================================================ */

.momsngo-featured-campaigns {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* ── Wrapper ──────────────────────────────────────────────── */
.momsngo-campaign-wrap {
    position: relative;
    width: 100%;
}

/* ── Background image area ───────────────────────────────── */
.momsngo-campaign-image {
    position: relative;
    width: 100%;
    height: 50vh;
    background-color: #d8d8d8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px 4px 0 0;
    transition: height 1.7s ease-in-out;
}

body.video-playing .momsngo-campaign-image {
    height: calc(100vh - 150px) !important;
}

@media (max-width: 425px) and (orientation:portrait) {
    .momsngo-campaign-image, body.video-playing .momsngo-campaign-image {
        height: 290px !important;
    }
}

@media (max-width: 890px) and (min-width: 425px) {
    .momsngo-campaign-image, body.video-playing .momsngo-campaign-image {
        height: calc(100vh - 100px) !important;
    }
}

.momsngo-campaign-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    border-radius: inherit;
    pointer-events: none;
}

/* Video + Plyr fill the image area */
.momsngo-campaign-image.has-video {
    overflow: hidden;
}

/* Plyr wraps the <video> — make the wrapper fill the container */
.momsngo-campaign-image.has-video .plyr {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* The actual <video> inside Plyr covers the area */
.momsngo-campaign-image.has-video .plyr video,
.momsngo-campaign-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 425px) {
    .momsngo-campaign-image.has-video .plyr video,
    .momsngo-campaign-video {
        object-fit: contain;
    }
}

/* Keep Plyr controls readable over the video */
.momsngo-campaign-image.has-video .plyr__controls {
    z-index: 2;
}

/* Placeholder when no featured image */
.momsngo-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    gap: 8px;
}

.momsngo-image-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #bbb;
}

/* ── Card ─────────────────────────────────────────────────── */
.momsngo-campaign-card {
    font-family: 'EB Garamond';
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    padding: 48px 40px 40px;
    text-align: center;
    /* Pull card up over the bottom of the image */
    margin-top: -200px;
    margin-left: auto;
    margin-right: auto;
    max-width: 580px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    opacity: 1;
    transition: opacity 1.7s;
}

body.video-playing .momsngo-campaign-card {
    opacity: 0;
}

@media (max-width: 425px) {
    .momsngo-campaign-card, body.video-playing .momsngo-campaign-card {
        opacity: 1;
        margin-top: 30px;
    }
}

@media (max-width: 890px) {
    .momsngo-campaign-card, body.video-playing .momsngo-campaign-card {
        margin-top: -30px;
    }
}

/* ── Category logo floating above card ───────────────────── */
.momsngo-category-logo-wrap {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
}

.momsngo-category-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.momsngo-category-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

/* ── Category label ─────────────────────────────────────── */
.momsngo-category-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #666666;
    text-transform: uppercase;
    margin-bottom: 14px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.momsngo-label-star {
    font-size: 10px;
    opacity: 0.6;
}

/* ── Title ───────────────────────────────────────────────── */
.momsngo-campaign-title {
    font-family: ScothBrace;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin: 0 0 16px;
}

/* ── Excerpt ─────────────────────────────────────────────── */
.momsngo-campaign-excerpt {
    font-size: 1rem;
    line-height: 1.7;
    color: #555555;
    margin: 0 0 24px;
}

/* ── Stats bar ───────────────────────────────────────────── */
.momsngo-stats-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.momsngo-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7f7f7;
    border: 1px solid #ebebeb;
    border-radius: 6px;
    padding: 14px 20px;
    min-width: 140px;
    flex: 1;
    gap: 4px;
}

.momsngo-stat-item i {
    font-size: 16px;
    color: #888;
    margin-bottom: 4px;
}

.momsngo-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.momsngo-stat-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    color: #888888;
    text-transform: uppercase;
    text-align: center;
}

@media (max-width: 425px) {
    .momsngo-stat-label {
        letter-spacing: 0.5px;
    }
}

/* ── Action buttons ─────────────────────────────────────── */
.momsngo-campaign-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.momsngo-btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    line-height: 1;
    letter-spacing: 0.3px;
}

.momsngo-btn-donate {
    background-color: #1a1a1a;
    color: #ffffff;
    border: 2px solid transparent;
}

.momsngo-btn-donate:hover {
    background-color: #333333;
    color: #ffffff;
}

.momsngo-btn-read {
    background-color: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
}

.momsngo-btn-read:hover {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* ── No-posts fallback ────────────────────────────────────── */
.momsngo-no-posts {
    padding: 20px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #888;
    text-align: center;
    font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .momsngo-campaign-card {
        padding: 40px 20px 28px;
        margin-left: 12px;
        margin-right: 12px;
    }

    .momsngo-campaign-title {
        font-size: 20px;
    }

    .momsngo-stat-item {
        min-width: 100px;
        padding: 10px 14px;
    }

    .momsngo-stat-value {
        font-size: 15px;
    }

    .momsngo-campaign-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .momsngo-btn {
        text-align: center;
    }
}

/* ── Video title overlay ──────────────────────────────────── */
.momsngo-video-title-overlay {
    position: absolute;
    bottom: 60px;
    right: 15px;
    padding: 10px 16px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 9;
    background: var(--dark-mode-bg-color);
    width: 300px;
    max-width: 100vw;
    border-radius: 10px;
    box-shadow: 0px 0px 7px 1px color-mix(in srgb, var(--dark-mode-bg-color) 50%, transparent);
}

.momsngo-video-title-overlay.is-visible, body:not(.video-playing) .momsngo-video-title-overlay{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 425px) {
    .momsngo-video-title-overlay {
        font-size: 0.7rem;
        right: calc(50% - 150px);
        text-align: center;
    }
}

.momsngo-video-title-link,
.momsngo-video-title-text {
    display: inline-block;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
    text-decoration: none;
}

.momsngo-video-title-link:hover {
    text-decoration: underline;
    color: #fff;
}

/* ── Unmute overlay ───────────────────────────────────────── */
.momsngo-unmute-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 10;
}

.momsngo-unmute-overlay.is-visible {
    opacity: 1;
}

.momsngo-unmute-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
}

.momsngo-unmute-overlay.is-visible .momsngo-unmute-icon {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.7);
}
