/*
Theme Name: Teatral
Theme URI: https://teatral.su
Author: Ваше имя
Description: Тёмная минималистичная тема для театрального сайта.
Version: 4.0
License: GPL-2.0
Text Domain: teatral
*/

/* =========================================================
 * ПЕРЕМЕННЫЕ И БАЗА (Схема 5: Янтарь + Золото)
 * ========================================================= */

:root {
    --bg:        #0a0a0a; /* Глубокий черный фон */
    --bg-soft:   #141414;
    
    --text:      #f7e8a4; /* Шампань (основной текст) */
    --text-bright: #fbbf24; /* Янтарь (заголовки) */
    --muted:     #a68a3a; /* Темное золото (роли, даты) */
    
    --border:    #2a2a2a;
    --accent:    #fde68a; /* Светлое золото (кнопки, ссылки) */
    --accent-hover: #d97706; /* Насыщенный оранжевый (при наведении) */
    
    --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.15rem; /* Крупный базовый размер */
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--accent-hover); /* Оранжевый при наведении */
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    color: var(--text-bright); /* Янтарь */
    line-height: 1.2;
    margin: 0 0 1.2rem;
    font-weight: 600;
}
h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.2em; }

/* =========================================================
 * КОНТЕЙНЕР
 * ========================================================= */

.td-container {
    max-width: 1080px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* =========================================================
 * ШАПКА
 * ========================================================= */

.site-header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    background-color: var(--bg);
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.site-title {
    font-family: var(--font);
    font-size: clamp(1.2rem, 1.6vw, 1.6rem);
    font-weight: 400;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--text-bright); /* Янтарь */
    text-decoration: none;
    margin: 0;
}
.site-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}
.site-title a:hover {
    color: var(--accent-hover);
}

/* Навигация */
.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
}
.site-nav li { margin: 0; }
.site-nav a {
    color: var(--text);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-decoration: none;
}
.site-nav a:hover {
    color: var(--accent-hover); /* Оранжевый */
}

/* =========================================================
 * ОСНОВНОЙ КОНТЕНТ (БЛОГ)
 * ========================================================= */

.site-main {
    padding: 3rem 0 4rem;
    min-height: 50vh;
}

.post-list article {
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}
.post-list h2 {
    font-size: 1.8rem;
    margin-bottom: 0.4rem;
}
.post-list h2 a {
    color: var(--text-bright);
    text-decoration: none;
}
.post-list h2 a:hover {
    color: var(--accent-hover);
}

.post-meta {
    color: var(--muted);
    font-size: 1rem;
    margin: 0.4rem 0 1.2rem;
}

.entry-content > * { margin-bottom: 1.2em; }

/* Пагинация */
.pagination {
    margin-top: 3rem;
    text-align: center;
}
.pagination .page-numbers {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    margin: 0 0.2rem;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.2s;
}
.pagination .page-numbers.current {
    color: var(--accent-hover);
    font-weight: 700;
}
.pagination .page-numbers:hover {
    color: var(--accent-hover);
}

/* =========================================================
 * ПОДВАЛ
 * ========================================================= */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    margin-top: 4rem;
    color: var(--muted);
    font-size: 1rem;
    background-color: var(--bg);
}
.site-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}
.site-footer .site-title {
    font-size: 1.15rem;
    color: var(--text-bright);
}
.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.site-footer a {
    color: var(--text);
    text-decoration: none;
}
.site-footer a:hover {
    color: var(--accent-hover);
}

/* =========================================================
 * МОБИЛЬНЫЕ
 * ========================================================= */

@media (max-width: 640px) {
    html, body { font-size: 1.05rem; }
    .site-header-inner,
    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-nav ul { gap: 1rem; }
}

/* =========================================================
 * ИСПРАВЛЕНИЕ БЛОКА ПОИСКА
 * (Убираем белый фон, делаем в стиле сайта)
 * ========================================================= */

/* Обертка формы поиска (стандартная для WP и наша кастомная) */
.wp-block-search__inside-wrapper,
.td-search-form,
.search-form {
    background-color: #1a1a1a !important; /* Темно-серый фон */
    border: 1px solid var(--border) !important;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Поле ввода (input) */
.wp-block-search__input,
.td-search-input,
input[type="search"] {
    background-color: transparent !important;
    color: var(--text) !important; /* Цвет Шампань для введенного текста */
    border: none !important;
    padding: 0.5rem 1rem;
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
}

/* Плейсхолдер (текст "Поиск по сайту...") */
.wp-block-search__input::placeholder,
.td-search-input::placeholder,
input[type="search"]::placeholder {
    color: var(--muted) !important; /* Темное золото */
    opacity: 1;
}

/* Кнопка с иконкой */
.wp-block-search__button,
.td-search-button,
.search-submit,
button[type="submit"] {
    background-color: rgba(251, 191, 36, 0.1) !important; /* Полупрозрачный янтарь */
    color: var(--text) !important; /* Иконка цвета Шампань */
    border: none !important;
    border-left: 1px solid var(--border) !important;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

/* Наведение на кнопку */
.wp-block-search__button:hover,
.td-search-button:hover,
.search-submit:hover {
    background-color: var(--accent-hover) !important; /* Оранжевый фон */
    color: #0a0a0a !important; /* Черная иконка */
}

/* Убираем обводку при фокусе, если она была */
.wp-block-search__inside-wrapper:focus-within {
    border-color: var(--accent) !important;
}