/* ==========================================================================
   site.css
   Общие стили сайта: header, главная, подборки, карточка фильма, админка
   Собрано из пользовательских inline-стилей и приведено в единый файл.
   ========================================================================== */

/* ----------------------------------
   Базовые переменные и глобальные стили
   ---------------------------------- */
:root {
    --site-accent: #f5c518;
    --site-dark: #131722;
    --site-dark-2: #1d2330;
    --site-border: #e9ecef;
    --site-bg: #f5f6f8;
    --site-text: #1d1f23;
    --site-text-muted: #6c757d;
    --site-shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.05);
    --site-shadow-card: 0 12px 35px rgba(16, 24, 40, 0.08);
}

body {
    background: var(--site-bg);
    color: var(--site-text);
  font-family: "Montserrat", sans-serif;
}

/* ----------------------------------
   Header / Navbar
   ---------------------------------- */
.site-navbar {
    background: linear-gradient(135deg, var(--site-dark), var(--site-dark-2));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    text-decoration: none;
}

.site-brand:hover {
    color: #fff;
}

.site-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--site-accent);
    color: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex: 0 0 42px;
    box-shadow: 0 6px 16px rgba(245, 197, 24, 0.3);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #fff;
}

.header-spacer {
    height: 1.25rem;
}

/* ----------------------------------
   Hero blocks
   ---------------------------------- */
.hero {
    background: linear-gradient(135deg, #151922, #232a36);
    color: #fff;
    border-radius: 0 0 1rem 1rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
}

.page-hero {
    background:
        radial-gradient(circle at top right, rgba(245, 197, 24, 0.15), transparent 25%),
        linear-gradient(135deg, #12161c, #1a2028);
    color: #fff;
    border-radius: 0 0 1rem 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.breadcrumb-imdb {
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.45);
    --bs-breadcrumb-item-active-color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
}

.breadcrumb-imdb a {
    color: rgba(255, 255, 255, 0.72);
}
#headhero {
    position: relative;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
}

#headhero::before {
    content: "";
    position: absolute;
    inset: -20px;
    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    filter: blur(12px);
    transform: scale(1.1);
    z-index: -2;
}

#headhero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
}
/* ----------------------------------
   Common cards / blocks
   ---------------------------------- */
.filter-box {

}

.poster-card,
.section-card,
.admin-card {
    background: #fff;
    border-radius: 1.25rem;
    border: 1px solid var(--site-border);
}

.poster-card,
.section-card {
    box-shadow: var(--site-shadow-card);
}

.admin-card {
    box-shadow: var(--site-shadow-soft);
}

.poster-card {
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.poster-footer,
.section-card .card-body {
    padding: 1.4rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

/* ----------------------------------
   Cards on listing page
   ---------------------------------- */
.movie-card {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    transition: 0.2s ease;
    background: #fff;
    height: 100%;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-4px);
}

.meta-line,
.review-date,
.small-note {
    color: var(--site-text-muted);
}

.meta-line {
    font-size: 0.9rem;
}

.small-note {
    font-size: 0.875rem;
}

.badge-soft {
    background: #f1f3f5;
    color: #495057;
    font-weight: 600;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ----------------------------------
   Movie page
   ---------------------------------- */
.movie-title {
    font-size: 2.2rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.92rem;
}

.meta-pill.imdb {
    background: rgba(245, 197, 24, 0.16);
    border-color: rgba(245, 197, 24, 0.28);
}

.editor-note {
    border-left: 4px solid var(--site-accent);
    background: #fffdf4;
    padding: 1rem 1rem 1rem 1.1rem;
    border-radius: 0.85rem;
}

.content-html p:last-child {
    margin-bottom: 0;
}

.side-stats {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.side-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 1rem;
    background: #f8fafc;
    border: 1px solid #edf0f3;
}

.side-stat i {
    font-size: 1.15rem;
    color: #495057;
}

.rating-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rating-item {
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #fbfcfd;
    border: 1px solid #eef1f4;
}

.rating-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.55rem;
}

.rating-name {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
}

.rating-name i {
    color: #6b7280;
    font-size: 1rem;
}

.rating-value {
    font-size: 0.9rem;
    white-space: nowrap;
}

.progress {
    height: 0.8rem;
    border-radius: 999px;
    background-color: #e9edf2;
    overflow: hidden;
}

.age-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

.age-card,
.review-card {
    border: 1px solid #edf0f3;
    border-radius: 1rem;
    padding: 1rem;
    background: #fff;
}

.age-card {
    background: #fcfdff;
    height: 100%;
}

.age-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.age-title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.review-name {
    font-weight: 700;
}

/* ----------------------------------
   Shared media placeholders
   ---------------------------------- */
.movie-poster,
.poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #e9ecef;
    display: block;
}

.poster-placeholder {
    width: 100%;
    aspect-ratio: 2 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #d9dde3, #eef1f4);
    color: #8b96a5;
}

/* Контекстные размеры, чтобы не конфликтовали */
.poster-card .poster-placeholder,
.page-hero + .container .poster-placeholder,
.page-hero ~ .container .poster-placeholder {
    font-size: 4rem;
}

.movie-card .poster-placeholder {
    font-size: 3rem;
}

/* ----------------------------------
   Admin
   ---------------------------------- */
.poster-preview {
    max-width: 180px;
    border-radius: 1rem;
    border: 1px solid var(--site-border);
}

.admin-inline-actions,
.admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-inline-actions {
    margin-top: 1rem;
}

.admin-actions {
    padding: 0 1rem 1rem;
}

.admin-inline-actions form,
.admin-actions form {
    margin: 0;
}

/* ----------------------------------
   Pagination
   ---------------------------------- */
.pagination-wrap {
    margin-top: 2rem;
}

.pagination .page-link {
    border-radius: 0.75rem !important;
    margin: 0 0.2rem;
    border: 1px solid #dee2e6;
    color: #212529;
}

.pagination .page-item.active .page-link {
    background: #212529;
    border-color: #212529;
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
}

/* ----------------------------------
   Responsive
   ---------------------------------- */
@media (min-width: 768px) {
    .age-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .movie-title {
        font-size: 2.7rem;
    }

    .age-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 767px) {
    .small-xs {
        font-size:12px;
    }
}
.movie-card {
    position: relative;
}

.movie-card .poster {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.movie-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.movie-badges .badge {
    font-size: 8px;
    padding: 5px 8px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.85);
}

.movie-badges .badge.bg-secondary {
    background: rgba(108,117,125,0.9);
    color: #fff;
}

.movie-badges .badge.bg-danger {
    background: rgba(220,53,69,0.9);
    color: #fff;
}