/*
Theme Name: CasinoOtzyvy Dark
Theme URI: https://casinootzyvy777.ru/
Author: casinootzyvy777
Description: Тёмная тема для сайта-отзовика, без jQuery и внешних запросов.
Version: 2.2
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: dark, review, two-columns, responsive-layout, custom-logo
Text Domain: casinootzyvy-dark
*/

/* =========================================================
   1. Токены
   ========================================================= */
:root {
    --bg: #0e1013;
    --surface: #16191f;
    --surface-2: #1c2027;
    --surface-3: #232830;
    --border: #272c35;
    --border-soft: #1f242b;

    --text: #e6e8ec;
    --text-dim: #a3abb8;
    --text-faint: #767e8b;
    --heading: #f4f6f8;

    --gold: #f3b73c;
    --gold-soft: #f7c963;
    --gold-deep: #c9922a;
    --gold-dim: rgba(243, 183, 60, .14);
    --green: #46c68b;
    --red: #ee6a6a;

    --radius-s: 8px;
    --radius: 12px;
    --radius-l: 16px;

    --container: 1440px;
    --gutter: clamp(14px, 3vw, 32px);

    --ease: cubic-bezier(.4, 0, .2, 1);
    --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold);

    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
@media (max-width: 600px) { body { font-size: 16px; } }

img, svg, video, iframe { max-width: 100%; height: auto; }
img { border-radius: var(--radius-s); }

/* =========================================================
   2. Типографика
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading);
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.25;
    
    overflow-wrap: break-word;
}
h1 { font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.3rem); margin-top: 0; letter-spacing: -.025em; line-height: 1.18; }
h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.65rem); }
h3 { font-size: clamp(1.13rem, 1rem + .5vw, 1.3rem); }
h4 { font-size: 1.06rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--gold-soft); text-decoration: none; transition: color .18s var(--ease); }
a:hover { color: var(--gold); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

ul, ol { padding-left: 1.25em; margin: 0 0 1.2em; }
li { margin-bottom: .4em; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2.4rem 0; }

code { background: var(--surface-2); padding: .15em .4em; border-radius: 5px; color: var(--gold-soft); font-size: .92em; }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px; overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    white-space: nowrap;
}
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 999;
    background: var(--gold); color: #12141a; font-weight: 600;
    padding: .6rem 1rem; border-radius: var(--radius-s);
}
.skip-link:focus { top: 12px; color: #12141a; }

/* =========================================================
   3. Раскладка
   ========================================================= */
.site-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.site-content { padding: 24px 0 56px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-items: start; }
@media (min-width: 1100px) {
    .layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; }
}
.site-main { min-width: 0; }

/* =========================================================
   4. Шапка
   ========================================================= */
.site-header {
    position: relative; z-index: 60;
    background: var(--bg);
    border-bottom: 1px solid var(--border-soft);
}
.header-flex { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.site-branding { display: flex; align-items: center; min-width: 0; margin-right: auto; }
.site-title { margin: 0; font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.site-title a, .site-title { color: var(--heading); }
.site-title a:hover { color: var(--gold); }
.custom-logo, .custom-logo-link img { max-height: 44px; width: auto; border-radius: 6px; }

.main-navigation ul { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.main-navigation li { margin: 0; position: relative; }
.main-navigation a {
    display: block; padding: .55rem .8rem; border-radius: var(--radius-s);
    color: var(--text-dim); font-size: .98rem; font-weight: 500; line-height: 1.3;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.main-navigation a:hover { color: var(--heading); background: var(--surface-2); }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current-post-ancestor > a { color: var(--gold); background: var(--gold-dim); }

.main-navigation ul ul {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; z-index: 5;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 6px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }

.menu-toggle {
    display: none; width: 44px; height: 44px; padding: 0; flex: none;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-s); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.menu-toggle .line {
    display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px;
    transition: transform .22s var(--ease), opacity .18s var(--ease);
}
.menu-toggle[aria-expanded="true"] .line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .line:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu-toggle { display: flex; }
.main-navigation {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 90vw);
    background: var(--surface); border-left: 1px solid var(--border);
    padding: 64px 14px 20px; overflow-y: auto; z-index: 90;
    transform: translateX(100%); transition: transform .24s var(--ease);
}
.main-navigation.toggled { transform: none; box-shadow: -20px 0 60px rgba(0, 0, 0, .55); }
.main-navigation ul { flex-direction: column; align-items: stretch; gap: 2px; }
.main-navigation a { padding: .8rem .85rem; font-size: 1.02rem; }
.main-navigation ul ul {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; background: transparent;
    padding: 0 0 0 14px; margin: 2px 0 6px;
    border-left: 2px solid var(--border); border-radius: 0;
}
.nav-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(8, 9, 11, .6);
    opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s;
}
body.nav-open .nav-overlay { opacity: 1; visibility: visible; }
.nav-close {
    position: absolute; top: 14px; right: 14px;
    width: 40px; height: 40px; display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-s); color: var(--text); font-size: 1.1rem; cursor: pointer;
}

/* =========================================================
   5. Карточки записей
   ========================================================= */
.posts-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
    margin: 0 0 8px;
}
.section-title { font-size: 1.3rem; margin: 2rem 0 1rem; display: flex; align-items: center; gap: 14px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.post-card {
    display: flex; flex-direction: column; height: 100%;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.post-card:hover { border-color: #3b424f; transform: translateY(-2px); }
.post-card-link { display: block; height: 100%; color: inherit; }
.post-card-link:hover { color: inherit; }

.post-card-thumbnail { aspect-ratio: 4 / 3; background: var(--surface-2); }
.post-card-thumbnail img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; }

.post-card-content { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-title { font-weight: 650; font-size: 1.03rem; line-height: 1.35; color: var(--heading); margin: 0; }
.post-card-excerpt { font-size: .93rem; color: var(--text-dim); line-height: 1.55; margin: 0; }
.post-card-meta { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* =========================================================
   7. Запись / страница
   ========================================================= */
.entry {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: clamp(16px, 2.6vw, 34px);
    overflow-wrap: break-word;
}
.entry-header { margin-bottom: 18px; }
.entry-header .entry-title { margin: 0 0 10px; }
.entry-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    color: var(--text-faint); font-size: .88rem;
}
.entry-meta a { color: var(--text-dim); }

.post-thumbnail { margin: 0 0 22px; }
.post-thumbnail img { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--radius); }

.entry-content > *:first-child { margin-top: 0; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(243, 183, 60, .4); }
.entry-content a:hover { text-decoration-color: var(--gold); }
.entry-content figure { margin: 1.4rem 0; max-width: 100%; }
.entry-content figcaption { font-size: .87rem; color: var(--text-faint); margin-top: .5rem; }
.entry-content iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 0; }

.entry-content blockquote {
    margin: 1.7rem 0; padding: 1rem 1.2rem;
    background: var(--surface-2); border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    color: var(--text-dim);
}
.entry-content .advice, .entry-content .note {
    margin: 1.7rem 0; padding: 1rem 1.2rem;
    background: var(--gold-dim); border: 1px solid rgba(243, 183, 60, .25);
    border-radius: var(--radius);
}

.table-scroll { overflow-x: auto; margin: 1.6rem 0; border-radius: var(--radius); border: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 0; }
.entry-content th, .entry-content td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); }
.entry-content th { background: var(--surface-2); color: var(--heading); font-weight: 650; white-space: nowrap; }
.entry-content tbody tr:last-child td { border-bottom: 0; }

.entry-footer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.tags-links { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; }
.tags-links a {
    background: var(--surface-2); border: 1px solid var(--border);
    padding: 3px 10px; border-radius: 999px; color: var(--text-dim); text-decoration: none;
}
.tags-links a:hover { color: var(--gold); border-color: rgba(243, 183, 60, .4); }

.breadcrumbs {
    font-size: .85rem; color: var(--text-faint); margin-bottom: 14px;
    display: flex; flex-wrap: wrap; align-items: center;
}
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs span + span::before { content: '/'; margin: 0 .5em; color: var(--text-faint); }
.breadcrumbs .is-current { color: var(--text-faint); }

.page-hero { margin-bottom: 20px; }
.page-hero .page-title { margin: 0 0 8px; }
.page-hero .archive-description { color: var(--text-dim); }

/* =========================================================
   8. Отзывы и комментарии
   ========================================================= */
.reviews {
    margin-top: 26px;
    padding: 0;
    scroll-margin-top: 20px;
}
.reviews-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.reviews-title { margin: 0; font-size: 1.3rem; }

.comment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.comment-list .children {
    list-style: none; margin: 12px 0 0; padding: 0 0 0 clamp(12px, 3vw, 28px);
    display: grid; gap: 12px; border-left: 2px solid var(--border);
}
.comment-list li { margin: 0; }

.review {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(14px, 2vw, 20px);
    overflow-wrap: break-word;
}
.review.is-official { border-color: rgba(70, 198, 139, .35); }

.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar {
    width: 44px; height: 44px; flex: none; border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700; font-size: 1.05rem; color: #12141a; text-transform: uppercase;
}
.review-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.review-ident { min-width: 0; }
.review-author { font-weight: 650; color: var(--heading); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-badge {
    font-size: .7rem; font-weight: 700;
    background: rgba(70, 198, 139, .15); color: var(--green);
    border: 1px solid rgba(70, 198, 139, .3);
    padding: 1px 7px; border-radius: 999px;
}
.review-date { font-size: .8rem; color: var(--text-faint); }
.review-body { color: var(--text); }
.review-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: .85rem; }
.review-actions .reply a {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--border); border-radius: 999px;
    color: var(--text-dim); font-size: .85rem; padding: .28rem .8rem; text-decoration: none;
}
.review-actions .reply a:hover { color: var(--gold); border-color: rgba(243, 183, 60, .4); }

.reviews-empty {
    text-align: center; color: var(--text-dim);
    padding: 24px 16px; border: 1px dashed var(--border); border-radius: var(--radius);
}
.reviews-empty strong { display: block; color: var(--heading); margin-bottom: 4px; }


/* =========================================================
   9. Форма отзыва (поля добавляет плагин)
   ========================================================= */
.review-form-wrap{margin-top:26px;padding:clamp(16px,2.6vw,30px);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-l)}
.review-form-wrap.is-first{margin-top:0}
.comment-respond { scroll-margin-top: 20px; }
.comment-reply-title { margin: 0 0 14px; font-size: 1.15rem; }
.comment-reply-title small { font-size: .8rem; font-weight: 400; margin-left: 10px; }

.comment-form { display: grid; gap: 14px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; font-size: .87rem; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.comment-form .required { color: var(--gold); }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form input[type="tel"],
.comment-form textarea,
.comment-form select {
    width: 100%; max-width: 100%;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-s);
    color: var(--text); font: inherit; font-size: 16px;
    padding: .7rem .85rem;
    transition: border-color .16s var(--ease), background .16s var(--ease);
}
.comment-form textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.comment-form input:focus, .comment-form textarea:focus {
    outline: none; border-color: var(--gold); background: var(--surface);
    box-shadow: 0 0 0 3px rgba(243, 183, 60, .12);
}
.comment-form ::placeholder { color: var(--text-faint); }

@media (min-width: 720px) {
    .comment-form .comment-form-author,
    .comment-form .comment-form-email { display: inline-block; width: calc(50% - 7px); vertical-align: top; }
    .comment-form .comment-form-author { margin-right: 10px; }
}


.comment-form .comment-form-cookies-consent label { font-size: .86rem; color: var(--text-faint); font-weight: 400; display: flex; align-items: center; gap: 8px; margin: 0; }
.comment-form input[type="checkbox"] { width: auto; accent-color: var(--gold); }

.form-submit { margin: 0 !important; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn,
.form-submit input[type="submit"],
.comment-form input[type="submit"] {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--gold); color: #12141a;
    border: 0; border-radius: var(--radius-s);
    font: inherit; font-weight: 650; font-size: 1rem;
    padding: .75rem 1.5rem; cursor: pointer;
    transition: background .16s var(--ease), transform .12s var(--ease);
}
.btn:hover, .form-submit input[type="submit"]:hover { background: var(--gold-soft); color: #12141a; transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); color: var(--heading); border-color: #3b424f; }

.form-hint { font-size: .82rem; color: var(--text-faint); margin: 0; }
.form-notice { padding: .8rem 1rem; border-radius: var(--radius-s); font-size: .93rem; border: 1px solid transparent; }
.form-notice.is-error { background: rgba(238, 106, 106, .1); border-color: rgba(238, 106, 106, .35); color: #ffb3b3; }
.form-notice.is-success { background: rgba(70, 198, 139, .1); border-color: rgba(70, 198, 139, .35); color: #9ff0c9; }
.logged-in-as, .must-log-in { font-size: .9rem; color: var(--text-dim); }

/* =========================================================
   10. Сайдбар и виджеты
   ========================================================= */
.widget-area { display: grid; gap: 18px; min-width: 0; }
@media (min-width: 1100px) { .widget-area { position: sticky; top: 20px; } }
.widget {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; min-width: 0;
}
.widget-title { margin: 0 0 12px; font-size: 1rem; color: var(--heading); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { margin: 0; padding: .5rem 0; border-bottom: 1px solid var(--border-soft); font-size: .93rem; }
.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget a { color: var(--text-dim); }
.widget a:hover { color: var(--gold); }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
    flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-s); color: var(--text); font: inherit; font-size: 16px; padding: .6rem .8rem;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--gold); }
.search-form button { flex: none; }

/* =========================================================
   11. Пагинация, подвал, пустые страницы
   ========================================================= */
.pagination { margin: 28px 0 0; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers {
    min-width: 42px; height: 42px; padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-s); color: var(--text-dim);
    font-size: .95rem; font-weight: 550; text-decoration: none;
}
.pagination .page-numbers:hover { color: var(--gold); border-color: rgba(243, 183, 60, .4); }
.pagination .page-numbers.current { background: var(--gold); border-color: var(--gold); color: #12141a; }
.pagination .dots { border-color: transparent; background: transparent; }

.site-footer {
    border-top: 1px solid var(--border); background: var(--surface);
    padding: 26px 0; color: var(--text-faint); font-size: .9rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer-navigation ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; }
.footer-navigation li { margin: 0; }
.footer-navigation a { color: var(--text-dim); font-size: .9rem; }
.footer-navigation a:hover { color: var(--gold); }

.no-results { text-align: center; padding: 44px 20px; }
.no-results .search-form { max-width: 420px; margin: 20px auto 0; }
