/* ================================================
   VideoHub — Main Stylesheet
   Font: DM Sans throughout (no Playfair)
   Theme: Red / Magenta / Pink
   ================================================ */

:root {
    --red:        #E31B3A;
    --magenta:    #C2185B;
    --pink:       #F06292;
    --pink-light: #FCE4EC;
    --pink-pale:  #FFF0F3;
    --accent:     #FF4081;

    --bg:         #FFFFFF;
    --bg-alt:     #FFF8FA;
    --text:       #1A0A0F;
    --text-muted: #7A4A55;
    --text-light: #C2899A;
    --border:     #F5D0D8;
    --shadow:     rgba(195,24,91,.10);

    --max-width:  960px;
    --radius:     6px;
    --radius-sm:  4px;

    --font: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--red); text-decoration: none; transition: color .2s; }
a:hover { color: var(--magenta); }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
main { flex: 1; }

/* ── Layout ── */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* ── Header ── */
.site-header {
    background: #fff;
    border-bottom: 2px solid var(--red);
    position: sticky; top: 0; z-index: 100;
    width: 100%;
    box-shadow: 0 2px 12px var(--shadow);
}
.header-inner {
    max-width: var(--max-width); margin: 0 auto;
    padding: 0 16px;
    display: flex; align-items: center; gap: 24px;
    height: 56px;
}
.site-logo {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font);
    font-size: 1.2rem; font-weight: 800;
    color: var(--text); white-space: nowrap; flex-shrink: 0;
}
.site-logo em { color: var(--red); font-style: normal; }
.logo-icon {
    background: linear-gradient(135deg, var(--red), var(--magenta));
    color: #fff; width: 28px; height: 28px;
    border-radius: 6px; display: flex;
    align-items: center; justify-content: center; font-size: .8rem;
}
.site-logo:hover { color: var(--text); }

.site-nav {
    display: flex; align-items: center; gap: 2px;
    flex: 1; overflow-x: auto; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
    color: var(--text-muted); font-size: .8rem; font-weight: 500;
    padding: 6px 10px; border-radius: var(--radius-sm);
    white-space: nowrap; transition: background .15s, color .15s;
}
.site-nav a:hover, .site-nav a.active {
    background: var(--pink-light); color: var(--red);
}

.nav-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 6px; margin-left: auto;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
}

/* ── Footer ── */
.site-footer {
    background: linear-gradient(135deg, #1A0A0F 0%, #3D0A1E 100%);
    color: rgba(255,255,255,.75); width: 100%; margin-top: 48px;
}
.footer-inner {
    max-width: var(--max-width); margin: 0 auto;
    padding: 36px 16px 28px;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
.footer-brand .site-logo { color: #fff; }
.footer-brand .site-logo em { color: var(--pink); }
.footer-brand .logo-icon { background: linear-gradient(135deg,var(--pink),var(--accent)); }
.footer-brand p { margin-top: 10px; font-size: .8rem; opacity: .6; line-height: 1.7; }
.footer-links h4 { font-size: .88rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-links ul li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,.5); font-size: .8rem; }
.footer-links a:hover { color: var(--pink); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom-inner {
    max-width: var(--max-width); margin: 0 auto;
    padding: 12px 16px; text-align: center;
    font-size: .73rem; opacity: .4;
}

/* ── Section Header ── */
.section-header {
    display: flex; align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px; padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.section-title { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.section-title span { color: var(--red); }
.view-all {
    font-size: .74rem; font-weight: 700; color: var(--red);
    text-transform: uppercase; letter-spacing: .05em;
    display: flex; align-items: center; gap: 3px;
}
.view-all::after { content: '→'; }
.view-all:hover { color: var(--magenta); }

/* ══════════════════════════════════════════════
   VIDEO GRID — Home & Category
   960px → 5 columns max
   ══════════════════════════════════════════════ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* ── Video Card ── */
.video-card { display: block; color: var(--text); text-decoration: none; width: 100%; }

.video-thumb {
    position: relative; width: 100%; aspect-ratio: 16/9;
    background: var(--pink-light); border-radius: var(--radius-sm);
    overflow: hidden; margin-bottom: 6px;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.badge-unavailable {
    position: absolute; bottom: 4px; left: 4px;
    background: rgba(0,0,0,.72); color: #fff;
    font-size: .56rem; font-weight: 700;
    padding: 2px 4px; border-radius: 3px;
    text-transform: uppercase; letter-spacing: .04em;
}

.video-title {
    font-size: .72rem; font-weight: 600; line-height: 1.35;
    color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 3px;
}
.video-category {
    font-size: .64rem; color: var(--red);
    font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; margin-bottom: 2px;
}
.video-meta { display: flex; flex-direction: column; gap: 1px; }
.video-date, .video-views { font-size: .62rem; color: var(--text-light); }

/* ── Page Sections ── */
.page-section { margin-bottom: 30px; }

/* ── Hero ── */
.page-hero {
    background: linear-gradient(135deg, var(--red) 0%, var(--magenta) 50%, #AD1457 100%);
    padding: 22px 0 18px; margin-bottom: 26px; width: 100%;
}
.page-hero-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }
.page-hero h1 { font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1.2; }
.page-hero p  { color: rgba(255,255,255,.8); font-size: .84rem; margin-top: 4px; }

/* ── Category header ── */
.category-header-bar {
    background: linear-gradient(135deg, var(--red), var(--magenta));
    color: #fff; padding: 20px 0; margin-bottom: 22px; width: 100%;
}
.category-header-bar-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }
.category-header-bar h1 { font-size: 1.4rem; font-weight: 800; }
.category-header-bar p  { font-size: .82rem; opacity: .8; margin-top: 3px; }

/* ── Category page ── */
.category-page { max-width: var(--max-width); margin: 0 auto; padding: 0 16px 40px; }
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

/* ══════════════════════════════════════════════
   WATCH PAGE
   ══════════════════════════════════════════════ */
.watch-layout {
    max-width: var(--max-width); margin: 20px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 20px; align-items: start;
}

.watch-player-wrap {
    background: #000; border-radius: var(--radius);
    overflow: hidden; aspect-ratio: 16/9; margin-bottom: 12px;
}
.watch-player-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

.watch-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
.watch-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: .76rem; color: var(--text-muted);
    margin-bottom: 12px; flex-wrap: wrap;
}
.watch-meta .cat-badge {
    background: var(--pink-light); color: var(--red);
    padding: 3px 9px; border-radius: 20px;
    font-weight: 700; font-size: .7rem;
}
.watch-desc-box {
    background: var(--bg-alt); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 14px;
    font-size: .82rem; color: var(--text-muted);
    line-height: 1.7; margin-bottom: 20px;
}

/* Related — 4 columns max */
.related-section h3 {
    font-size: .92rem; font-weight: 700;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

/* ── Sidebar — full-width thumb (column is 200px), stacked layout ── */
.watch-sidebar .section-header { margin-bottom: 8px; }
.watch-sidebar .section-title { font-size: .86rem; }

.sidebar-videos { display: flex; flex-direction: column; gap: 0; }

/* Each sidebar item — full width stacked: image on top, text below */
.sidebar-video {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    gap: 0;
}
.sidebar-video:last-child { border-bottom: none; }
.sidebar-video:hover .sidebar-title { color: var(--red); }

/* Full-width 16:9 thumbnail — fills the 240px sidebar column */
.sidebar-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--pink-light);
    margin-bottom: 7px;
    flex-shrink: 0;
}
.sidebar-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

.sidebar-info { width: 100%; }

.sidebar-title {
    font-size: .76rem; font-weight: 600; line-height: 1.35;
    color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 4px;
    transition: color .15s;
}
.sidebar-meta {
    display: flex; flex-direction: column; gap: 1px;
    font-size: .66rem; color: var(--text-light);
}

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 22px; border-radius: var(--radius);
    font-family: var(--font); font-size: .84rem; font-weight: 700;
    cursor: pointer; border: none;
    transition: transform .15s, box-shadow .15s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--red), var(--magenta));
    color: #fff; box-shadow: 0 2px 10px rgba(195,24,91,.3);
}
.btn-primary:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 4px 16px rgba(195,24,91,.4); }
.btn-outline { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.btn-outline:hover { background: var(--pink-light); color: var(--red); }

/* ── Load more / Pagination ── */
.load-more-wrap { text-align: center; margin-top: 22px; }
.pagination { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    font-size: .8rem; font-weight: 700;
    border: 1.5px solid var(--border); color: var(--text-muted);
}
.pagination a:hover { background: var(--pink-light); border-color: var(--pink); color: var(--red); }
.pagination .current { background: var(--red); border-color: var(--red); color: #fff; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty-state .empty-icon { font-size: 2.2rem; margin-bottom: 10px; }
.empty-state p { font-size: .84rem; }

/* ── Shared badges ── */
.badge { display: inline-block; padding: 2px 7px; border-radius: 20px; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-ep-yes { background: #E3F2FD; color: #1565C0; }
.badge-ep-no  { background: #FFF3E0; color: #E65100; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

/* 768–900px: 4 cols */
@media (max-width: 900px) {
    .video-grid, .category-grid { grid-template-columns: repeat(4, 1fr); }
    .related-grid { grid-template-columns: repeat(4, 1fr); }
    .watch-layout { grid-template-columns: 1fr 220px; }
}

/* 600–768px: 3 cols, sidebar hidden */
@media (max-width: 768px) {
    .video-grid, .category-grid { grid-template-columns: repeat(3, 1fr); }
    .related-grid { grid-template-columns: repeat(3, 1fr); }
    .watch-layout { grid-template-columns: 1fr; }
    .watch-sidebar { display: none; }
    .footer-inner { grid-template-columns: 1fr; gap: 18px; }

    .site-nav {
        display: none; position: absolute; top: 56px; left: 0; right: 0;
        background: #fff; border-bottom: 2px solid var(--red);
        flex-direction: column; padding: 6px 0; gap: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,.1);
    }
    .site-nav.open { display: flex; }
    .site-nav a { border-radius: 0; padding: 10px 20px; border-bottom: 1px solid var(--border); }
    .nav-toggle { display: flex; }
}

/* ≤480px: 2 cols */
@media (max-width: 480px) {
    .video-grid, .category-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Alerts (used on legal/contact page) ── */
.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: .83rem;
    margin-bottom: 16px;
    border-left: 4px solid;
    font-family: var(--font);
}
.alert-success { background: #E8F5E9; color: #2E7D32; border-color: #4CAF50; }
.alert-error   { background: #FFEBEE; color: #C62828; border-color: #EF5350; }

/* ── Form controls (used on legal/contact page) ── */
.form-group { margin-bottom: 16px; }
.form-control {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font); font-size: .85rem;
    color: var(--text); background: #fff;
    transition: border-color .2s; outline: none;
}
.form-control:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(227,27,58,.08); }
textarea.form-control { resize: vertical; min-height: 90px; }
