*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: #0073aa; text-decoration: none; }
a:hover, a:focus { color: #005177; text-decoration: underline; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 16px; line-height: 1.6; color: #222; background: #fff;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; margin: 1.5em 0 0.7em; color: #111; }
h1 { font-size: 2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; }
p { margin: 0 0 1em; }

.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

.site-header { background: #222; color: #fff; padding: 20px 0; border-bottom: 3px solid #0073aa; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; }
.site-title { color: #fff; font-size: 1.4em; font-weight: 700; text-decoration: none; }
.site-title:hover { color: #7dc8f0; text-decoration: none; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 20px; }
.main-nav a { color: #fff; font-weight: 500; text-decoration: none; padding: 5px 0; border-bottom: 2px solid transparent; transition: border-color 0.15s; }
.main-nav a:hover, .main-nav a:focus { color: #fff; border-bottom-color: #0073aa; text-decoration: none; }

.site-main { padding: 40px 0; min-height: 50vh; }
.page { max-width: 100%; }
.page-title { margin-top: 0; margin-bottom: 1em; padding-bottom: 0.3em; border-bottom: 1px solid #eee; }
.page-content img { border-radius: 3px; margin: 1em 0; }
.page-content figure { margin: 1.5em 0; max-width: 100%; }
.page-content figcaption { font-size: 0.9em; color: #666; text-align: center; margin-top: 0.5em; }
.page-content ul, .page-content ol { margin: 1em 0 1em 1.5em; }
.page-content ul li { list-style: disc; margin-bottom: 0.4em; }
.page-content ol li { list-style: decimal; margin-bottom: 0.4em; }

.aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.has-text-align-right { text-align: right; }
.has-very-light-gray-background-color { background-color: #f7f7f7; padding: 1em; border-radius: 3px; }
.has-luminous-vivid-orange-color { color: #ff6900; }
.has-vivid-red-color { color: #cf2e2e; }
.has-vivid-green-cyan-color { color: #00d084; }
.has-vivid-cyan-blue-color { color: #0693e3; }

.wp-block-button { margin: 1em 0; }
.wp-block-button__link { display: inline-block; padding: 12px 24px; color: #fff !important; background: linear-gradient(135deg, #1e3a8a, #3b82f6); border-radius: 3px; font-weight: 600; text-decoration: none; transition: opacity 0.15s; }
.wp-block-button__link:hover { opacity: 0.9; color: #fff !important; text-decoration: none; }
.has-midnight-gradient-background { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.no-border-radius { border-radius: 0; }

.page-content table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 0.95em; }
.page-content table td, .page-content table th { border: 1px solid #ddd; padding: 8px 10px; text-align: left; }
.page-content table tr:nth-child(even) { background: #f9f9f9; }

.wp-block-embed { margin: 1.5em 0; }
.wp-block-embed__wrapper { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.wp-block-embed__wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.site-footer { background: #f7f7f7; border-top: 1px solid #eee; padding: 30px 0; color: #555; font-size: 0.95em; margin-top: 40px; }
.site-footer p { margin: 0.3em 0; }

@media (max-width: 600px) {
    body { font-size: 15px; }
    h1 { font-size: 1.6em; }
    h2 { font-size: 1.35em; }
    .header-inner { flex-direction: column; align-items: flex-start; }
    .main-nav ul { gap: 12px; }
    .alignleft, .alignright { float: none; margin: 1em auto; }
}

/* --- Блоки главной страницы --- */
.page-block {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}
.page-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* --- Комментарии --- */
.comments { margin-top: 40px; }
.comments__title { font-size: 1.4em; margin-bottom: 20px; }
.comments__list, .comment__replies { list-style: none; padding: 0; margin: 0; }
.comment { padding: 16px 0; border-bottom: 1px solid #eee; }
.comment__replies { margin-top: 12px; padding-left: 24px; border-left: 2px solid #eaeaea; }
.comment__meta { font-size: 0.9em; color: #666; margin-bottom: 6px; }
.comment__author { color: #222; }
.comment__date { margin-left: 8px; }
.comment__content { line-height: 1.55; }
.comment__content p { margin: 0.4em 0; }

/* --- Форма комментария --- */
.comment-form { margin-top: 40px; padding: 24px; background: #f7f7f7; border-radius: 4px; }
.comment-form__title { font-size: 1.3em; margin-bottom: 16px; }
.comment-form__field { margin-bottom: 14px; }
.comment-form__field label { display: block; margin-bottom: 4px; font-weight: 600; }
.comment-form__input,
.comment-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 3px; font: inherit; box-sizing: border-box; }
.comment-form textarea { resize: vertical; }
.comment-form__error { color: #b00020; font-size: 0.9em; margin-top: 4px; }
.comment-form__submit { background: #1e5aa8; color: #fff; border: none; padding: 10px 22px; border-radius: 3px; cursor: pointer; font: inherit; }
.comment-form__submit:hover { background: #164a8a; }
.comment-form__note { font-size: 0.85em; color: #666; margin-top: 8px; }

/* --- Flash-сообщения --- */
.messages { margin: 0 0 20px; }
.message { padding: 10px 14px; border-radius: 3px; margin-bottom: 8px; }
.message--success { background: #e6f4ea; color: #1e6b34; border: 1px solid #b7e0c0; }
.message--error { background: #fdecea; color: #8a1f1f; border: 1px solid #f3c0bc; }
.message--info { background: #eaf2fb; color: #1e4a7a; border: 1px solid #bcd6f0; }

/* --- CTA на главной (кнопка «Пройти анкету») --- */
.home-cta { text-align: center; margin: 40px 0 20px; }

/* --- Квиз --- */
.quiz { margin-top: 20px; }
.quiz__title { font-size: 1.8em; margin-bottom: 16px; }
.quiz__intro { margin-bottom: 24px; color: #444; line-height: 1.6; }
.quiz__form { margin-top: 20px; }
.quiz__question { border: 1px solid #e5e5e5; border-radius: 4px; padding: 16px 20px; margin-bottom: 20px; }
.quiz__question-title { font-weight: 600; font-size: 1.1em; padding: 0 6px; }
.quiz__answer { display: block; padding: 8px 0; cursor: pointer; line-height: 1.5; }
.quiz__answer input[type="radio"] { margin-right: 10px; }
.quiz__submit { background: #1e5aa8; color: #fff; border: none; padding: 12px 28px; border-radius: 3px; cursor: pointer; font: inherit; font-size: 1.05em; margin-top: 10px; }
.quiz__submit:hover { background: #164a8a; }
a.quiz__submit { display: inline-block; text-decoration: none; }

/* --- Результат квиза --- */
.quiz-result { margin-top: 20px; }
.quiz-result__title { font-size: 1.8em; margin-bottom: 16px; }
.quiz-result__score { font-size: 1.1em; color: #444; margin-bottom: 20px; }
.quiz-result__content { line-height: 1.65; }
.quiz-result--positive { border-left: 4px solid #1e6b34; padding-left: 20px; }
.quiz-result--negative { border-left: 4px solid #8a1f1f; padding-left: 20px; }
.quiz-result__retake { margin-top: 28px; }
