/*
Theme Name: FL Minimal
Theme URI: https://faberlic.pro/
Description: Минимальная тема сети Faberlic.pro. Только HTML/CSS/отображение. Бизнес-логика — в плагине fl-core. v0.3.3: размер/отступы kicker разделов, восстановление двухстрочного footer.
Version: 0.3.3
Author: FL
Text Domain: fl-minimal
Requires at least: 6.2
Requires PHP: 7.4
*/

/* ============================================================
   1. Design tokens
   ============================================================ */
:root {
    --bg: #fdfdfc;             /* фон страницы — тёплый почти белый */
    --surface: #fafaf9;        /* мягкая поверхность (виджет, CTA) */
    --surface-2: #f1f1ee;      /* bubble пользователя */
    --text: #1f2937;           /* основной текст (charcoal) */
    --text-2: #6b7280;         /* вторичный текст */
    --text-3: #9ca3af;         /* третичный текст */
    --border: #e5e7eb;         /* основные рамки */
    --border-soft: #ececea;    /* очень лёгкие рамки */
    --border-strong: #d4d7db;  /* чуть заметнее (input) */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 16px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: Georgia, "Times New Roman", serif;
    --container: 1160px;
    --col: 720px;              /* текстовая колонка статьи */
    --widget: 760px;           /* консультант — чуть шире текстовой колонки */
}

/* ============================================================
   2. Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

/* ============================================================
   3. Layout
   ============================================================ */
.fl-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

main { flex: 1 0 auto; }

/* ============================================================
   4. Header & Navigation (реальный DOM header.php: fl-* классы)
   ============================================================ */
.fl-site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
    padding: 16px 0;
}
.fl-site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.fl-country-select { position: relative; }
.fl-country-select summary { cursor: pointer; list-style: none; font-size: 20px; line-height: 1; }
.fl-country-select summary::-webkit-details-marker { display: none; }
.fl-country-select__list {
    position: absolute; left: 0; top: 100%; z-index: 10;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    padding: 6px 0; margin: 6px 0 0; min-width: 170px;
    list-style: none; box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.fl-country-select__list a { display: block; padding: 6px 14px; color: var(--text); }
.fl-country-select__list a:hover { background: var(--surface-2); }

.fl-lang-switch { display: flex; align-items: center; gap: 10px; list-style: none; margin: 0; padding: 0; }
.fl-lang-switch a, .fl-lang-switch span { font-size: 13px; font-weight: 600; color: var(--text-2); text-decoration: none; }
.fl-lang-switch .is-active { color: var(--text); font-weight: 600; border-bottom: 2px solid var(--text); }
.fl-lang-switch .is-muted { color: var(--text-3); }

.fl-main-menu { display: flex; gap: 28px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.fl-main-menu a { font-size: 14px; line-height: 1.6; font-weight: 400; color: var(--text-2); }
.fl-main-menu a:hover { color: var(--text); }

/* ============================================================
   5. Homepage / grid
   ============================================================ */
.home-main { padding: clamp(64px, 10vh, 110px) 0; }
.home-main .cta { margin: 0 auto; }

.fl-homepage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.fl-homepage-grid__item a { display: block; }
.fl-homepage-grid__item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.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;
}

/* Разделы: карточки статей */
.fl-section-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.fl-section-grid__item { min-width: 0; }
.fl-section-grid__card {
    display: flex; flex-direction: column; height: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    background: #fff;
}
.fl-section-grid__card:hover { border-color: var(--border-strong); }
.fl-section-grid__media { width: 100%; aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.fl-section-grid__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fl-section-grid__img--fallback { opacity: .6; }
.fl-section-grid__title {
    display: block;
    padding: 10px 12px 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fallback-контент (index.php) */
.fl-document__content { max-width: var(--col); }
.fl-document__content h2 { margin-top: 1.6em; }
.fl-document__content p { margin: 1em 0; }

/* ============================================================
   6. Article
   ============================================================ */
.article { padding-bottom: 24px; }

.article-head {
    max-width: 820px;
    margin: 0 auto;
    padding-top: 56px;
}
.article-kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 18px;
}
/* Страница раздела: kicker — прямой ребёнок .fl-container (section.php).
   Только здесь увеличиваем размер и добавляем вертикальный отступ;
   статьи и остальные шаблоны не затрагиваются. */
.fl-container > .article-kicker {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 56px;
    margin-bottom: 24px;
}
.article-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 4.4vw, 46px);
    line-height: 1.12;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--text);
}
.article-subtitle {
    margin-top: 18px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-2);
    max-width: 680px;
}

/* Языковой переключатель страницы статьи (тот же active-state, что в header) */
.fl-language-switch {
    margin-top: 20px;
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
}
.fl-language-switch a { color: var(--text-2); }
.fl-language-switch a:hover { color: var(--text); }
.fl-language-switch a.is-active { color: var(--text); font-weight: 600; border-bottom: 2px solid var(--text); }

.article-body {
    max-width: var(--col);
    margin: 56px auto 0;
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.75;
    color: var(--text);
}
.article-body p { margin-bottom: 22px; }
.article-body h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    line-height: 1.3;
    font-weight: 600;
    margin: 52px 0 16px;
}
.article-body a { text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   7. Consultant wrapper (тема)
   ============================================================ */
.consultant {
    max-width: var(--widget);
    margin: 44px auto 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 22px 18px;
}
.consultant[hidden] { display: none; }
.article-head .consultant { margin-bottom: 48px; }

.consultant__head { display: flex; flex-direction: column; gap: 3px; }
.consultant__title { font-size: 16px; font-weight: 600; line-height: 1.6; color: var(--text); letter-spacing: -.01em; }
.consultant__subtitle { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.consultant__disclaimer { margin-top: 10px; text-align: center; font-size: 11px; color: var(--text-3); }

/* ============================================================
   8. CTA
   ============================================================ */
.cta {
    max-width: 900px;
    margin: 72px auto 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    text-align: center;
    background: var(--surface);
}
.cta__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 12px;
}
.cta__title {
    font-family: var(--font-serif);
    font-size: 28px;
    line-height: 1.25;
    font-weight: 600;
    color: var(--text);
}
.cta__text { margin: 14px auto 0; max-width: 520px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.cta__actions { margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    font-family: var(--font-sans);
    border: 1px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--text); color: #fff; }
.btn--primary:hover { background: #111827; }
.btn--ghost { border-color: var(--border); color: var(--text-2); background: transparent; }
.btn--ghost:hover { color: var(--text); border-color: var(--border-strong); }

/* ============================================================
   9. Registration
   ============================================================ */
.fl-register { margin: 40px 0; }
.fl-register__button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--text);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.fl-register__button:hover { background: #111827; color: #fff; }

/* ============================================================
   10. Footer (двухстрочная структура)
   ============================================================ */
.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    flex-shrink: 0;
}
.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    padding: 36px 0 28px;
}
.site-footer__note { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--text-2); }
.site-footer__nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer__nav a { font-size: 13px; line-height: 1.6; color: var(--text-2); }
.site-footer__nav a:hover { color: var(--text); }
.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 0 22px;
    border-top: 1px solid var(--border-soft);
    font-size: 12px;
    color: var(--text-3);
}
.site-footer__copyright { font-size: 12px; color: var(--text-3); }

/* RAG-слот (технический fallback при отсутствии плагина виджета) — невидимый, без текста */
.fl-rag-slot { display: none; }

/* ============================================================
   11. Responsive
   ============================================================ */
@media (max-width: 1024px) { .fl-section-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { .fl-section-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px)  { .fl-section-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px)  { .fl-section-grid { grid-template-columns: repeat(1, 1fr); } }

@media (max-width: 760px) {
    .fl-container { padding: 0 16px; }
    .fl-site-header { padding: 14px 0; }
    .fl-site-nav { gap: 14px; }
    .fl-main-menu { gap: 18px; }
    .fl-main-menu a { font-size: 13px; }

    .article-head { padding-top: 36px; }
    .article-title { font-size: clamp(28px, 7.5vw, 36px); }
    .article-subtitle { font-size: 16px; }

    .consultant { margin-top: 32px; padding: 16px 14px 14px; border-radius: var(--radius-md); }
    .article-head .consultant { margin-bottom: 32px; }

    .article-body { margin-top: 40px; font-size: 17px; }
    .article-body h2 { font-size: 23px; margin-top: 40px; }

    .cta { margin-top: 56px; padding: 32px 20px; }
    .cta__title { font-size: 24px; }

    .home-main { padding: clamp(48px, 8vh, 80px) 0; }
    .site-footer { margin-top: 56px; }
}




