/*
Theme Name: Site Builder Generated Theme
Description: Сгенерирована плагином Site Builder. Шапка: accent-topbar, футер: blueprint-grid, стиль: sunset-gradient.
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 ===== */

/* templates/theme/styles/sunset-gradient.css */

:root {
    /* Основные цвета */
    --sb-color-bg:              #fff5f7;
    --sb-color-bg-alt:          #ffd6e0;
    --sb-color-text:            #2d1b2e;
    --sb-color-muted:           #6b4e71;
    --sb-color-link:            #c44569;
    --sb-color-border:          #ffc2d4;
    --sb-color-accent:          #6c5ce7;

    /* Типографика */
    --sb-font-body:             'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sb-font-heading:          'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --sb-font-size:             16px;
    --sb-line-height:           1.75;
    
    /* Лейаут */
    --sb-content-max-width:     920px;
    
    /* Эффекты */
    --sb-shadow-sm:             0 2px 8px rgba(196, 69, 105, 0.1);
    --sb-shadow-md:             0 4px 16px rgba(196, 69, 105, 0.15);
    --sb-shadow-lg:             0 8px 32px rgba(196, 69, 105, 0.2);
}

body.sb-site {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8f0 100%);
    color: var(--sb-color-text);
    font-family: var(--sb-font-body);
    font-size: var(--sb-font-size);
    line-height: var(--sb-line-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.sb-site h1,
body.sb-site h2,
body.sb-site h3,
body.sb-site h4,
body.sb-site h5,
body.sb-site h6 {
    font-family: var(--sb-font-heading);
    background: linear-gradient(135deg, #c44569 0%, #6c5ce7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.03em;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

body.sb-site h1 {
    font-size: 48px;
    margin-top: 0;
}

body.sb-site h2 {
    font-size: 36px;
    margin-bottom: 24px;
}

body.sb-site h3 {
    font-size: 16px;
    margin-bottom: 20px;
}

body.sb-site h4 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 16px;
}

body.sb-site p {
    margin-top: 0;
    margin-bottom: 24px;
    color: var(--sb-color-text);
}

body.sb-site a {
    color: var(--sb-color-link);
    text-decoration: none;
    position: relative;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sb-site a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #c44569 0%, #6c5ce7 100%);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

body.sb-site a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

body.sb-site strong,
body.sb-site b {
    font-weight: 700;
    color: var(--sb-color-link);
}

body.sb-site em,
body.sb-site i {
    font-style: italic;
    color: var(--sb-color-accent);
}

body.sb-site code {
    background: linear-gradient(135deg, rgba(196, 69, 105, 0.1) 0%, rgba(108, 92, 231, 0.1) 100%);
    color: var(--sb-color-accent);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.9em;
    font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
    font-weight: 500;
    border: 1px solid var(--sb-color-border);
}

body.sb-site pre {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 214, 224, 0.4) 100%);
    border: 2px solid var(--sb-color-border);
    border-radius: 16px;
    padding: 24px;
    overflow-x: auto;
    margin: 32px 0;
    box-shadow: var(--sb-shadow-sm);
}

body.sb-site pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    border: none;
    color: var(--sb-color-text);
}

body.sb-site blockquote {
    border-left: 5px solid var(--sb-color-link);
    padding-left: 28px;
    margin: 36px 0;
    color: var(--sb-color-muted);
    font-style: italic;
    font-size: 18px;
    position: relative;
}

body.sb-site blockquote::before {
    content: '"';
    position: absolute;
    left: -8px;
    top: -12px;
    font-size: 64px;
    color: var(--sb-color-border);
    font-family: Georgia, serif;
    line-height: 1;
}

body.sb-site ul,
body.sb-site ol {
    margin: 24px 0;
}

body.sb-site li {
    margin-bottom: 12px;
    color: var(--sb-color-text);
}

body.sb-site li::marker {
    color: var(--sb-color-link);
    font-weight: 700;
}

body.sb-site img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--sb-shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.sb-site img:hover {
    transform: translateY(-4px);
    box-shadow: var(--sb-shadow-lg);
}

body.sb-site hr {
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--sb-color-link) 50%, transparent 100%);
    margin: 64px 0;
}

body.sb-site table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 32px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--sb-shadow-sm);
}

body.sb-site th,
body.sb-site td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--sb-color-border);
}

body.sb-site th {
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #c44569 0%, #6c5ce7 100%);
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.05em;
}

body.sb-site tr:last-child td {
    border-bottom: none;
}

body.sb-site tr:nth-child(even) {
    background: rgba(255, 214, 224, 0.2);
}

body.sb-site svg {
    fill: currentColor !important;
    color: inherit !important;
}

body.sb-site svg path {
    fill: currentColor !important;
}

body.sb-site button svg,
body.sb-site a svg {
    vertical-align: middle;
    flex-shrink: 0;
}

body.sb-site button {
    background: linear-gradient(135deg, #c44569 0%, #6c5ce7 100%);
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--sb-shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.sb-site button svg {
    fill: currentColor !important;
    color: #ffffff !important;
}

body.sb-site button:hover,
body.sb-site input[type="submit"]:hover,
body.sb-site input[type="button"]:hover {
    transform: translateY(-3px);
    box-shadow: var(--sb-shadow-lg);
}

body.sb-site input[type="text"],
body.sb-site input[type="email"],
body.sb-site input[type="search"],
body.sb-site textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--sb-color-border);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    font-family: var(--sb-font-body);
    color: var(--sb-color-text);
    transition: all 0.3s ease;
}

body.sb-site input[type="text"]:focus,
body.sb-site input[type="email"]:focus,
body.sb-site input[type="search"]:focus,
body.sb-site textarea:focus {
    outline: none;
    border-color: var(--sb-color-link);
    box-shadow: 0 0 0 4px rgba(196, 69, 105, 0.1);
    background: #ffffff;
}

@media (max-width: 768px) {
    body.sb-site h1 {
        font-size: 36px;
    }

    body.sb-site h2 {
        font-size: 28px;
    }

    body.sb-site h3 {
        font-size: 24px;
    }
}


/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e; /* фон */
}

::-webkit-scrollbar-thumb {
    background: #888; /* сам ползунок */
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* ===== Header variant: accent-topbar ===== */
/* accent-topbar — акцентная полоса сверху + основной ряд, 3 уровня */
.sb-header-at { background: var(--sb-color-bg, #fff); }

/* Accent strip */
.sb-header-at-strip {
    background: var(--sb-color-link, #2563eb);
    color: #fff;
}
.sb-header-at-strip-inner {
    max-width: var(--sb-content-max-width, 920px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 20px;
    height: 34px;
    font-size: 0.8em;
}
.sb-header-at-tagline {
    color: #fff;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sb-header-at-home {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.95;
    transition: opacity 0.15s;
    flex-shrink: 0;
    margin-left: 16px;
}
.sb-header-at-home:hover { opacity: 1; text-decoration: underline; }

/* Main bar */
.sb-header-at-main { border-bottom: 1px solid var(--sb-color-border, #e5e7eb); }
.sb-header-at-inner {
    max-width: var(--sb-header-max-width, 1400px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    height: 60px;
}
.sb-header-at-brand { margin: 0; font-size: 1.15em; font-weight: 700; line-height: 1; }
.sb-header-at-brand a, .sb-header-at-name {
    color: var(--sb-color-text, #111);
    text-decoration: none;
}
.sb-header-at-brand img { max-height: 43px; width: auto; display: block; }

/* Nav */
.sb-header-at-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.sb-header-at-nav > ul > li { position: relative; }
.sb-header-at-nav a {
    display: block;
    padding: 9px 14px;
    color: var(--sb-color-text, #111);
    text-decoration: none;
    font-size: 0.92em;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.sb-header-at-nav > ul > li > a:hover,
.sb-header-at-nav .current-menu-item > a {
    color: var(--sb-color-link, #2563eb);
    background: var(--sb-color-bg-alt, #f9fafb);
}
.sb-header-at-nav .menu-item-has-children > a::after {
    content: "\25BE";
    display: inline-block;
    margin-left: 5px;
    font-size: 0.7em;
    opacity: 0.6;
}

/* Dropdowns (2nd + 3rd level) */
.sb-header-at-nav .sub-menu {
    position: absolute;
    top: 100%; left: 0;
    min-width: 210px;
    background: var(--sb-color-bg, #fff);
    border: 1px solid var(--sb-color-border, #e5e7eb);
    border-top: 2px solid var(--sb-color-link, #2563eb);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    margin: 0;
    z-index: 100;
}
.sb-header-at-nav li:hover > .sub-menu,
.sb-header-at-nav li:focus-within > .sub-menu { display: flex; }
.sb-header-at-nav .sub-menu .sub-menu {
    top: -8px; left: 100%; margin-left: 6px;
    border-top: 1px solid var(--sb-color-border, #e5e7eb);
    border-radius: 8px;
}
.sb-header-at-nav .sub-menu a {
    padding: 8px 12px;
    font-size: 0.89em;
    font-weight: 400;
    border-radius: 6px;
    white-space: nowrap;
}
.sb-header-at-nav .sub-menu a:hover {
    background: var(--sb-color-bg-alt, #f9fafb);
    color: var(--sb-color-link, #2563eb);
}
.sb-header-at-nav .sub-menu .menu-item-has-children > a::after {
    content: "\25B8"; float: right; margin-left: 8px;
}

/* Burger — hidden on desktop */
.sb-header-at-burger {
    display: none;
    background: transparent; border: none;
    padding: 8px; cursor: pointer;
    flex-direction: column; gap: 4px;
    width: 34px; height: 34px;
    justify-content: center; align-items: center;
}
.sb-header-at-burger span {
    display: block; width: 20px; height: 2px;
    background: var(--sb-color-text, #111);
    transition: transform 0.2s, opacity 0.2s;
}
.sb-header-at-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sb-header-at-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sb-header-at-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile */
@media (max-width: 800px) {
    .sb-header-at-strip { display: none; }
    .sb-header-at-burger { display: flex; }
    .sb-header-at-main { position: relative; }
    .sb-header-at-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 - 60px);
        overflow-y: auto;
        z-index: 100;
    }
    .sb-header-at-nav.sb-at-open { display: block; }
    .sb-header-at-nav > ul { flex-direction: column; gap: 2px; }
    .sb-header-at-nav .sub-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        border-top: none;
        border-radius: 0;
        padding: 0 0 0 16px;
        min-width: 0;
        margin: 0;
    }
    .sb-header-at-nav .sub-menu .sub-menu { margin-left: 0; border: none; }
    .sb-header-at-nav .menu-item-has-children > a::after { content: "\25BE"; float: right; }
}


/* ===== Footer variant: blueprint-grid ===== */
/* Общий контейнер */
.sb-footer-blueprint {
  background-color: var(--sb-color-border);
  border-top: 1px solid var(--sb-color-border);
  font-family: var(--sb-font-body);
  font-size: var(--sb-font-size);
  line-height: var(--sb-line-height);
  color: var(--sb-color-text);
  width: 100%;
}

.sb-footer-blueprint *,
.sb-footer-blueprint *::before,
.sb-footer-blueprint *::after {
  box-sizing: border-box;
}

/* Сетка с имитацией рамок 1px */
.sb-footer-bp-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  gap: 1px;
  background-color: var(--sb-color-border);
}

.sb-footer-bp-cell {
  background-color: var(--sb-color-bg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

/* Лейблы ячеек (МОНО) */
.sb-bp-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sb-color-muted);
  margin-bottom: 14px;
  display: block;
}

/* Имя и описание */
.sb-bp-name {
  font-family: var(--sb-font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--sb-color-text);
  text-decoration: none;
  margin-bottom: 8px;
  display: inline-block;
}

.sb-bp-desc {
  font-size: 0.85rem;
  color: var(--sb-color-muted);
  margin: 0;
  line-height: 1.5;
}

/* Меню и списки */
.sb-bp-menu,
.sb-bp-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sb-bp-menu li,
.sb-bp-list li {
  margin-bottom: 8px;
}

.sb-bp-menu a,
.sb-bp-list a {
  color: var(--sb-color-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sb-bp-menu a:hover,
.sb-bp-list a:hover {
  color: var(--sb-color-accent);
}

/* Чертёжный баннер */
.sb-footer-bp-hero {
  position: relative;
  background-color: var(--sb-color-bg);
  border-top: 1px solid var(--sb-color-border);
  padding: 24px 16px;
  text-align: center;
  overflow: hidden;
}

.sb-bp-svg-text {
  width: 100%;
  max-height: 110px;
  display: block;
}

.sb-bp-svg-text text {
  font-family: var(--sb-font-body);
  font-size: 90px;
  font-weight: 900;
  fill: none;
  stroke: var(--sb-color-text);
  stroke-width: 1.2px;
  stroke-dasharray: 6 2;
  letter-spacing: 3px;
}

/* Крестики по углам */
.sb-bp-cross {
  position: absolute;
  font-size: 11px;
  line-height: 1;
  color: var(--sb-color-muted);
}
.sb-bp-cross.top-left {
  top: 6px;
  left: 8px;
}
.sb-bp-cross.top-right {
  top: 6px;
  right: 8px;
}
.sb-bp-cross.bottom-left {
  bottom: 6px;
  left: 8px;
}
.sb-bp-cross.bottom-right {
  bottom: 6px;
  right: 8px;
}

/* Копирайт */
.sb-footer-bp-bottom {
  background-color: var(--sb-color-bg-alt);
  border-top: 1px solid var(--sb-color-border);
  padding: 12px 20px;
  font-size: 0.75rem;
  color: var(--sb-color-muted);
}

.custom-logo-link {
  max-width: none;
}

.custom-logo {
  max-width: 100px;
  height: auto;
}

/* Разворачиваем логотип в первой колонке */
.sb-bp-brand .custom-logo,
.sb-bp-brand img {
  width: auto;
  max-width: 220px; /* Перекрывает глобальный max-width */
  height: auto;
  max-height: 75px;
  display: block;
}

/* Адаптив */
@media (max-width: 768px) {
  .sb-footer-bp-grid {
    grid-template-columns: 1fr;
  }
  .sb-bp-svg-text text {
    font-size: 60px;
  }
}

