/* ==========================================================================
   Click Media | Ads Bank page
   Loads after app.css, contact.css and paid-ads.css. Prefix: cm-ab2-
   ========================================================================== */

/* ---------- Hero ---------- */
.cm-ab2-hero { position: relative; padding: calc(var(--cm-header-h) + 36px) 0 24px; }
.cm-ab2-hero::before {
    content: ''; position: absolute; inset: 0 0 auto; height: 420px; z-index: -1; pointer-events: none;
    background: radial-gradient(700px 320px at 80% 0%, rgba(139, 92, 246, .16), transparent 70%), radial-gradient(500px 280px at 0% 30%, rgba(255, 77, 109, .1), transparent 70%);
}
.cm-ab2-hero__row { display: grid; gap: 22px; align-items: end; }
.cm-ab2-hero h1 { font-size: clamp(34px, 7.4vw, 58px); font-weight: 800; letter-spacing: -.035em; margin-bottom: 14px; max-width: 820px; }
.cm-ab2-hero__lead { font-size: clamp(16.5px, 2.2vw, 18.5px); max-width: 600px; margin: 0; }
.cm-ab2-hero__row > .cm-btn { justify-self: start; }

/* ---------- Filter ---------- */
.cm-ab2-gallery { padding: 18px 0 50px; }
.cm-ab2-filter {
    position: sticky; top: 10px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; width: max-content; max-width: 100%;
    padding: 6px; margin-bottom: 24px; border-radius: 999px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(14px);
    box-shadow: var(--cm-shadow-sm), inset 0 0 0 1px var(--cm-line); transition: top .45s var(--cm-ease);
}
body:has(.cm-header.is-scrolled:not(.is-hidden)) .cm-ab2-filter { top: 74px; }
.cm-ab2-filter::-webkit-scrollbar { display: none; }
.cm-ab2-filter__btn {
    flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; font-weight: 700; font-size: 14px;
    color: var(--cm-ink-2); transition: background .25s, color .25s;
}
.cm-ab2-filter__btn span { min-width: 22px; padding: 1px 7px; border-radius: 999px; font-size: 12px; background: var(--cm-bg-2); color: var(--cm-muted); }
.cm-ab2-filter__btn:hover { background: var(--cm-bg); color: var(--cm-ink); }
.cm-ab2-filter__btn.is-active { background: var(--cm-ink); color: #fff; }
.cm-ab2-filter__btn.is-active span { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- Masonry grid ---------- */
.cm-ab2-grid { columns: 2; column-gap: 12px; }
.cm-ab2-card, .cm-ab2-cta-card { display: block; width: 100%; break-inside: avoid; margin: 0 0 12px; }
.cm-ab2-card {
    position: relative; padding: 0; text-align: left; border-radius: 20px; overflow: hidden; background: var(--cm-surface);
    box-shadow: var(--cm-shadow-sm), inset 0 0 0 1px var(--cm-line); cursor: zoom-in;
    transition: transform .5s var(--cm-ease), box-shadow .5s var(--cm-ease), opacity .4s;
    animation: cm-ab2-in .6s var(--cm-ease) both;
}
.cm-ab2-card:hover { transform: translateY(-5px); box-shadow: var(--cm-shadow); }
.cm-ab2-card.is-hidden { display: none; }
.cm-ab2-card__media { position: relative; display: block; overflow: hidden; background: var(--cm-bg-2); }
.cm-ab2-card--tall .cm-ab2-card__media { aspect-ratio: 9 / 16; }
.cm-ab2-card--portrait .cm-ab2-card__media { aspect-ratio: 4 / 5; }
.cm-ab2-card--square .cm-ab2-card__media { aspect-ratio: 1; }
.cm-ab2-card__media img, .cm-ab2-card__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--cm-ease), opacity .4s; }
.cm-ab2-card__media video { opacity: 0; }
.cm-ab2-card.is-playing video { opacity: 1; }
.cm-ab2-card:hover .cm-ab2-card__media img { transform: scale(1.05); }
.cm-ab2-card__platform { position: absolute; top: 10px; left: 10px; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--cm-ink); font-size: 15px; box-shadow: var(--cm-shadow-sm); }
.cm-ab2-card[data-platform="instagram"] .cm-ab2-card__platform { color: #E1306C; }
.cm-ab2-card[data-platform="facebook"] .cm-ab2-card__platform { color: #1877F2; }
.cm-ab2-card[data-platform="youtube"] .cm-ab2-card__platform { color: #FF0000; }
.cm-ab2-card__zoom {
    position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(13, 11, 31, .7); color: #fff; font-size: 14px; opacity: 0; transform: scale(.7); transition: opacity .3s, transform .4s var(--cm-ease);
}
.cm-ab2-card:hover .cm-ab2-card__zoom, .cm-ab2-card:focus-visible .cm-ab2-card__zoom { opacity: 1; transform: scale(1); }
.cm-ab2-card__info { display: block; padding: 12px 14px 14px; }
.cm-ab2-card__info strong { display: block; font-size: 15px; color: var(--cm-ink); line-height: 1.3; }
.cm-ab2-card__info small { display: block; font-size: 12.5px; color: var(--cm-muted); margin: 2px 0 8px; }
.cm-ab2-card__info em { display: inline-block; font-style: normal; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--cm-mint-soft); color: #0A8F74; }

.cm-ab2-cta-card {
    position: relative; overflow: hidden; padding: 24px 20px; border-radius: 20px; background: var(--cm-grad); color: rgba(255, 255, 255, .88);
    box-shadow: 0 20px 40px -18px rgba(255, 77, 109, .55); transition: transform .5s var(--cm-ease);
}
.cm-ab2-cta-card:hover { transform: translateY(-5px); }
.cm-ab2-cta-card::after { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; right: -70px; top: -70px; background: rgba(255, 255, 255, .15); }
.cm-ab2-cta-card__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .2); color: #fff; margin-bottom: 14px; }
.cm-ab2-cta-card strong { display: block; font-family: var(--cm-display); font-size: 20px; line-height: 1.2; color: #fff; margin-bottom: 6px; }
.cm-ab2-cta-card small { display: block; font-size: 14px; margin-bottom: 16px; }
.cm-ab2-cta-card__btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: #fff; color: var(--cm-ink); font-weight: 700; font-size: 14px; }
.cm-ab2-grid.is-filtered .cm-ab2-cta-card { display: none; }
.cm-ab2-empty { text-align: center; padding: 30px 0; font-weight: 600; }

/* ---------- Strip ---------- */
.cm-ab2-strip { padding: 10px 0 20px; }
.cm-ab2-strip__list { display: grid; gap: 12px; padding: 20px; border-radius: var(--cm-r-lg); background: var(--cm-surface); box-shadow: inset 0 0 0 1px var(--cm-line); }
.cm-ab2-strip__list li { display: flex; gap: 12px; align-items: flex-start; }
.cm-ab2-strip__list i { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--cm-primary-soft); color: var(--cm-primary); }
.cm-ab2-strip__list strong { display: block; color: var(--cm-ink); }
.cm-ab2-strip__list small { display: block; font-size: 14px; color: var(--cm-ink-2); }

/* ---------- Lead extras ---------- */
.cm-ab2-links { display: grid; gap: 8px; }
.cm-ab2-links a { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: var(--cm-surface); box-shadow: inset 0 0 0 1px var(--cm-line); font-weight: 700; color: var(--cm-ink); transition: transform .3s var(--cm-ease), box-shadow .3s; }
.cm-ab2-links a:hover { transform: translateX(4px); box-shadow: inset 0 0 0 1px var(--cm-primary); }
.cm-ab2-links a i:first-child { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--cm-primary-soft); color: var(--cm-primary); }
.cm-ab2-links a i:last-child { margin-left: auto; color: var(--cm-primary); font-size: 13px; }

/* ---------- Lightbox ---------- */
.cm-ab2-lightbox { padding: 0; border: 0; margin: auto; width: min(960px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: var(--cm-r-xl); background: var(--cm-surface); box-shadow: 0 40px 120px -20px rgba(13, 11, 31, .5); overflow: auto; }
.cm-ab2-lightbox::backdrop { background: rgba(13, 11, 31, .6); backdrop-filter: blur(6px); }
.cm-ab2-lightbox[open] { animation: cm-ab2-pop .45s var(--cm-ease); }
.cm-ab2-lightbox__shell { position: relative; display: grid; }
.cm-ab2-lightbox__close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); box-shadow: var(--cm-shadow-sm); font-size: 18px; transition: transform .4s var(--cm-ease), background .25s, color .25s; }
.cm-ab2-lightbox__close:hover { transform: rotate(90deg); background: var(--cm-ink); color: #fff; }
.cm-ab2-lightbox__media { display: grid; place-items: center; background: #0D0B1F; max-height: 62dvh; }
.cm-ab2-lightbox__media img, .cm-ab2-lightbox__media video { max-width: 100%; max-height: 62dvh; object-fit: contain; }
.cm-ab2-lightbox__info { padding: 22px; }
.cm-ab2-lightbox__platform { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 6px 12px; border-radius: 999px; background: var(--cm-bg); font-weight: 700; font-size: 13px; color: var(--cm-ink); }
.cm-ab2-lightbox h2 { font-size: clamp(22px, 4vw, 28px); margin-bottom: 14px; }
.cm-ab2-lightbox__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; }
.cm-ab2-lightbox__meta div { padding: 10px 12px; border-radius: 12px; background: var(--cm-bg); }
.cm-ab2-lightbox__meta dt { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--cm-muted); }
.cm-ab2-lightbox__meta dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; color: var(--cm-ink); }
.cm-ab2-lightbox__nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--cm-muted); }
.cm-ab2-lightbox__nav button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cm-bg); color: var(--cm-ink); transition: background .25s, color .25s; }
.cm-ab2-lightbox__nav button:hover { background: var(--cm-ink); color: #fff; }

/* ---------- Breakpoints ---------- */
@media (min-width: 600px) {
    .cm-ab2-grid { columns: 3; column-gap: 16px; }
    .cm-ab2-card, .cm-ab2-cta-card { margin-bottom: 16px; }
    .cm-ab2-strip__list { grid-template-columns: repeat(3, 1fr); padding: 24px 28px; gap: 20px; }
}

@media (min-width: 900px) {
    .cm-ab2-hero__row { grid-template-columns: 1fr auto; gap: 40px; }
    .cm-ab2-hero__row > .cm-btn { justify-self: end; margin-bottom: 6px; }
    .cm-ab2-grid { columns: 4; column-gap: 18px; }
    .cm-ab2-card, .cm-ab2-cta-card { margin-bottom: 18px; }
    .cm-ab2-lightbox__shell { grid-template-columns: 1.2fr 1fr; }
    .cm-ab2-lightbox__media { max-height: none; min-height: 560px; border-radius: var(--cm-r-xl) 0 0 var(--cm-r-xl); }
    .cm-ab2-lightbox__media img, .cm-ab2-lightbox__media video { max-height: 80dvh; }
    .cm-ab2-lightbox__info { padding: 56px 32px 32px; align-self: center; }
}

/* ---------- Keyframes ---------- */
@keyframes cm-ab2-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes cm-ab2-pop { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
