/*
Theme Name: CSDF
Theme URI: https://csdf.cz
Description: Česká a Slovenská Databáze Filmů – WordPress šablona
Version: 1.0
Author: CSDF
Text Domain: csdf
*/

:root {
    --csdf-red: #b71c1c;
    --csdf-red-dark: #8e0000;
    --csdf-red-light: #e53935;
    --csdf-bg: #f5f5f5;
    --csdf-white: #ffffff;
    --csdf-text: #1a1a1a;
    --csdf-text-light: #666;
    --csdf-text-muted: #999;
    --csdf-border: #e0e0e0;
    --csdf-shadow: 0 1px 3px rgba(0,0,0,0.08);
    --csdf-shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
    --csdf-container: 1260px;
    --csdf-radius: 4px;
    --csdf-gap: 16px;
    --csdf-font: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.csdf-container {
    max-width: var(--csdf-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.csdf-header {
    background: var(--csdf-red);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.csdf-header__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 52px;
}

.csdf-logo {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    transition: transform 0.2s, opacity 0.2s;
}

.csdf-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.csdf-logo:active { transform: scale(0.97); }

.csdf-logo small {
    font-size: 11px;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    margin-left: 2px;
}

/* Search wrapper for autocomplete positioning */
.csdf-search-wrap {
    position: relative;
    flex: 1;
    max-width: 480px;
}

.csdf-search {
    display: flex;
    flex: 1;
}

.csdf-search input {
    flex: 1;
    padding: 7px 14px;
    border: none;
    border-radius: var(--csdf-radius) 0 0 var(--csdf-radius);
    font-size: 14px;
    font-family: var(--csdf-font);
    outline: none;
}

.csdf-search input::placeholder { color: #aaa; }

.csdf-search button {
    padding: 7px 16px;
    background: var(--csdf-red-dark);
    color: #fff;
    border: none;
    border-radius: 0 var(--csdf-radius) var(--csdf-radius) 0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--csdf-font);
    transition: background 0.15s;
}

.csdf-search button:hover { background: #6d0000; }

/* ===== AUTOCOMPLETE DROPDOWN ===== */
.csdf-autocomplete {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 var(--csdf-radius) var(--csdf-radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 2000;
    max-height: 420px;
    overflow-y: auto;
}

.csdf-ac__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    transition: background 0.1s;
    border-bottom: 1px solid #f0f0f0;
    color: var(--csdf-text);
}

.csdf-ac__item:last-child { border-bottom: none; }
.csdf-ac__item:hover { background: #f8f8f8; }

.csdf-ac__img {
    width: 36px;
    height: 52px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}

.csdf-ac__img--empty {
    background: linear-gradient(145deg, #e8e8e8, #d5d5d5);
}

.csdf-ac__info { flex: 1; min-width: 0; }

.csdf-ac__title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.csdf-ac__meta {
    font-size: 11px;
    color: var(--csdf-text-muted);
}

.csdf-ac__rating {
    background: var(--csdf-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.csdf-ac__empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--csdf-text-muted);
}

/* Hamburger animated → X */
.csdf-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
    width: 32px;
    height: 32px;
    position: relative;
}

.csdf-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    left: 6px;
    transition: all 0.3s ease;
}

.csdf-hamburger span:nth-child(1) { top: 8px; }
.csdf-hamburger span:nth-child(2) { top: 15px; }
.csdf-hamburger span:nth-child(3) { top: 22px; }

.csdf-hamburger.open span:nth-child(1) { top: 15px; transform: rotate(45deg); }
.csdf-hamburger.open span:nth-child(2) { opacity: 0; }
.csdf-hamburger.open span:nth-child(3) { top: 15px; transform: rotate(-45deg); }

/* ===== NAVIGATION ===== */
.csdf-nav { display: flex; align-items: center; margin-left: auto; }
.csdf-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.csdf-nav ul li { margin: 0; position: relative; }

.csdf-nav ul > li > a {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--csdf-radius);
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.csdf-nav ul > li > a:hover,
.csdf-nav ul > li.current-menu-item > a {
    color: #fff;
    background: rgba(255,255,255,0.12);
}

/* Arrow SVG */
.csdf-arrow {
    width: 10px;
    height: 6px;
    flex-shrink: 0;
    opacity: 0.5;
    transition: transform 0.2s;
}

/* Desktop: show submenu on hover, no gap, no blink */
.csdf-nav ul li > ul.sub-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    padding: 8px;
    padding-top: 12px;
    z-index: 1000;
    display: none;
    columns: 2;
    column-gap: 4px;
    max-height: 70vh;
    overflow-y: auto;
    transition: opacity 0.15s, visibility 0.15s;
    width: max-content;
    min-width: 280px;
}

.csdf-nav ul li > ul.sub-menu li {
    break-inside: avoid;
    display: block;
}

.csdf-nav ul li:hover > ul.sub-menu {
    visibility: visible;
    opacity: 1;
    display: block;
}

.csdf-nav ul li:hover > a .csdf-arrow {
    transform: rotate(180deg);
    opacity: 0.8;
}

.csdf-nav ul li ul.sub-menu li a {
    color: var(--csdf-text);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    display: block;
    transition: background 0.1s, color 0.1s;
}

.csdf-nav ul li ul.sub-menu li a:hover {
    background: var(--csdf-red);
    color: #fff;
}

/* Hide submenu arrow SVGs */
.csdf-nav ul li ul.sub-menu li .csdf-arrow { display: none; }

/* Dropdown scrollbar */
.csdf-nav ul li > ul.sub-menu::-webkit-scrollbar { width: 4px; }
.csdf-nav ul li > ul.sub-menu::-webkit-scrollbar-track { background: transparent; }
.csdf-nav ul li > ul.sub-menu::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.csdf-nav ul li > ul.sub-menu::-webkit-scrollbar-thumb:hover { background: #999; }

/* ===== BREADCRUMBS ===== */
.csdf-breadcrumbs {
    padding: 12px 0;
    font-size: 13px;
    color: var(--csdf-text-muted);
}

.csdf-breadcrumbs a {
    color: var(--csdf-text-light);
    transition: color 0.15s;
}

.csdf-breadcrumbs a:hover { color: var(--csdf-red); }
.csdf-breadcrumbs .sep { margin: 0 6px; color: #ccc; }

/* ===== SECTION TITLES s červenou linkou ===== */
.csdf-section { margin-bottom: 32px; }

.csdf-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--csdf-red);
}

.csdf-section__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--csdf-text);
}

.csdf-section__link {
    font-size: 13px;
    color: var(--csdf-red);
    font-weight: 500;
}

.csdf-section__link:hover { color: var(--csdf-red-dark); }

/* ===== FILM GRID ===== */
.csdf-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--csdf-gap);
}

/* ===== FILM CARD ===== */
.csdf-card {
    background: var(--csdf-white);
    border-radius: var(--csdf-radius);
    overflow: hidden;
    box-shadow: var(--csdf-shadow);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.csdf-card:hover {
    box-shadow: var(--csdf-shadow-hover);
    transform: translateY(-2px);
}

.csdf-card__poster {
    position: relative;
    aspect-ratio: 2/3;
    background: #ddd;
    overflow: hidden;
}

.csdf-card__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.csdf-card:hover .csdf-card__poster img { transform: scale(1.03); }

/* Play overlay on hover */
.csdf-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 1;
}

.csdf-card__play svg {
    width: 48px;
    height: 48px;
    fill: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    transform: scale(0.8);
    transition: transform 0.25s;
}

.csdf-card:hover .csdf-card__play {
    opacity: 1;
}

.csdf-card:hover .csdf-card__play svg {
    transform: scale(1);
}

/* Placeholder — čistý šedý, žádná ikonka */
.csdf-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #e8e8e8, #d0d0d0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.csdf-card__placeholder span {
    color: #b0b0b0;
    font-size: 11px;
    text-align: center;
    padding: 10px;
}

/* Rating badge */
.csdf-card__rating {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--csdf-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 3px;
    line-height: 1;
    z-index: 2;
}

.csdf-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: rgba(255,255,255,0.8);
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 2px;
    z-index: 2;
}

.csdf-card__info {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.csdf-card__title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.csdf-card__title a:hover { color: var(--csdf-red); }

.csdf-card__meta {
    font-size: 11px;
    color: var(--csdf-text-muted);
    margin-top: auto;
}

.csdf-card__meta a:hover { color: var(--csdf-red); }

/* ===== MAIN ===== */
.csdf-main { padding: 24px 0 40px; flex: 1; }

/* ===== BOX CONTAINER ===== */
.box {
    background: var(--csdf-white);
    border: 1px solid var(--csdf-border);
    border-radius: var(--csdf-radius);
    padding: 16px;
    margin-bottom: 16px;
}

.box-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--csdf-red);
}

.box-h h2 { font-size: 16px; color: var(--csdf-text); margin: 0; }
.box-h .more { font-size: 12px; color: var(--csdf-text-muted); }
.box-h .more:hover { color: var(--csdf-red); }

/* ===== FILM DETAIL ===== */
.film-top { display: flex; gap: 20px; }
.film-poster { flex-shrink: 0; width: 170px; }
.film-poster img {
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}
.film-meta { flex: 1; min-width: 0; }
.film-meta h1 { font-size: 24px; margin-bottom: 2px; }
.film-meta h1 .y { font-weight: 400; color: var(--csdf-text-muted); font-size: 18px; }
.film-sub { font-size: 13px; color: var(--csdf-text-muted); font-style: italic; margin-bottom: 10px; }

.film-rtg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    background: var(--csdf-red);
    padding: 7px 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.film-genres { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.film-genres a { color: var(--csdf-red) !important; font-size: 13px; font-weight: 600; }
.film-genres a:not(:last-child)::after { content: ' / '; color: var(--csdf-text-muted); font-weight: 400; }

.film-line { font-size: 13px; color: var(--csdf-text-light); margin-bottom: 3px; }
.film-line b { color: var(--csdf-text); }
.film-line a { color: var(--csdf-red); }
.film-line a:hover { text-decoration: underline; }

.film-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.film-tags a {
    background: var(--csdf-bg);
    color: var(--csdf-text-light) !important;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    border: 1px solid var(--csdf-border);
    transition: all 0.15s;
}
.film-tags a:hover { border-color: var(--csdf-red); color: var(--csdf-red) !important; }

.film-desc { line-height: 1.75; font-size: 14px; color: var(--csdf-text-light); }
.film-desc p { margin-bottom: 0.8em; }
.film-desc p:last-child { margin-bottom: 0; }

/* Breadcrumbs */
.crumb { font-size: 12px; color: var(--csdf-text-muted); margin-bottom: 14px; }
.crumb a { color: var(--csdf-text-light); }
.crumb a:hover { color: var(--csdf-red); }

/* Premieres */
.prem {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 5px 0;
    color: var(--csdf-text-light);
    border-bottom: 1px solid var(--csdf-bg);
}
.prem:last-child { border: none; }
.prem strong { color: var(--csdf-text); }
.prem .dist { color: var(--csdf-text-muted); font-size: 12px; }

/* Poster placeholder */
.csdf-detail__poster-placeholder {
    width: 100%;
    aspect-ratio: 2/3;
    background: linear-gradient(145deg, #e8e8e8, #d0d0d0);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b0b0;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}
/* ===== PAGINATION ===== */
.csdf-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.csdf-pagination a,
.csdf-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    border-radius: var(--csdf-radius);
    background: var(--csdf-white);
    border: 1px solid var(--csdf-border);
    transition: all 0.15s;
}

.csdf-pagination a:hover { border-color: var(--csdf-red); color: var(--csdf-red); }
.csdf-pagination .current { background: var(--csdf-red); color: #fff; border-color: var(--csdf-red); }

/* ===== ARCHIVE HEADER ===== */
.csdf-archive-header {
    background: var(--csdf-white);
    border: 1px solid var(--csdf-border);
    border-radius: var(--csdf-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.csdf-archive-header__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.csdf-archive-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 2px;
}

.csdf-archive-header p { margin: 0; }

.csdf-archive-header__count {
    font-size: 13px;
    color: var(--csdf-text-muted);
    margin-top: 4px;
}

/* Sort buttons */
.csdf-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.csdf-sort__label {
    font-size: 13px;
    color: var(--csdf-text-muted);
    white-space: nowrap;
}

.csdf-sort__options {
    display: flex;
    gap: 4px;
}

.csdf-sort__btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--csdf-border);
    border-radius: var(--csdf-radius);
    color: var(--csdf-text-light);
    background: var(--csdf-bg);
    transition: all 0.15s;
    white-space: nowrap;
}

.csdf-sort__btn:hover {
    border-color: var(--csdf-red);
    color: var(--csdf-red);
}

.csdf-sort__btn--active {
    background: var(--csdf-red);
    color: #fff;
    border-color: var(--csdf-red);
}

.csdf-sort__btn--active:hover {
    background: var(--csdf-red-dark);
    color: #fff;
}

/* ===== BROWSE GRID (roky, žánry) ===== */
.csdf-browse-group {
    margin-bottom: 24px;
}

.csdf-browse-group__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--csdf-border);
}

.csdf-browse-group__head h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--csdf-text);
    margin: 0;
}

.csdf-browse-group__count {
    font-size: 12px;
    color: var(--csdf-text-muted);
}

.csdf-browse-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.csdf-browse-grid--wide {
    gap: 10px;
}

.csdf-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--csdf-bg);
    border: 1px solid var(--csdf-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--csdf-text);
    transition: all 0.15s;
    text-decoration: none;
}

.csdf-browse-btn:hover {
    border-color: var(--csdf-red);
    color: var(--csdf-red);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.csdf-browse-btn__label {
    font-weight: 600;
}

.csdf-browse-btn__count {
    font-size: 11px;
    color: var(--csdf-text-muted);
    background: rgba(0,0,0,0.04);
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 500;
}

.csdf-browse-btn:hover .csdf-browse-btn__count {
    background: rgba(183,28,28,0.08);
    color: var(--csdf-red);
}

/* Genre buttons - wider */
.csdf-browse-btn--genre {
    padding: 12px 18px;
    font-size: 14px;
}

.csdf-browse-btn--genre .csdf-browse-btn__count {
    font-size: 12px;
    padding: 3px 9px;
}

@media (max-width: 520px) {
    .csdf-browse-btn { padding: 6px 10px; font-size: 12px; }
    .csdf-browse-btn--genre { padding: 9px 12px; font-size: 13px; }
    .csdf-browse-grid { gap: 6px; }
}

/* ===== FOOTER ===== */
.csdf-footer {
    background: var(--csdf-white);
    border-top: 1px solid var(--csdf-border);
    margin-top: auto;
    padding: 0;
}

.csdf-footer__widgets {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 40px;
    padding: 32px 0;
}

.csdf-footer-widget__title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--csdf-text);
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.csdf-footer-widget {
    font-size: 14px;
    color: var(--csdf-text-light);
    line-height: 1.7;
}

.csdf-footer-widget p {
    margin: 0;
}

.csdf-footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.csdf-footer-widget ul li {
    margin-bottom: 6px;
}

.csdf-footer-widget ul li a {
    color: var(--csdf-text-light);
    transition: color 0.15s;
    font-size: 14px;
}

.csdf-footer-widget ul li a:hover {
    color: var(--csdf-red);
}

.csdf-footer__bottom {
    border-top: 1px solid var(--csdf-border);
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: var(--csdf-text-muted);
}

.csdf-footer__bottom a {
    color: var(--csdf-text-light);
}

.csdf-footer__bottom a:hover { color: var(--csdf-red); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .csdf-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .csdf-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .csdf-header__inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px; }
    .csdf-search-wrap { order: 3; max-width: 100%; width: 100%; }
    .csdf-hamburger { display: block; }
    .csdf-nav { display: none; }
    .csdf-nav.active {
        display: block;
        width: 100%;
        order: 4;
        padding-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.15);
    }
    .csdf-nav.active ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
        display: flex;
    }
    .csdf-nav.active ul > li > a {
        padding: 12px 14px;
        width: 100%;
        border-radius: 0;
        font-size: 14px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .csdf-nav.active .csdf-arrow {
        opacity: 0.5;
        transition: transform 0.25s;
    }
    .csdf-nav.active li.sub-open > a > .csdf-arrow {
        transform: rotate(180deg);
    }
    /* Mobile submenu hidden by default */
    .csdf-nav.active ul li > ul.sub-menu {
        visibility: visible;
        opacity: 1;
        position: static;
        display: none;
        background: rgba(0,0,0,0.12);
        box-shadow: none;
        padding: 4px 0;
        margin-top: 0;
        padding-top: 4px;
        border-radius: 0;
        min-width: 0;
        width: 100%;
        max-height: 50vh;
        overflow-y: auto;
        columns: 1;
    }
    .csdf-nav.active ul li > ul.sub-menu li { width: auto; }
    .csdf-nav.active ul li.sub-open > ul.sub-menu {
        display: block;
    }
    .csdf-nav.active ul li ul.sub-menu li a {
        color: rgba(255,255,255,0.7);
        padding: 10px 14px 10px 28px;
        font-size: 13px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        border-radius: 0;
    }
    .csdf-nav.active ul li ul.sub-menu li a:hover {
        color: #fff;
        background: rgba(255,255,255,0.06);
    }
    .film-top { flex-direction: column; align-items: center; text-align: center; }
    .film-poster { width: 130px; }
    .film-rtg { margin: 0 auto 10px; }
    .film-genres { justify-content: center; }
    .film-line { text-align: left; }
    .csdf-archive-header__top { flex-direction: column; }
    .csdf-sort { flex-wrap: wrap; }
    .csdf-sort__options { flex-wrap: wrap; }
    .csdf-section__title { font-size: 17px; }
    .csdf-footer__widgets { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 520px) {
    .csdf-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .csdf-container { padding: 0 12px; }
    .box { padding: 10px; }
    .csdf-card__title { font-size: 12px; }
    .csdf-card__meta { font-size: 10px; }
    .csdf-card__info { padding: 8px; }
    .csdf-section__header, .box-h { flex-direction: column; align-items: flex-start; gap: 4px; }
}
