/*
Theme Name: dds_tempanofilms.com
Author: Дмитрий Лавров
Description: Информационная тема для ресурса о создании игровых трейлеров с акцентом на киноприёмы и закулисье производства.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: tempano
*/

/* =========================================================================
   Переменные и сброс
   ====================================================================== */
:root {
    --bg:        #0c0f14;
    --bg-alt:    #11161e;
    --surface:   #161d28;
    --surface-2: #1d2633;
    --border:    #28323f;
    --text:      #e8eef5;
    --muted:     #94a2b4;
    --accent:    #54d3e6;
    --accent-2:  #7aa6ff;
    --accent-ink:#062028;
    --shell:     1180px;
    --radius:    14px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color .18s ease;
}
a:hover { color: var(--accent-2); }

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    margin: 0 0 .6em;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); }
h3 { font-size: 1.22rem; }

p { margin: 0 0 1.1em; }

/* =========================================================================
   Контейнер ширины (A12.7)
   ====================================================================== */
.shell {
    width: min(85%, var(--shell));
    margin-inline: auto;
}
@media (max-width: 700px) {
    .shell { width: 90%; }
}

/* =========================================================================
   Шапка
   ====================================================================== */
.site-header {
    background: linear-gradient(180deg, #0e131b 0%, #0b0e13 100%);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.brand-logo { display: block; width: 56px; height: 56px; flex: 0 0 auto; }
.brand-text { min-width: 0; }
.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    display: block;
}
.brand-name a { color: #fff; }
.brand-desc {
    margin: 4px 0 0;
    font-size: .82rem;
    color: var(--muted);
    line-height: 1.4;
    max-width: 540px;
}

/* Навигация */
.main-nav { margin-left: auto; }
.nav-toggle {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.main-nav a {
    display: block;
    padding: 9px 14px;
    border-radius: 9px;
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
}
.main-nav a:hover,
.main-nav .current-menu-item > a {
    background: var(--surface);
    color: var(--accent);
}

/* =========================================================================
   Основная раскладка
   ====================================================================== */
.site-main { padding: 34px 0 56px; }

.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    gap: 40px;
    align-items: start;
}
.layout-single .content-area { width: 100%; }
.layout-single { }

@media (max-width: 960px) {
    .layout-with-sidebar { grid-template-columns: 1fr; gap: 36px; }
    .layout-single .content-area { width: 100%; }
}

.content-area { min-width: 0; }

/* =========================================================================
   Хлебные крошки
   ====================================================================== */
.crumbs {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { color: #4a5870; }
.crumbs span:last-child { color: var(--text); }

/* =========================================================================
   Карточки записей (A8, A10)
   ====================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 26px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: #3a4a5e; }

.card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}
.card:hover .card-thumb img { transform: scale(1.04); }

.card-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #16202c, #0f1822);
    color: var(--accent);
}
.card-thumb-fallback svg { width: 64px; height: 64px; opacity: .55; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
}
.card-meta {
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.card-title {
    font-size: 1.18rem;
    margin: 0 0 10px;
}
.card-title a { color: #fff; }
.card-title a:hover { color: var(--accent); }
.card-excerpt {
    color: var(--muted);
    font-size: .95rem;
    margin-bottom: 16px;
}
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-more {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 600;
    font-size: .9rem;
    color: var(--accent);
}
.card-more::after { content: " ›"; }

/* =========================================================================
   Кнопки
   ====================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: filter .18s ease;
}
.btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}
.btn-ghost:hover { background: rgba(84, 211, 230, .1); color: var(--accent); }

/* =========================================================================
   Главная — секции
   ====================================================================== */
.hero {
    position: relative;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(120% 120% at 80% -10%, #16364a 0%, #0c0f14 55%);
    overflow: hidden;
}
.hero-inner {
    padding: 64px 0 70px;
    max-width: 720px;
}
.hero h1 { margin-bottom: .4em; }
.hero .lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 34px; }
.section-head p { color: var(--muted); margin: 0; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 24px;
    min-width: 0;
}
.feature .ico {
    width: 46px; height: 46px;
    color: var(--accent);
    margin-bottom: 14px;
}
.feature h3 { margin-bottom: .4em; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Слайдер */
.slider {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
}
.slides {
    position: relative;
    aspect-ratio: 16 / 7;
    min-height: 280px;
}
.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
    pointer-events: none;
}
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slide-caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 60px 30px 26px;
    background: linear-gradient(0deg, rgba(7,10,14,.92), transparent);
}
.slide-caption h3 { margin: 0 0 6px; color: #fff; }
.slide-caption p { margin: 0; color: #c7d2df; font-size: .95rem; max-width: 620px; }

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(12,15,20,.72);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-btn:hover { background: var(--accent); color: var(--accent-ink); }
.slider-prev { left: 14px; }
.slider-next { right: 14px; }

.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.slider-dots button {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.45);
    cursor: pointer;
    padding: 0;
}
.slider-dots button.is-active { background: var(--accent); }

/* Лента последних записей на главной */
.front-recent { }

/* =========================================================================
   Записи / контент
   ====================================================================== */
.entry { 
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 34px;
    min-width: 0;
}
.entry-header { margin-bottom: 22px; }
.entry-meta { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.entry-thumb {
    margin: 0 0 24px;
    border-radius: 10px;
    overflow: hidden;
}
.entry-thumb img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.02rem; }
.entry-content img { border-radius: 8px; }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote {
    margin: 1.4em 0;
    padding: 4px 22px;
    border-left: 3px solid var(--accent);
    color: var(--muted);
    font-style: italic;
}
.entry-content a { text-decoration: underline; }

.entry-footer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); }
.entry-tags a {
    display: inline-block;
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 4px 11px;
    border-radius: 20px;
    margin: 0 6px 6px 0;
    font-size: .82rem;
    color: var(--muted);
}
.entry-tags a:hover { color: var(--accent); border-color: var(--accent); }

.page-title { margin-bottom: 24px; }

/* Таблицы */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
}
.entry-content table,
.entry-content th,
.entry-content td {
    border: 1px solid var(--border);
}
.entry-content th, .entry-content td { padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--surface-2); color: #fff; }

/* =========================================================================
   Сайдбар + виджеты
   ====================================================================== */
.sidebar { min-width: 0; }
.sidebar .widget {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 22px;
    margin-bottom: 24px;
    color: var(--text);
}
.sidebar .widget-title {
    font-size: 1.05rem;
    margin: 0 0 14px;
    color: #fff;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--text); }
.sidebar .widget a:hover { color: var(--accent); }
.sidebar .widget .post-date { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }

/* =========================================================================
   Подвал
   ====================================================================== */
.site-footer {
    background: #090c11;
    border-top: 1px solid var(--border);
    padding: 48px 0 0;
    color: #c2cdda;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}
@media (max-width: 760px) {
    .footer-cols { grid-template-columns: 1fr; gap: 28px; }
}
.site-footer .widget { margin-bottom: 0; color: #c2cdda; }
.site-footer .widget-title {
    font-size: 1.02rem;
    color: #fff;
    margin: 0 0 14px;
}
.site-footer .widget p { color: #aab6c4; margin: 0 0 .8em; font-size: .93rem; }
.site-footer .widget ul { list-style: none; margin: 0; padding: 0; }
.site-footer .widget li { padding: 6px 0; }
.site-footer .widget a { color: #c2cdda; }
.site-footer .widget a:hover { color: var(--accent); }

.footer-bottom {
    margin-top: 44px;
    border-top: 1px solid var(--border);
    padding: 22px 0;
    text-align: center;
    font-size: .85rem;
    color: var(--muted);
}

/* =========================================================================
   Пагинация (D5)
   ====================================================================== */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    justify-content: center;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    font-size: .92rem;
}
.pager a.page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.pager .page-numbers.current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
.pager .page-numbers.dots {
    border: none;
    background: none;
}

/* =========================================================================
   Поиск
   ====================================================================== */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 460px;
}
.search-form .search-field {
    flex: 1;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    font-size: .95rem;
}
.search-form .search-field::placeholder { color: var(--muted); }
.search-form .search-submit {
    padding: 11px 20px;
    border: none;
    border-radius: 9px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    cursor: pointer;
}
.sidebar .search-form { max-width: none; }

/* =========================================================================
   Комментарии
   ====================================================================== */
.comments-area { margin-top: 40px; }
.comments-title, .comment-reply-title { font-size: 1.3rem; margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list ul.children { list-style: none; margin: 0 0 0 26px; padding: 0; }
.single-comment { margin-bottom: 18px; }
.comment-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
}
.comment-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.comment-author { font-weight: 700; color: #fff; }
.comment-date { font-size: .8rem; color: var(--muted); }
.comment-await { font-size: .85rem; color: var(--accent); }
.comment-reply a { font-size: .85rem; font-weight: 600; }

.comment-respond {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 26px;
}
.comment-form label { display: block; margin-bottom: 6px; font-size: .9rem; color: var(--muted); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg-alt);
    color: var(--text);
    font-family: inherit;
    font-size: .95rem;
    margin-bottom: 16px;
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.form-submit .submit {
    padding: 12px 26px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    cursor: pointer;
}

/* =========================================================================
   Контакты (статичные)
   ====================================================================== */
.contact-links { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.contact-links a { font-weight: 600; }

/* =========================================================================
   404
   ====================================================================== */
.error-404 { text-align: center; padding: 30px 0; }
.error-404 .big { font-size: clamp(4rem, 14vw, 8rem); font-weight: 800; color: var(--accent); line-height: 1; }
.error-404 .search-form { margin: 26px auto 0; }

/* =========================================================================
   Cookie-баннер (D6, A11)
   ====================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 999;
    background: var(--surface-2);
    border-top: 1px solid var(--border);
    padding: 16px 0;
}
.cookie-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
}
.cookie-inner p { margin: 0; font-size: .9rem; color: var(--text); flex: 1; min-width: 240px; }
.cookie-inner p a { text-decoration: underline; }

/* =========================================================================
   Адаптив
   ====================================================================== */
@media (max-width: 700px) {
    .nav-toggle { display: block; }
    .main-nav { width: 100%; order: 3; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 12px;
        border: 1px solid var(--border);
        border-radius: 10px;
        overflow: hidden;
    }
    .main-nav ul.is-open { display: flex; }
    .main-nav li { border-bottom: 1px solid var(--border); }
    .main-nav li:last-child { border-bottom: none; }
    .main-nav a { border-radius: 0; }
    .header-inner { padding: 14px 0; }
    .brand-desc { display: none; }
    .entry { padding: 22px 20px; }
}
