/*
Theme Name: dds_labeytespectacle.com
Theme URI: https://labeytespectacle.com/
Author: Попов Мирон
Author URI: https://labeytespectacle.com/
Description: Тема для информационного сайта о театре и цирке. Современная театрально-цирковая эстетика с элементами ар-деко.
Version: 1.1
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: labey-spectacle
*/

/* ==========================================================================
   Сброс и базовые правила
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.7;
    color: #F5F0E6;
    background-color: #121212;
    background-image:
        radial-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px),
        radial-gradient(rgba(245, 240, 230, 0.015) 1px, transparent 1px);
    background-size: 40px 40px, 25px 25px;
    background-position: 0 0, 12px 12px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: #D4AF37;
    text-decoration: none;
    transition: color .25s ease;
}
a:hover { color: #E63946; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;
    line-height: 1.2;
    color: #F5F0E6;
    margin: 0 0 .6em;
    letter-spacing: .01em;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.55rem; }
h4 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

blockquote {
    margin: 1.5em 0;
    padding: 1.2em 1.6em;
    border-left: 4px solid #D4AF37;
    background: #6A040F;
    color: #F5F0E6;
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    line-height: 1.5;
    border-radius: 0 6px 6px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    border: 1px solid #D4AF37;
}
th, td {
    padding: .7em .9em;
    border: 1px solid #D4AF37;
    text-align: left;
}
th {
    background: #1D3557;
    color: #D4AF37;
    font-family: 'Playfair Display', Georgia, serif;
}

/* ==========================================================================
   Контейнер и сетка
   ========================================================================== */
.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
}

.layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin: 32px auto;
}

.layout--with-aside .layout-main { flex: 0 0 67%; min-width: 0; }
.layout--with-aside .layout-aside { flex: 0 0 27%; min-width: 0; }
.layout--full .layout-main { flex: 0 0 85%; margin: 0 auto; min-width: 0; }
.layout--wide .layout-main { width: 85%; margin: 0 auto; min-width: 0; }

@media (max-width: 960px) {
    .layout { flex-direction: column; gap: 28px; }
    .layout--with-aside .layout-main,
    .layout--with-aside .layout-aside,
    .layout--full .layout-main,
    .layout--wide .layout-main { flex: none; width: 100%; }
}

/* ==========================================================================
   Шапка (занавес)
   ========================================================================== */
.site-header {
    position: relative;
    background: linear-gradient(180deg, #0e0e0e 0%, #181818 100%);
    border-bottom: 2px solid #D4AF37;
    padding: 22px 0 18px;
}
.site-header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -8px;
    height: 8px;
    background: linear-gradient(180deg, #D4AF37 0%, transparent 100%);
    opacity: .25;
    pointer-events: none;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}
.brand-logo,
.brand-svg {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}
.brand-svg { color: #D4AF37; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #F5F0E6;
    letter-spacing: .02em;
}
.brand-tagline {
    font-size: .82rem;
    color: rgba(245, 240, 230, .65);
    margin-top: 2px;
}

.synonym-strip {
    display: flex;
    justify-content: center;
    gap: 22px;
    padding: 6px 0 14px;
    font-family: 'Playfair Display', Georgia, serif;
    color: #D4AF37;
    font-size: .95rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.synonym-strip span {
    transition: opacity .4s ease;
}
.synonym-strip span::after {
    content: '·';
    margin-left: 22px;
    color: #6A040F;
}
.synonym-strip span:last-child::after { content: ''; margin: 0; }

/* Навигация шапки */
.primary-nav { flex: 1 1 auto; }
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 26px;
}
.primary-nav a {
    color: #F5F0E6;
    font-weight: 600;
    font-size: .98rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a {
    color: #D4AF37;
    border-bottom-color: #E63946;
}

.menu-toggle[hidden] { display: none !important; }
.menu-toggle {
    display: none;
    background: transparent;
    border: 2px solid #D4AF37;
    color: #D4AF37;
    padding: 10px 14px;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .1em;
    text-transform: uppercase;
}

@media (max-width: 960px) {
    .menu-toggle { display: inline-block; }
    .primary-nav { flex-basis: 100%; display: none; }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
    .primary-nav li { border-bottom: 1px solid rgba(212, 175, 55, .2); }
    .primary-nav a { display: block; padding: 14px 4px; }
}

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn {
    display: inline-block;
    background: #D4AF37;
    color: #121212;
    padding: 16px 32px;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    cursor: pointer;
    border: none;
    -webkit-clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
    clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
    transition: transform .2s ease, background-color .2s ease, color .2s ease;
    text-decoration: none;
}
.btn:hover {
    transform: translateY(2px);
    background: #E63946;
    color: #FFFFFF;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: #D4AF37;
    padding: 12px 24px;
    border: 2px solid #D4AF37;
    border-radius: 0;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    cursor: pointer;
    text-decoration: none;
    transition: color .2s ease;
}
.btn-secondary:hover {
    color: #E63946;
    text-decoration: underline;
    text-underline-offset: 4px;
    background: transparent;
}

/* ==========================================================================
   Хлебные крошки
   ========================================================================== */
.crumbs {
    margin: 22px 0 6px;
    font-size: .9rem;
    color: rgba(245, 240, 230, .65);
}
.crumbs a { color: #D4AF37; }
.crumbs a:hover { color: #E63946; }
.crumbs .crumbs-sep { margin: 0 .5em; color: #6A040F; }

/* ==========================================================================
   Карточки записей
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 32px;
    margin: 24px 0;
}

.card {
    display: flex;
    flex-direction: column;
    background: #1A1A1A;
    border: 1px solid rgba(212, 175, 55, .25);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: transform .25s ease, border-color .25s ease;
}
.card:hover {
    transform: translateY(-4px);
    border-color: #D4AF37;
}
.card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0; right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(212, 175, 55, .12) 0%, transparent 100%);
    pointer-events: none;
    transition: top .6s ease;
    z-index: 1;
}
.card:hover::before { top: 0; }

.card .cat-stripe {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 4px;
    background: #D4AF37;
    z-index: 2;
}
.card .cat-stripe.cat-teatr { background: #D4AF37; }
.card .cat-stripe.cat-cirk { background: #E63946; }
.card .cat-stripe.cat-novosti { background: #1D3557; }
.card .cat-stripe.cat-trendy { background: #6A040F; }
.card .cat-stripe.cat-intervyu { background: #F5F0E6; }

.card-thumb-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}
.card-thumb-wrap a {
    display: block;
    position: absolute;
    inset: 0;
}
.card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.card:hover .card-thumb-wrap img { transform: scale(1.05); }

.card-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1D3557 0%, #6A040F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D4AF37;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 800;
}

.card-body {
    flex: 1;
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.card-meta {
    font-size: .8rem;
    color: rgba(245, 240, 230, .55);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.card-meta a { color: #D4AF37; }
.card-meta .cat-tag { color: #E63946; }

.card-title {
    font-size: 1.3rem;
    margin: 0 0 12px;
    line-height: 1.3;
}
.card-title a {
    color: #F5F0E6;
}
.card-title a:hover { color: #D4AF37; }

.card-excerpt {
    color: rgba(245, 240, 230, .8);
    font-size: .98rem;
    margin-bottom: 16px;
    flex: 1;
}
.card-excerpt p { margin: 0 0 0.5em; background: none; }

.card-actions { margin-top: auto; }

/* Цирковая сетка для главной */
.circus-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    margin: 24px 0;
}
.circus-grid .card-main { grid-row: span 3; }
.circus-grid .card-main .card-thumb-wrap { aspect-ratio: 16 / 11; }
.circus-grid .card-main .card-title { font-size: 2rem; }

@media (max-width: 960px) {
    .circus-grid { grid-template-columns: 1fr; }
    .circus-grid .card-main { grid-row: auto; }
}

/* ==========================================================================
   Главная страница — тематические блоки
   ========================================================================== */
.theme-block {
    margin: 56px 0;
    padding: 40px 36px;
    background: linear-gradient(135deg, #1A1A1A 0%, #0e0e0e 100%);
    border-left: 4px solid #D4AF37;
    border-radius: 0 6px 6px 0;
    position: relative;
    overflow: hidden;
}
.theme-block::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, .08) 0%, transparent 70%);
    pointer-events: none;
}
.theme-block-eyebrow {
    color: #E63946;
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .15em;
    margin-bottom: 8px;
}
.theme-block h2 { margin-bottom: 18px; }

.theme-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 24px;
}
@media (max-width: 800px) {
    .theme-columns { grid-template-columns: 1fr; }
}
.theme-col h3 {
    color: #D4AF37;
    font-size: 1.2rem;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, .25);
}
.theme-col p { color: rgba(245, 240, 230, .85); margin: 0; }

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin-top: 24px;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }
.step {
    padding: 22px;
    background: #0e0e0e;
    border: 1px solid rgba(212, 175, 55, .2);
    position: relative;
}
.step-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    color: #E63946;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
}
.step h4 { font-size: 1.05rem; margin-bottom: 6px; }
.step p { font-size: .92rem; color: rgba(245, 240, 230, .75); margin: 0; }

/* ==========================================================================
   Сайдбар и виджеты
   ========================================================================== */
.layout-aside {
    background: #1D3557;
    padding: 28px 24px;
    border-top: 3px solid #D4AF37;
}
.widget {
    margin-bottom: 32px;
}
.widget:last-child { margin-bottom: 0; }
.widget-title {
    font-family: 'Playfair Display', Georgia, serif;
    color: #D4AF37;
    font-size: 1.2rem;
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #6A040F;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(245, 240, 230, .08);
}
.widget ul li:last-child { border: none; }
.widget a { color: #F5F0E6; }
.widget a:hover { color: #D4AF37; }

/* ==========================================================================
   Подвал
   ========================================================================== */
.site-footer {
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 100%);
    color: rgba(245, 240, 230, .8);
    padding: 50px 0 22px;
    margin-top: 64px;
    border-top: 2px solid #D4AF37;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-bottom: 32px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col .widget-title {
    color: #D4AF37;
    border-bottom-color: #6A040F;
}
.footer-col a { color: #F5F0E6; }
.footer-col a:hover { color: #D4AF37; }
.footer-col p { color: rgba(245, 240, 230, .8); }
.footer-col ul li { border-bottom-color: rgba(212, 175, 55, .12); }

.footer-bottom {
    padding-top: 22px;
    border-top: 1px solid rgba(212, 175, 55, .2);
    text-align: center;
    font-size: .9rem;
    color: rgba(245, 240, 230, .6);
}

/* ==========================================================================
   Запись и страница
   ========================================================================== */
.entry-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #6A040F;
}
.entry-title {
    font-size: 2.4rem;
    margin-bottom: 14px;
}
@media (max-width: 600px) { .entry-title { font-size: 1.8rem; } }

.entry-meta {
    color: rgba(245, 240, 230, .6);
    font-size: .92rem;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.entry-meta a { color: #D4AF37; }

.entry-thumb {
    margin: 0 0 28px;
}
.entry-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid rgba(212, 175, 55, .2);
}

.entry-content { font-size: 1.05rem; }
.entry-content img {
    display: block;
    margin: 1.4em auto;
    border: 1px solid rgba(212, 175, 55, .15);
}
.entry-content h2 { margin-top: 1.6em; color: #D4AF37; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin-bottom: 1em; }
.entry-content li { margin-bottom: .4em; }

.entry-tags { margin: 24px 0; font-size: .9rem; }
.entry-tags a {
    display: inline-block;
    margin: 0 4px 4px 0;
    padding: 4px 10px;
    background: #6A040F;
    color: #F5F0E6;
    border-radius: 0;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.entry-tags a:hover { background: #E63946; }

/* ==========================================================================
   Комментарии
   ========================================================================== */
.comments-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #6A040F;
}
.comments-section .comments-title {
    font-size: 1.6rem;
    margin-bottom: 22px;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
}
.comment-list li.comment {
    padding: 18px 20px;
    margin-bottom: 18px;
    background: #1A1A1A;
    border-left: 3px solid #D4AF37;
}
.comment-author {
    font-weight: 700;
    color: #D4AF37;
    margin-bottom: 6px;
}
.comment-meta { font-size: .82rem; color: rgba(245, 240, 230, .55); margin-bottom: 10px; }
.comment-text p { margin: 0 0 .6em; }
.comment-list .children { list-style: none; padding-left: 28px; margin-top: 14px; }

.comment-form { display: grid; gap: 14px; }
.comment-form label {
    display: block;
    font-size: .9rem;
    color: rgba(245, 240, 230, .8);
    margin-bottom: 4px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    background: #0e0e0e;
    border: 1px solid rgba(212, 175, 55, .3);
    color: #F5F0E6;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 0;
}
.comment-form textarea { min-height: 130px; resize: vertical; }
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #D4AF37;
}

/* ==========================================================================
   Поисковая форма
   ========================================================================== */
.search-form {
    display: flex;
    gap: 0;
    max-width: 480px;
}
.search-form input[type="search"] {
    flex: 1;
    padding: 12px 16px;
    background: #0e0e0e;
    border: 1px solid rgba(212, 175, 55, .3);
    color: #F5F0E6;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 0;
}
.search-form input[type="search"]:focus { outline: none; border-color: #D4AF37; }
.search-form button {
    padding: 12px 24px;
    background: #D4AF37;
    color: #121212;
    border: none;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    cursor: pointer;
    border-radius: 0;
}
.search-form button:hover { background: #E63946; color: #FFFFFF; }

/* ==========================================================================
   Пагинация (круглые кнопки-софиты)
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0 12px;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    background: #121212;
    border: 2px solid #D4AF37;
    border-radius: 50%;
    color: #D4AF37;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
.pagination .page-numbers:hover {
    background: #D4AF37;
    color: #121212;
}
.pagination .page-numbers.current {
    background: #E63946;
    border-color: #E63946;
    color: #FFFFFF;
}
.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* ==========================================================================
   Cookie-баннер
   ========================================================================== */
.cookie-banner[hidden] { display: none !important; }
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 18px 24px;
    background: #1A1A1A;
    border: 2px solid #D4AF37;
    color: #F5F0E6;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .55);
    border-radius: 4px;
    flex-wrap: wrap;
}
.cookie-banner p {
    margin: 0;
    font-size: .95rem;
    flex: 1 1 320px;
}
.cookie-banner .btn {
    padding: 12px 26px;
    font-size: .9rem;
}

/* ==========================================================================
   Кнопка «Наверх» (суфлёр)
   ========================================================================== */
.to-top[hidden] { display: none !important; }
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 54px;
    height: 54px;
    background: #121212;
    border: 2px solid #D4AF37;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 800;
    transition: transform .2s ease, background-color .2s ease;
}
.to-top::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #D4AF37;
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(212, 175, 55, .8);
}
.to-top:hover { transform: translateY(-2px); background: #6A040F; }

.curtain-fall {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}
.curtain-fall.is-active { opacity: .85; pointer-events: auto; }

/* ==========================================================================
   404
   ========================================================================== */
.page-404 {
    text-align: center;
    padding: 60px 20px;
}
.page-404 h1 {
    font-size: 6rem;
    color: #E63946;
    margin-bottom: 0;
    line-height: 1;
}
.page-404 .lead {
    font-size: 1.3rem;
    color: rgba(245, 240, 230, .8);
    margin-bottom: 32px;
}
.page-404 .search-form { margin: 28px auto; }
.page-404 .home-link { margin-top: 20px; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 600px) {
    .wrap { padding: 0 18px; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    .theme-block { padding: 28px 22px; }
    .brand-svg, .brand-logo { width: 44px; height: 44px; }
    .brand-name { font-size: 1.1rem; }
    .brand-tagline { font-size: .75rem; }
    .synonym-strip { font-size: .8rem; gap: 14px; }
    .cookie-banner { left: 8px; right: 8px; bottom: 8px; padding: 14px 16px; }
    .to-top { right: 12px; bottom: 12px; width: 46px; height: 46px; }
    .pagination { gap: 6px; }
    .pagination .page-numbers { min-width: 38px; height: 38px; font-size: .9rem; }
}
