/*
Theme Name: dds_anhnt246.com
Theme URI: https://anhnt246.com
Author: Анна Нестерова
Author URI: https://anhnt246.com
Description: Информационный lifestyle-ресурс о здоровом образе жизни, основах питания, домашних кулинарных навыках и практиках повседневного благополучия.
Version: 1.1
Text Domain: dds_anhnt246
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ===== CSS VARIABLES ===== */
:root {
    --color-sage: #8FBC8F;
    --color-sage-dark: #6E9B6E;
    --color-cream: #FDF8F0;
    --color-linen: #E8DDD0;
    --color-olive: #4A5D4A;
    --color-olive-light: #5E745E;
    --color-terracotta: #D27D56;
    --color-terracotta-dark: #B8693F;
    --color-white: #FFFFFF;
    --color-black: #2A2A2A;
    --color-muted: #8A8A7A;
    --color-border: #D4CFC5;

    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Lora', 'Georgia', serif;
    --font-ui: 'Source Sans 3', 'Helvetica Neue', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 40px;
    --shadow-card: 0 2px 12px rgba(74, 93, 74, 0.08);
    --shadow-btn: 0 2px 8px rgba(74, 93, 74, 0.12);
    --transition: 0.25s ease;

    --header-height: 90px;
    --header-compact: 54px;
}

/* ===== QUIET MODE ===== */
body.quiet-mode {
    filter: sepia(0.35) saturate(0.6) brightness(0.92) contrast(0.88);
}
body.quiet-mode img {
    filter: saturate(0.5);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.72;
    color: var(--color-olive);
    background-color: var(--color-cream);
    -webkit-font-smoothing: antialiased;
}

p {
    margin: 0 0 1.15em;
}

a {
    color: var(--color-sage-dark);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--color-terracotta);
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-olive);
    line-height: 1.3;
    margin: 0 0 0.6em;
    font-weight: 700;
}

h1 { font-size: 2.3rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

ul, ol {
    margin: 0 0 1.15em 1.4em;
}

blockquote {
    border-left: 3px solid var(--color-sage);
    margin: 1.5em 0;
    padding: 0.8em 1.4em;
    background: rgba(143, 188, 143, 0.06);
    font-style: italic;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
}
table th, table td {
    border: 1px solid var(--color-border);
    padding: 0.6em 0.9em;
    text-align: left;
}
table th {
    background: var(--color-linen);
    font-family: var(--font-ui);
    font-weight: 600;
}

code, pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}
pre {
    background: var(--color-olive);
    color: var(--color-cream);
    padding: 1.2em;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 1.2em 0;
}

/* ===== UTILITY ===== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* ===== HEADER ===== */
.site-header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    z-index: 100;
    position: relative;
    transition: all 0.35s ease;
}

.site-header .header-inner {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    transition: height 0.35s ease;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.35s ease;
}

.brand-logo-svg {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    transition: all 0.35s ease;
}

.brand-text {
    display: flex;
    flex-direction: column;
    transition: opacity 0.35s ease;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-olive);
    line-height: 1.25;
    max-width: 320px;
}

.brand-desc {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--color-muted);
    line-height: 1.35;
    max-width: 320px;
    margin-top: 2px;
}

/* Compact header */
.site-header.compact .header-inner {
    height: var(--header-compact);
}

.site-header.compact .brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.site-header.compact .brand-logo,
.site-header.compact .brand-logo-svg {
    width: 36px;
    height: 36px;
}

.site-header.compact .header-nav a {
    padding: 0.3em 0.6em;
    font-size: 0.82rem;
}

/* Monogram for compact mode */
.brand-monogram {
    display: none;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-olive);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-linen);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.site-header.compact .brand-monogram {
    display: flex;
}

.site-header.compact .brand-logo,
.site-header.compact .brand-logo-svg {
    display: none;
}

/* Navigation */
.header-nav-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-nav {
    display: flex;
    list-style: none;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
}

.header-nav li {
    list-style: none;
}

.header-nav a {
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-olive);
    padding: 0.4em 0.85em;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    display: block;
}

.header-nav a:hover,
.header-nav .current-menu-item a {
    background: var(--color-sage);
    color: var(--color-white);
}

/* Header utility buttons */
.header-utils {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-quiet-mode,
.btn-search-toggle {
    background: none;
    border: 1.5px solid var(--color-border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-olive);
    transition: all var(--transition);
    flex-shrink: 0;
}

.btn-quiet-mode:hover,
.btn-search-toggle:hover {
    border-color: var(--color-sage);
    background: rgba(143, 188, 143, 0.08);
}

.btn-quiet-mode.active {
    background: var(--color-olive);
    border-color: var(--color-olive);
    color: var(--color-cream);
}

.btn-quiet-mode svg,
.btn-search-toggle svg {
    width: 18px;
    height: 18px;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-olive);
    position: absolute;
    left: 8px;
    transition: all 0.3s ease;
}

.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 26px; }

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg);
    top: 19px;
}
.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg);
    top: 19px;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(74, 93, 74, 0.85);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.search-overlay.open {
    display: flex;
}

.search-overlay-inner {
    width: 90%;
    max-width: 560px;
}

.search-overlay .search-field {
    width: 100%;
    font-family: var(--font-body);
    font-size: 1.3rem;
    padding: 1em 1.4em;
    border: none;
    border-radius: var(--radius-lg);
    background: var(--color-white);
    color: var(--color-olive);
    outline: none;
}

.search-overlay .search-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 2rem;
    cursor: pointer;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    color: var(--color-muted);
    padding: 1rem 0 0.5rem;
    max-width: 1260px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.breadcrumbs a {
    color: var(--color-sage-dark);
}