/**
 * CineFrame - responsive video player (self-contained, theme-independent).
 * @copyright (C) 2026 WebtechSolutions
 * @license GNU General Public License version 2 or later
 */
.cineframe {
    margin: 1.75rem auto;
    width: 100%;
}

.cineframe__frame {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.cineframe__frame iframe,
.cineframe__frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.cineframe__frame video {
    display: block;
    object-fit: contain;
    background: #000;
}

.cineframe--embed iframe,
.cineframe--embed video,
.cineframe--video video {
    width: 100%;
    border-radius: 8px;
    display: block;
}

/* ═══════════════════════════════════════════
   CineFrame modal lightbox
   ═══════════════════════════════════════════ */
.cf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.88);
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}
.cf-modal--open { display: flex; animation: cfFadeIn .2s ease; }
@keyframes cfFadeIn { from { opacity:0; } to { opacity:1; } }

.cf-modal__close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    font-size: 1.1rem;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    z-index: 100001;
    line-height: 1;
}
.cf-modal__close:hover { background: rgba(236,67,15,.85); border-color: transparent; }

.cf-modal__box {
    width: 100%;
    max-width: 960px;
    background: #111;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    animation: cfSlideUp .22s ease;
}
@keyframes cfSlideUp {
    from { transform: translateY(20px); opacity:0; }
    to   { transform: translateY(0);    opacity:1; }
}
.cf-modal__player {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
}
.cf-modal__player iframe,
.cf-modal__player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.cf-modal__player video { object-fit: contain; background: #000; }
.cf-modal__player > div {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
}
.cf-modal__player > div iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.cf-modal__info { padding: .9rem 1.25rem 1rem; }
.cf-modal__title { font-size: 1rem; font-weight: 700; color: #f0f0f0; margin: 0 0 .3rem; }
.cf-modal__desc  { font-size: .82rem; color: #aaa; margin: 0; line-height: 1.5; }

/* ═══════════════════════════════════════════
   CineFrame frontend pages
   ═══════════════════════════════════════════ */

/* Page wrapper */
.cf-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* Page header strip */
.cf-page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0 1.25rem;
    border-bottom: 3px solid #ec430f;
    margin-bottom: 2rem;
}
.cf-page-header__icon {
    font-size: 2.2rem;
    line-height: 1;
}
.cf-page-header__title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 .2rem;
    letter-spacing: -.02em;
}
.cf-page-header__sub {
    font-size: .85rem;
    color: #777;
    margin: 0;
}
.cf-back-link {
    font-size: .82rem;
    color: #ec430f;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    margin-right: .5rem;
    transition: opacity .15s;
}
.cf-back-link:hover { opacity: .7; }

/* ── Categories grid ── */
.cf-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.cf-cat-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: .2rem .75rem;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-top: 3px solid #ec430f;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    padding: 1.1rem 1.2rem;
    text-decoration: none;
    transition: box-shadow .2s, transform .18s, border-top-color .18s;
    cursor: pointer;
}
.cf-cat-card:hover {
    box-shadow: 0 8px 24px rgba(236,67,15,.15);
    transform: translateY(-3px);
    border-top-color: #c9360c;
}
.cf-cat-card__icon {
    grid-row: 1 / 3;
    font-size: 1.6rem;
    line-height: 1;
    opacity: .8;
}
.cf-cat-name {
    grid-column: 2;
    font-size: .92rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
}
.cf-cat-count {
    grid-column: 2;
    font-size: .76rem;
    color: #ec430f;
    font-weight: 600;
}
.cf-cat-arrow {
    grid-row: 1 / 3;
    grid-column: 3;
    font-size: 1.1rem;
    color: #ccc;
    transition: color .18s, transform .18s;
}
.cf-cat-card:hover .cf-cat-arrow {
    color: #ec430f;
    transform: translateX(3px);
}

/* ── Video grid ── */
.cf-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}
.cf-video-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.cf-video-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
    transform: translateY(-4px);
}
.cf-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    overflow: hidden;
    cursor: pointer;
}
.cf-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s, opacity .2s;
}
.cf-video-card:hover .cf-thumb img {
    transform: scale(1.04);
}
.cf-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.25);
    transition: background .2s;
}
.cf-thumb:hover .cf-play-overlay { background: rgba(0,0,0,.4); }
.cf-play-btn {
    width: 52px;
    height: 52px;
    background: rgba(236,67,15,.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    padding-left: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,.4);
    transition: transform .18s, background .18s;
}
.cf-thumb:hover .cf-play-btn {
    transform: scale(1.1);
    background: #ec430f;
}
.cf-no-thumb {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    font-size: 2.8rem;
}
.cf-video-embed {
    display: none;
    background: #000;
}
.cf-embed-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}
.cf-embed-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.cf-embed-raw {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}
.cf-embed-raw > * {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 0 !important;
}
.cf-embed-raw iframe {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
}
.cf-video-info {
    padding: .9rem 1rem .8rem;
    flex: 1;
}
.cf-video-title {
    font-size: .9rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 .35rem;
    line-height: 1.35;
}
.cf-video-desc {
    font-size: .78rem;
    color: #777;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cf-empty {
    color: #888;
    font-style: italic;
    padding: 2rem 0;
}

@media (max-width: 600px) {
    .cf-cat-grid { grid-template-columns: 1fr; }
    .cf-video-grid { grid-template-columns: 1fr; }
    .cf-page-header__title { font-size: 1.25rem; }
}
