/* ===========================================================================
   Captixa — caption style gallery (/styles, views/site/styles.php).
   Page-only cxst- classes; the hero, sections and final CTA come from
   captixa-site.css (cxs-).
   =========================================================================== */

.cxst-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; font-size: 14.5px; font-weight: 600; color: var(--text-secondary); }
.cxst-facts i { margin-right: 6px; color: var(--accent); }

/* ---------- sticky category filter ---------- */
.cxst-filter {
    position: sticky; top: var(--header-height, 64px); z-index: 20;
    background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border-light);
}
.cxst-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; }
.cxst-chips::-webkit-scrollbar { display: none; }
.cxst-chip {
    flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer;
    font: 600 14px/1 var(--font-sans); color: var(--text-secondary); transition: all var(--transition-fast, .15s);
}
.cxst-chip span { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.cxst-chip:hover { border-color: var(--primary); color: var(--text); }
.cxst-chip.is-on { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.cxst-chip.is-on span { color: rgba(255,255,255,.7); }
.cxst-divider { flex: none; width: 1px; margin: 4px 6px; background: var(--border-strong); }

/* ---------- "building blocks" divider between templates and effects ---------- */
.cxst-tier { margin-top: 56px; padding: 56px 0 8px; border-top: 1px solid var(--border-light); background: var(--surface-1); text-align: center; }
.cxst-tier[hidden] { display: none; }
.cxst-tier h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 8px 0 12px; }
.cxst-tier p { max-width: 640px; margin: 0 auto; color: var(--text-secondary); }
.cxst-tier ~ .cxst-group { background: var(--surface-1); }

/* ---------- category sections ---------- */
.cxst-group { padding: 64px 0 24px; scroll-margin-top: 140px; }
.cxst-group[hidden] { display: none; }
.cxst-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 26px; }
.cxst-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cxst-head h2 span { margin-left: 8px; font-size: .95rem; font-weight: 600; letter-spacing: 0; color: var(--text-muted); }
.cxst-head p { margin: 0; max-width: 520px; color: var(--text-secondary); }

.cxst-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px 18px; }
.cxst-card { display: flex; flex-direction: column; min-width: 0; }
.cxst-media {
    position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: 16px; overflow: hidden;
    background: var(--surface-dark); cursor: pointer; box-shadow: var(--shadow-md);
    transition: transform .2s ease, box-shadow .2s ease;
}
.cxst-media:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg, 0 18px 40px -12px rgba(16,18,27,.35)); }
.cxst-media:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.cxst-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.cxst-play {
    position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: rgba(12,12,16,.62); color: #fff; font-size: 13px; opacity: .85; transition: opacity .2s, background .2s;
}
.cxst-media:hover .cxst-play { opacity: 1; background: var(--primary); color: var(--primary-ink); }
.cxst-meta { padding: 12px 2px 0; }
.cxst-meta h3 { margin: 0; font-size: 1rem; line-height: 1.3; }
.cxst-meta h3 .cxs-tag { margin-left: 4px; vertical-align: 2px; font-size: 10px; }
.cxst-meta p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }

.cxst-note { max-width: 820px; margin: 0 auto; text-align: center; font-size: 14px; color: var(--text-muted); }
.cxst-empty { max-width: 560px; margin: 0 auto; text-align: center; }
.cxst-empty .cxs-ico { margin-inline: auto; }

/* ---------- watch with sound ---------- */
.cxst-modal { position: fixed; inset: 0; margin: auto; height: fit-content; width: min(920px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 22px; background: var(--surface-2); color: var(--text); box-shadow: 0 40px 100px -20px rgba(0,0,0,.5); }
.cxst-modal::backdrop { background: rgba(12,12,16,.72); backdrop-filter: blur(4px); }
.cxst-modal-box { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 22px; }
.cxst-modal video { display: block; height: min(78vh, 720px); aspect-ratio: 9 / 16; border-radius: 14px; background: #000; }
.cxst-modal-copy h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.cxst-modal-copy p { color: var(--text-secondary); margin-bottom: 22px; }
.cxst-close {
    position: absolute; top: 12px; right: 12px; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 16px;
}
.cxst-close:hover { background: var(--surface-hover); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) { .cxst-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) {
    .cxst-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cxst-modal-box { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 18px; }
    .cxst-modal video { height: min(62vh, 560px); }
}
@media (max-width: 640px) {
    .cxst-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .cxst-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
    .cxst-group { padding-top: 44px; }
    .cxst-meta p { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .cxst-media, .cxst-media:hover { transition: none; transform: none; }
}
