﻿/* =========================================
   CampaignView - Index (Public)
   Theme: Solid black + red accents (NO gradients)
   Single column cards (one per line)
   Image: FULL WIDTH + NO CROP (shows whole image)
   ========================================= */

:root {
    --home-bg: #0b0b0f;
    --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-border2: rgba(255,255,255,0.18);
    --home-red: #ff2a2a;
    --home-card: rgba(255,255,255,0.04);
    --home-radius: 18px;
    --home-shadow: 0 18px 55px rgba(0,0,0,0.55);
    --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 (SVG masks) */
    --i-count: 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");
    --i-open: 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-tap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 11V7a2 2 0 1 1 4 0v4' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M12 11V6a2 2 0 1 1 4 0v6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M16 12V8a2 2 0 1 1 4 0v8c0 3-2 5-5 5H12c-2 0-3-1-4-3l-2-4' 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-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");
    /* FIXED arrow icon (your previous SVG had a broken path) */
    --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h12' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M13 6l6 6-6 6' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='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-empty: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 7h16v10H4z' 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 13h7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.cmp {
    min-width: 320px;
    color: var(--home-text);
    background: transparent;
    padding: clamp(18px, 3vw, 28px) 0 clamp(46px, 6vw, 74px);
}

.cmp__inner {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 24px;
}

@media (max-width:520px) {
    .cmp__inner {
        padding-inline: 14px;
    }
}

/* -----------------------------------------
   Hero
----------------------------------------- */
.cmp-hero {
    border-radius: var(--home-radius);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--home-border);
    box-shadow: var(--home-shadow2);
    padding: 18px;
    overflow: hidden;
    position: relative;
}

    .cmp-hero::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;
    }

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.10);
    transition: transform 220ms var(--home-ease), border-color 220ms var(--home-ease);
    position: relative;
    z-index: 1;
}

    .kicker:hover {
        transform: translateY(-1px);
        border-color: rgba(255,255,255,0.16);
    }

.kicker__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--home-red);
    box-shadow: 0 0 0 4px rgba(255,42,42,0.14);
}

.kicker__text {
    font-weight: 900;
    letter-spacing: .2px;
    font-size: 13px;
    color: rgba(255,255,255,0.88);
}

.cmp-hero__title {
    margin: 14px 0 8px;
    font-size: clamp(28px, 4.2vw, 36px);
    letter-spacing: -0.03em;
    line-height: 1.06;
    position: relative;
    z-index: 1;
}

.cmp-hero__text {
    margin: 0;
    max-width: 78ch;
    color: var(--home-muted);
    font-size: clamp(13.5px, 1.7vw, 16px);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.cmp-metaRow {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* Pills */
.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-count);
    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;
        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--count {
    --pill-icon: var(--i-count);
}

.pill__icon--open {
    --pill-icon: var(--i-open);
}

.pill__icon--tap {
    --pill-icon: var(--i-tap);
}

.pill__text {
    font-size: 13px;
    font-weight: 850;
    color: rgba(255,255,255,0.86);
}

/* -----------------------------------------
   Toasts
----------------------------------------- */
.cmp-toast {
    margin-top: 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);
}

.cmp-toast__dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--home-red);
    box-shadow: 0 0 0 4px rgba(255,42,42,0.14);
    flex: 0 0 auto;
}

.cmp-toast--success .cmp-toast__dot {
    background: #2ee58c;
    box-shadow: 0 0 0 4px rgba(46,229,140,0.14);
}

.cmp-toast--info .cmp-toast__dot {
    background: rgba(255,255,255,0.75);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.12);
}

.cmp-toast__text {
    color: rgba(255,255,255,0.88);
    font-weight: 750;
    font-size: 13.5px;
}

/* -----------------------------------------
   Section
----------------------------------------- */
.cmp-section {
    margin-top: 16px;
}

.cmp-section__head {
    margin: 14px 0 12px;
}

.cmp-section__title {
    margin: 0;
    font-size: clamp(18px, 2.2vw, 22px);
    letter-spacing: -0.01em;
}

/* -----------------------------------------
   Grid (single column)
----------------------------------------- */
.cmp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

/* -----------------------------------------
   Card
----------------------------------------- */
.cmp-card {
    border: 1px solid var(--home-border);
    background: rgba(255,255,255,0.04);
    border-radius: var(--home-radius);
    box-shadow: 0 16px 40px rgba(0,0,0,0.30);
    overflow: hidden;
    position: relative;
    isolation: isolate;
    transition: transform 180ms var(--home-ease-fast), border-color 180ms var(--home-ease-fast), background-color 180ms var(--home-ease-fast), box-shadow 180ms var(--home-ease-fast);
}

    .cmp-card:hover {
        transform: translateY(-3px);
        border-color: rgba(255,42,42,0.34);
        background: rgba(255,255,255,0.05);
        box-shadow: 0 24px 70px rgba(0,0,0,0.52);
    }

    .cmp-card:focus-within {
        box-shadow: 0 0 0 4px rgba(255,42,42,0.20), 0 24px 70px rgba(0,0,0,0.52);
        border-color: rgba(255,42,42,0.45);
    }

/* -----------------------------------------
   Media (FULL IMAGE, NO CROP)
   - Default aspect ratio 16/9 (before image loads)
   - JS will set aspect-ratio to naturalWidth/naturalHeight
----------------------------------------- */
.cmp-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: var(--media-ar, 16/9);
    background: rgba(0,0,0,0.22);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
}

.cmp-card__img {
    width: 100%;
    height: 100%;
    display: block;
    /* Key: show the whole image (no cropping) */
    object-fit: contain;
    object-position: center;
    /* optional subtle polish */
    background: rgba(0,0,0,0.25);
}

/* Fallback */
.cmp-card__fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    position: relative;
}

    .cmp-card__fallback::before {
        content: "";
        width: 64px;
        height: 64px;
        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);
    }

    .cmp-card__fallback::after {
        content: "";
        position: absolute;
        width: 28px;
        height: 28px;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-count) center/contain no-repeat;
        mask: var(--i-count) center/contain no-repeat;
    }

/* Badge */
.cmp-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.30);
    backdrop-filter: blur(8px);
}

.cmp-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.cmp-badge--open {
    border-color: rgba(46,229,140,0.30);
}

    .cmp-badge--open .cmp-badge__dot {
        background: #2ee58c;
        box-shadow: 0 0 0 4px rgba(46,229,140,0.14);
    }

.cmp-badge--closed {
    border-color: rgba(255,255,255,0.16);
}

    .cmp-badge--closed .cmp-badge__dot {
        background: rgba(255,255,255,0.72);
        box-shadow: 0 0 0 4px rgba(255,255,255,0.10);
    }

/* Content */
.cmp-card__content {
    padding: 16px;
}

.cmp-card__titleRow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.cmp-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.cmp-card__titleLink {
    color: rgba(255,255,255,0.94);
    text-decoration: none;
}

    .cmp-card__titleLink:hover {
        color: rgba(255,255,255,0.98);
        text-decoration: underline;
        text-decoration-color: rgba(255,42,42,0.60);
    }

.cmp-card__desc {
    margin: 10px 0 0;
    color: var(--home-muted);
    font-size: 13.5px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cmp-card__meta {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: grid;
    gap: 8px;
}

.cmp-metaLine {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cmp-metaIcon {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255,42,42,0.12);
    border: 1px solid rgba(255,42,42,0.32);
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

    .cmp-metaIcon::before {
        content: "";
        width: 12px;
        height: 12px;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-cal) center/contain no-repeat;
        mask: var(--i-cal) center/contain no-repeat;
    }

.cmp-metaIcon--cal::before {
    -webkit-mask: var(--i-cal) center/contain no-repeat;
    mask: var(--i-cal) center/contain no-repeat;
}

.cmp-metaIcon--loc::before {
    -webkit-mask: var(--i-loc) center/contain no-repeat;
    mask: var(--i-loc) center/contain no-repeat;
}

.cmp-metaText {
    color: rgba(255,255,255,0.80);
    font-weight: 750;
    font-size: 13px;
    overflow-wrap: anywhere;
}

/* Actions */
.cmp-card__actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cmp-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);
}

    .cmp-btn:hover {
        transform: translateY(-1px);
        border-color: rgba(255,42,42,0.32);
    }

.cmp-btn__icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}

    .cmp-btn__icon::before {
        content: "";
        width: 16px;
        height: 16px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-arrow) center/contain no-repeat;
        mask: var(--i-arrow) center/contain no-repeat;
    }

.cmp-btn__icon--details::before {
    -webkit-mask: var(--i-arrow) center/contain no-repeat;
    mask: var(--i-arrow) center/contain no-repeat;
}

.cmp-btn__icon--reg::before {
    -webkit-mask: var(--i-reg) center/contain no-repeat;
    mask: var(--i-reg) center/contain no-repeat;
}

.cmp-btn__icon--lock::before {
    -webkit-mask: var(--i-lock) center/contain no-repeat;
    mask: var(--i-lock) center/contain no-repeat;
}

.cmp-btn--ghost {
    background: rgba(0,0,0,0.18);
}

.cmp-btn--primary {
    background: rgba(255,42,42,0.16);
    border-color: rgba(255,42,42,0.40);
}

    .cmp-btn--primary:hover {
        background: rgba(255,42,42,0.22);
        border-color: rgba(255,42,42,0.65);
    }

.cmp-btn--disabled {
    opacity: .55;
    border-color: rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    cursor: not-allowed;
}

/* -----------------------------------------
   Empty
----------------------------------------- */
.cmp-empty {
    grid-column: 1 / -1;
}

.cmp-emptyCard {
    border: 1px dashed rgba(255,255,255,0.18);
    border-radius: var(--home-radius);
    background: rgba(255,255,255,0.03);
    padding: 18px;
    text-align: center;
}

.cmp-emptyIcon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 16px;
    background: rgba(255,42,42,0.10);
    border: 1px solid rgba(255,42,42,0.30);
    display: grid;
    place-items: center;
    box-shadow: 0 14px 28px rgba(0,0,0,0.35);
}

    .cmp-emptyIcon::before {
        content: "";
        width: 22px;
        height: 22px;
        display: block;
        background: rgba(255,255,255,0.92);
        -webkit-mask: var(--i-empty) center/contain no-repeat;
        mask: var(--i-empty) center/contain no-repeat;
    }

.cmp-emptyTitle {
    font-weight: 950;
    letter-spacing: .2px;
    margin-bottom: 6px;
}

.cmp-emptySub {
    color: var(--home-muted);
    font-size: 13px;
}

/* -----------------------------------------
   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);
    }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cmp-card,
    .pill,
    .kicker,
    .cmp-btn,
    .reveal {
        transition: none !important;
        animation: none !important;
    }
}
