﻿/* =========================================
   CampaignView - Details
   Theme: Solid black + red accents (NO gradients)
   ========================================= */

:root {
    --home-text: rgba(255,255,255,0.92);
    --home-muted: rgba(255,255,255,0.70);
    --home-border: rgba(255,255,255,0.12);
    --home-red: #ff2a2a;
    --home-radius: 18px;
    --home-shadow2: 0 12px 34px rgba(0,0,0,0.45);
    --home-ease: cubic-bezier(.2,.8,.2,1);
    --home-ease-fast: cubic-bezier(.2,.9,.2,1);
    /* icons */
    --i-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 18l-6-6 6-6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --i-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3v3M17 3v3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M4 7h16v14H4z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M4 11h16' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
    --i-evt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20a10 10 0 0 0 0-20Z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M12 6v6l4 2' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --i-loc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22s7-5 7-12a7 7 0 1 0-14 0c0 7 7 12 7 12Z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M12 10a2.2 2.2 0 1 0 0 .1Z' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
    --i-ext: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 5h5v5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10 14L19 5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M19 14v5H5V5h5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    --i-list: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 7h14M6 12h14M6 17h14' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M4 7h.01M4 12h.01M4 17h.01' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    --i-reg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v12H4z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M7 12h10' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M12 9v6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 11V8a5 5 0 0 1 10 0v3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M6 11h12v10H6z' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E");
    --i-q: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v12H4z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M7 10h10' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M7 14h7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.cmpd {
    min-width: 320px;
    color: var(--home-text);
    padding: clamp(18px, 3vw, 28px) 0 clamp(46px, 6vw, 74px);
    overflow-x: hidden;
}

.cmpd__inner {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 24px;
}

@media (max-width:520px) {
    .cmpd__inner {
        padding-inline: 14px;
    }
}

/* Toasts */
.cmpd-toast {
    margin-bottom: 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}

.cmpd-toast__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    flex: 0 0 auto;
    background: var(--home-red);
    box-shadow: 0 0 0 4px rgba(255,42,42,0.14);
}

.cmpd-toast--success .cmpd-toast__dot {
    background: #2ee58c;
    box-shadow: 0 0 0 4px rgba(46,229,140,0.14);
}

.cmpd-toast--info .cmpd-toast__dot {
    background: rgba(255,255,255,0.75);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.12);
}

.cmpd-toast__text {
    color: rgba(255,255,255,0.88);
    font-weight: 750;
    font-size: 13.5px;
}

/* Top bar */
.cmpd-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.cmpd-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.90);
    font-weight: 950;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    transition: transform 160ms var(--home-ease-fast), border-color 160ms var(--home-ease-fast);
}

    .cmpd-back:hover {
        transform: translateY(-1px);
        border-color: rgba(255,42,42,0.32);
    }

.cmpd-back__ic {
    width: 16px;
    height: 16px;
    display: inline-block;
}

    .cmpd-back__ic::before {
        content: "";
        width: 16px;
        height: 16px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-back) center/contain no-repeat;
        mask: var(--i-back) center/contain no-repeat;
    }

/* Status */
.cmpd-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 950;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.28);
}

.cmpd-status__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.cmpd-status--open {
    border-color: rgba(46,229,140,0.30);
}

    .cmpd-status--open .cmpd-status__dot {
        background: #2ee58c;
        box-shadow: 0 0 0 4px rgba(46,229,140,0.14);
    }

.cmpd-status--closed {
    border-color: rgba(255,255,255,0.16);
}

    .cmpd-status--closed .cmpd-status__dot {
        background: rgba(255,255,255,0.72);
        box-shadow: 0 0 0 4px rgba(255,255,255,0.10);
    }

/* Hero */
.cmpd-hero {
    border-radius: var(--home-radius);
    border: 1px solid var(--home-border);
    background: rgba(255,255,255,0.04);
    box-shadow: var(--home-shadow2);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

@media (max-width: 860px) {
    .cmpd-hero {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   HERO IMAGE SYSTEM (Desktop/large screens) - unchanged
   ========================================================= */

.cmpd-hero__media {
    --hero-amb1: rgba(255,42,42,0.28);
    --hero-amb2: rgba(255,42,42,0.16);
    --hero-ambient-img: none;
    --hero-ambient-opacity: 0.85;
    --hero-ambient-overlay: .26;
    --hero-media-border: rgba(255,255,255,0.12);
    --hero-media-shadow: 0 18px 44px rgba(0,0,0,0.45);
    position: relative;
    background: rgba(0,0,0,0.22);
    overflow: hidden;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    box-shadow: inset 0 0 0 1px var(--hero-media-border), var(--hero-media-shadow);
    isolation: isolate;
}

    .cmpd-hero__media::before {
        content: "";
        position: absolute;
        inset: -28px;
        z-index: 0;
        pointer-events: none;
        background-image: radial-gradient(circle at 22% 28%, var(--hero-amb1), transparent 62%), radial-gradient(circle at 78% 72%, var(--hero-amb2), transparent 60%), var(--hero-ambient-img);
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        filter: blur(34px) saturate(1.25) contrast(1.06);
        opacity: var(--hero-ambient-opacity);
        transform: scale(1.12);
    }

    .cmpd-hero__media::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.08), transparent 56%), linear-gradient(180deg, rgb(0 0 0 / var(--hero-ambient-overlay)), rgb(0 0 0 / 0.55));
    }

.cmpd-hero__img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    transform: none;
    filter: contrast(1.06) saturate(1.05);
}

@media (min-width: 861px) {
    .cmpd-hero__img {
        width: 100%;
        height: 100%;
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
        object-position: center;
    }
}

/* fallback */
.cmpd-hero__fallback {
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
}

    .cmpd-hero__fallback::before {
        content: "";
        width: 84px;
        height: 84px;
        border-radius: 18px;
        background: rgba(255,42,42,0.10);
        border: 1px solid rgba(255,42,42,0.28);
        box-shadow: 0 18px 34px rgba(0,0,0,0.45);
    }

.cmpd-hero__content {
    padding: 18px;
    position: relative;
}

    .cmpd-hero__content::after {
        content: "";
        position: absolute;
        right: -70px;
        top: -70px;
        width: 200px;
        height: 200px;
        background: rgba(255,42,42,0.10);
        filter: blur(36px);
        pointer-events: none;
    }

.cmpd-title {
    margin: 14px 0 8px;
    font-size: clamp(26px, 3.6vw, 36px);
    letter-spacing: -0.03em;
    line-height: 1.08;
    position: relative;
    z-index: 1;
}

.cmpd-desc {
    margin: 0;
    color: var(--home-muted);
    font-size: clamp(13.5px, 1.7vw, 16px);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* pills */
.cmpd-pills {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.10);
    transition: transform 180ms var(--home-ease-fast), border-color 180ms var(--home-ease-fast);
}

    .pill:hover {
        transform: translateY(-1px);
        border-color: rgba(255,255,255,0.18);
    }

.pill__icon {
    --pill-icon: var(--i-q);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255,42,42,0.12);
    border: 1px solid rgba(255,42,42,0.38);
    display: inline-grid;
    place-items: center;
}

    .pill__icon::before {
        content: "";
        width: 12px;
        height: 12px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--pill-icon) center/contain no-repeat;
        mask: var(--pill-icon) center/contain no-repeat;
    }

.pill__icon--q {
    --pill-icon: var(--i-q);
}

.pill__text {
    font-size: 13px;
    font-weight: 850;
    color: rgba(255,255,255,0.86);
}

/* Info grid */
.cmpd-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 860px) {
    .cmpd-grid {
        grid-template-columns: 1fr;
    }
}

.cmpd-card {
    border-radius: var(--home-radius);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    box-shadow: 0 16px 40px rgba(0,0,0,0.30);
    padding: 16px;
    position: relative;
    overflow: hidden;
}

    .cmpd-card::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 84px;
        height: 84px;
        background: rgba(255,42,42,0.14);
        clip-path: polygon(100% 0, 0 0, 100% 100%);
        opacity: 0.9;
        pointer-events: none;
    }

.cmpd-card--full {
    grid-column: 1 / -1;
}

.cmpd-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cmpd-card__ic {
    --card-icon: var(--i-cal);
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255,42,42,0.12);
    border: 1px solid rgba(255,42,42,0.38);
    display: grid;
    place-items: center;
}

    .cmpd-card__ic::before {
        content: "";
        width: 12px;
        height: 12px;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--card-icon) center/contain no-repeat;
        mask: var(--card-icon) center/contain no-repeat;
    }

.cmpd-card__ic--cal {
    --card-icon: var(--i-cal);
}

.cmpd-card__ic--evt {
    --card-icon: var(--i-evt);
}

.cmpd-card__ic--loc {
    --card-icon: var(--i-loc);
}

.cmpd-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 950;
    letter-spacing: -0.01em;
}

/* Key/Value */
.cmpd-kv {
    display: grid;
    gap: 10px;
    margin-top: 6px;
}

.cmpd-kv__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 10px;
}

    .cmpd-kv__row:first-child {
        border-top: 0;
        padding-top: 0;
    }

.cmpd-kv__k {
    color: rgba(255,255,255,0.72);
    font-weight: 850;
    font-size: 13px;
}

.cmpd-kv__v {
    color: rgba(255,255,255,0.90);
    font-weight: 950;
    font-size: 13px;
    text-align: right;
    overflow-wrap: anywhere;
}

.cmpd-hint {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.70);
    font-weight: 800;
    font-size: 12.5px;
}

.cmpd-hint__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--home-red);
    box-shadow: 0 0 0 4px rgba(255,42,42,0.12);
}

.cmpd-emptyLine {
    margin-top: 6px;
    color: rgba(255,255,255,0.72);
    font-weight: 850;
    font-size: 13px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Location */
.cmpd-locLink {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    transition: transform 160ms var(--home-ease-fast), border-color 160ms var(--home-ease-fast), background-color 160ms var(--home-ease-fast);
}

    .cmpd-locLink:hover {
        transform: translateY(-1px);
        border-color: rgba(255,42,42,0.32);
        background: rgba(255,42,42,0.10);
    }

.cmpd-locLink__ic {
    width: 16px;
    height: 16px;
    display: inline-block;
}

    .cmpd-locLink__ic::before {
        content: "";
        width: 16px;
        height: 16px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-loc) center/contain no-repeat;
        mask: var(--i-loc) center/contain no-repeat;
    }

.cmpd-locLink__text {
    font-weight: 950;
    font-size: 13px;
    overflow-wrap: anywhere;
    flex: 1 1 auto;
}

.cmpd-locLink__arrow {
    width: 16px;
    height: 16px;
    display: inline-block;
}

    .cmpd-locLink__arrow::before {
        content: "";
        width: 16px;
        height: 16px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-ext) center/contain no-repeat;
        mask: var(--i-ext) center/contain no-repeat;
    }

.cmpd-locPlain {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
}

.cmpd-locPlain__ic {
    width: 16px;
    height: 16px;
    display: inline-block;
}

    .cmpd-locPlain__ic::before {
        content: "";
        width: 16px;
        height: 16px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-loc) center/contain no-repeat;
        mask: var(--i-loc) center/contain no-repeat;
    }

.cmpd-locPlain__text {
    font-weight: 950;
    font-size: 13px;
    color: rgba(255,255,255,0.92);
    overflow-wrap: anywhere;
}

/* Actions */
.cmpd-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cmpd-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 999px;
    font-weight: 950;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.18);
    color: rgba(255,255,255,0.92);
    transition: transform 160ms var(--home-ease-fast), border-color 160ms var(--home-ease-fast), background-color 160ms var(--home-ease-fast);
}

    .cmpd-btn:hover {
        transform: translateY(-1px);
        border-color: rgba(255,42,42,0.32);
    }

.cmpd-btn--primary {
    background: rgba(255,42,42,0.16);
    border-color: rgba(255,42,42,0.40);
}

    .cmpd-btn--primary:hover {
        background: rgba(255,42,42,0.22);
        border-color: rgba(255,42,42,0.65);
    }

.cmpd-btn--disabled {
    opacity: .55;
    background: rgba(255,255,255,0.04);
    cursor: not-allowed;
}

.cmpd-btn__ic {
    width: 16px;
    height: 16px;
    display: inline-block;
}

    .cmpd-btn__ic::before {
        content: "";
        width: 16px;
        height: 16px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-list) center/contain no-repeat;
        mask: var(--i-list) center/contain no-repeat;
    }

.cmpd-btn__ic--list::before {
    -webkit-mask: var(--i-list) center/contain no-repeat;
    mask: var(--i-list) center/contain no-repeat;
}

.cmpd-btn__ic--reg::before {
    -webkit-mask: var(--i-reg) center/contain no-repeat;
    mask: var(--i-reg) center/contain no-repeat;
}

.cmpd-btn__ic--lock::before {
    -webkit-mask: var(--i-lock) center/contain no-repeat;
    mask: var(--i-lock) center/contain no-repeat;
}

/* Reveal */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 520ms var(--home-ease), transform 520ms var(--home-ease);
}

    .reveal.is-in {
        opacity: 1;
        transform: translateY(0);
    }

@media (prefers-reduced-motion: reduce) {
    .reveal, .cmpd-btn, .pill, .cmpd-back {
        transition: none !important;
    }
}

/* =========================================================
   MOBILE HERO (<= 860px)
   ✅ image stays INSIDE the same box (title/desc card)
   ✅ image above title
   ✅ NO ambient overlays behind image
   ========================================================= */
@media (max-width: 860px) {

    /* Single premium card */
    .cmpd-hero {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        /* keep it as ONE box */
        border-radius: var(--home-radius);
        border: 1px solid rgba(255,255,255,0.12);
        background: rgba(255,255,255,0.04);
        box-shadow: 0 16px 40px rgba(0,0,0,0.32);
        /* inner padding so image also feels "inside the box" */
        padding: 14px;
        overflow: hidden;
    }

    /* Media becomes a clean framed image inside card */
    .cmpd-hero__media.cmpd-hero__media--hasimg {
        min-height: 0;
        height: auto;
        width: 100%;
        display: block;
        /* remove container visuals */
        background: transparent;
        box-shadow: none;
        isolation: auto;
        overflow: hidden;
        /* nice frame */
        border-radius: 14px;
        border: 1px solid rgba(255,255,255,0.12);
    }

        /* disable ambient layers on mobile */
        .cmpd-hero__media.cmpd-hero__media--hasimg::before,
        .cmpd-hero__media.cmpd-hero__media--hasimg::after {
            content: none;
        }

        /* image natural height, no crop */
        .cmpd-hero__media.cmpd-hero__media--hasimg .cmpd-hero__img {
            width: 100%;
            height: auto;
            display: block;
            object-fit: contain;
            filter: contrast(1.05) saturate(1.04);
        }

    /* no-image fallback fits card nicely */
    .cmpd-hero__media.cmpd-hero__media--noimg {
        min-height: 180px;
        border-radius: 14px;
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: none;
    }

    .cmpd-hero__fallback {
        min-height: 180px;
    }

    /* content uses same card; remove extra padding & glow */
    .cmpd-hero__content {
        padding: 0;
    }

        .cmpd-hero__content::after {
            content: "";
            position: absolute;
            right: -70px;
            top: -70px;
            width: 180px;
            height: 180px;
            background: rgba(255,42,42,0.10);
            filter: blur(36px);
            pointer-events: none;
        }

    .cmpd-title {
        margin: 2px 0 8px;
    }
}

/* extra small safety */
@media (max-width: 360px) {
    .cmpd__inner {
        padding-inline: 12px;
    }

    .cmpd-hero {
        padding: 12px;
    }
}
