/*
Theme Name: Site Builder Generated Theme
Description: Сгенерирована плагином Site Builder. Шапка: sticky-slim, футер: rich-4col, стиль: elegant.
Version: 1.2.4
Author: Site Builder Plugin
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ===== Reset & base layout ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sb-font-body, "Segoe UI", system-ui, -apple-system, sans-serif);
    font-size: var(--sb-font-size, 16px);
    line-height: var(--sb-line-height, 1.6);
    color: var(--sb-color-text, #222);
    background: var(--sb-color-bg, #fff);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--sb-color-link, #2271b1); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Site wrapper ===== */
.sb-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.sb-site-content {
    flex: 1;
    padding: 32px 20px;
    max-width: var(--sb-content-max-width, 920px);
    width: 100%;
    margin: 0 auto;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--sb-font-heading, var(--sb-font-body, sans-serif));
    line-height: 1.3;
    margin: 1.4em 0 0.6em;
}
h1 { font-size: 2.2em; }
h2 { font-size: 1.6em; }
h3 { font-size: 1.3em; }

/* ===== Content elements ===== */
.sb-content figure { margin: 24px 0; }
.sb-content figure img { border-radius: 4px; }
.sb-content figcaption {
    font-size: 0.9em;
    color: var(--sb-color-muted, #666);
    text-align: center;
    margin-top: 6px;
}
.sb-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.sb-content th, .sb-content td {
    padding: 8px 12px;
    border: 1px solid var(--sb-color-border, #e2e8f0);
    text-align: left;
}
.sb-content th {
    background: var(--sb-color-bg-alt, #f8f9fa);
    font-weight: 600;
}
.sb-content blockquote {
    border-left: 4px solid var(--sb-color-accent, #2271b1);
    margin: 20px 0;
    padding: 12px 20px;
    background: var(--sb-color-bg-alt, #f8f9fa);
    color: var(--sb-color-muted, #555);
}
.sb-content code {
    background: var(--sb-color-bg-alt, #f0f0f1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}
.sb-content pre {
    background: var(--sb-color-bg-alt, #f0f0f1);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
}

/* ===== Variant-specific styles (header, footer, color scheme) injected below ===== */

/* Style variant: Elegant.
 * Cream background, deep emerald accents, serif typography for headings.
 * Refined editorial look — ideal for blogs, magazines, premium brands.
 */
:root {
    --sb-color-bg: #fdfaf3;
    --sb-color-bg-alt: #f5f0e3;
    --sb-color-text: #2d2a26;
    --sb-color-muted: #847d70;
    --sb-color-link: #14532d;
    --sb-color-accent: #166534;
    --sb-color-border: #e7dfcd;
    --sb-font-body: "Georgia", "Times New Roman", Cambria, "Liberation Serif", serif;
    --sb-font-heading: "Playfair Display", "Georgia", "Times New Roman", serif;
    --sb-font-size: 17px;
    --sb-line-height: 1.75;
    --sb-content-max-width: 760px;
}


/* ===== Header variant: sticky-slim ===== */
/* sticky-slim — тонкая липкая шапка (48px) с dropdown на 3 уровня */
.sb-header-slim {
    position: sticky; top: 0; z-index: 100;
    background: var(--sb-color-bg, #fff);
    border-bottom: 1px solid var(--sb-color-border, #e5e7eb);
    transition: box-shadow 0.2s;
}
.sb-header-slim.sb-slim-scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.sb-header-slim-inner {
    max-width:1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
}
.sb-header-slim-brand {
    margin: 0;
    font-size: 1em;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
}
.sb-header-slim-brand a, .sb-header-slim-name {
    color: var(--sb-color-text, #111);
    text-decoration: none;
}
.sb-header-slim-brand img {
    max-height: 70px;
    width: auto;
    display: block;
}
/* Nav */
.sb-header-slim-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.sb-header-slim-nav li { position: relative; }
.sb-header-slim-nav a {
    display: block;
    padding: 8px 12px;
    color: var(--sb-color-text, #111);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
}
.sb-header-slim-nav a:hover, .sb-header-slim-nav .current-menu-item > a {
    color: var(--sb-color-link, #2563eb);
    background: var(--sb-color-bg-alt, #f9fafb);
}
/* Dropdowns (2nd and 3rd level) */
.sb-header-slim-nav .sub-menu {
    position: absolute;
    top: 100%; left: 0;
    min-width: 200px;
    background: var(--sb-color-bg, #fff);
    border: 1px solid var(--sb-color-border, #e5e7eb);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
}
.sb-header-slim-nav li:hover > .sub-menu,
.sb-header-slim-nav li:focus-within > .sub-menu {
    display: flex;
}
.sb-header-slim-nav .sub-menu .sub-menu {
    top: 0; left: 100%;
    margin-left: 4px;
}
.sb-header-slim-nav .sub-menu a {
    padding: 6px 10px;
    font-size: 0.88em;
    white-space: nowrap;
}
/* Chevron for items with children */
.sb-header-slim-nav .menu-item-has-children > a::after {
    content: "▾";
    display: inline-block;
    margin-left: 4px;
    font-size: 0.7em;
    opacity: 0.6;
}
.sb-header-slim-nav .sub-menu .menu-item-has-children > a::after {
    content: "▸";
    float: right;
    margin-left: 8px;
}
/* Burger — hidden on desktop */
.sb-header-slim-burger {
    display: none;
    background: transparent; border: none;
    padding: 8px; cursor: pointer;
    flex-direction: column; gap: 4px;
    width: 32px; height: 32px;
    justify-content: center; align-items: center;
}
.sb-header-slim-burger span {
    display: block; width: 18px; height: 2px;
    background: var(--sb-color-text, #111);
    transition: transform 0.2s, opacity 0.2s;
}
.sb-header-slim-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sb-header-slim-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sb-header-slim-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
/* Mobile */
@media (max-width: 800px) {
    .sb-header-slim-burger { display: flex; }
    .sb-header-slim-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--sb-color-bg, #fff);
        border-bottom: 1px solid var(--sb-color-border, #e5e7eb);
        padding: 12px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        max-height: calc(100vh - 48px);
        overflow-y: auto;
    }
    .sb-header-slim-nav.sb-slim-open { display: block; }
    .sb-header-slim-nav ul { flex-direction: column; gap: 2px; }
    .sb-header-slim-nav .sub-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        padding: 0 0 0 16px;
        min-width: 0;
    }
    .sb-header-slim-nav .sub-menu .sub-menu {
        margin-left: 0;
    }
    .sb-header-slim-nav .menu-item-has-children > a::after { content: "▾"; float: right; }
}


/* ===== Footer variant: rich-4col ===== */
/* rich-4col — четырёхколоночный подвал с брендом и меню */
.sb-footer-rich {
    background: var(--sb-color-bg-alt, #f8f9fa);
    border-top: 1px solid var(--sb-color-border, #e5e7eb);
    padding: 48px 20px 24px;
    color: var(--sb-color-text, #111);
    margin-top: 48px;
}
.sb-footer-rich-inner {
    max-width: var(--sb-content-max-width, 920px);
    margin: 0 auto;
}
.sb-footer-rich-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.sb-footer-rich-col {
    font-size: 0.9em;
}
.sb-footer-rich-heading {
    margin: 0 0 14px;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sb-color-muted, #6b7280);
    font-weight: 700;
}
.sb-footer-rich-name {
    display: block;
    font-weight: 700;
    font-size: 1.15em;
    color: var(--sb-color-text);
    text-decoration: none;
    margin-bottom: 6px;
}
.sb-footer-rich-brand-col img {
    max-height: 40px;
    width: auto;
    margin-bottom: 8px;
}
.sb-footer-rich-tagline {
    margin: 8px 0 0;
    color: var(--sb-color-muted);
    font-size: 0.92em;
    line-height: 1.55;
}
.sb-footer-rich-list, .sb-footer-rich .sb-menu {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.sb-footer-rich-list a, .sb-footer-rich .sb-menu a {
    color: var(--sb-color-text);
    text-decoration: none;
    transition: color 0.15s;
}
.sb-footer-rich-list a:hover, .sb-footer-rich .sb-menu a:hover {
    color: var(--sb-color-link);
    text-decoration: underline;
}
.sb-footer-rich-contact-line {
    margin: 0;
    color: var(--sb-color-muted);
}
.sb-footer-rich-contact-line a {
    color: var(--sb-color-link);
    text-decoration: none;
    font-weight: 500;
}
.sb-footer-rich-contact-line a:hover { text-decoration: underline; }
.sb-footer-rich-copyright {
    padding-top: 20px;
    border-top: 1px solid var(--sb-color-border, #e5e7eb);
    color: var(--sb-color-muted, #6b7280);
    font-size: 0.85em;
    text-align: center;
}
@media (max-width: 800px) {
    .sb-footer-rich-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
}
@media (max-width: 480px) {
    .sb-footer-rich-grid { grid-template-columns: 1fr; gap: 24px; }
    h1{font-size: 1.5em;}
}

