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

:root {
    --fl-color-text: #1c1c1c;
    --fl-color-muted: #6b6b6b;
    --fl-color-bg: #ffffff;
    --fl-color-accent: #b3205a;
    --fl-gap: 16px;
    --fl-container: 1200px;
    --fl-content: 720px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--fl-color-text);
    background: var(--fl-color-bg);
}

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

a { color: var(--fl-color-accent); }
a:hover { text-decoration: none; }

.fl-container {
    width: 100%;
    max-width: var(--fl-container);
    margin: 0 auto;
    padding: 0 var(--fl-gap);
}

/* Технический header/footer внутренней версии */
.fl-tech-header {
    border-bottom: 1px solid #eee;
    padding: 14px 0;
    margin-bottom: 32px;
}
.fl-tech-header__link {
    font-weight: 600;
    text-decoration: none;
    color: var(--fl-color-text);
}
.fl-tech-footer {
    border-top: 1px solid #eee;
    margin-top: 48px;
    padding: 24px 0;
    color: var(--fl-color-muted);
    font-size: 14px;
}

/* Document */
.fl-document__title {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.2;
    margin: 0 0 24px;
}
.fl-document__image { margin: 0 0 32px; }
.fl-document__image img { border-radius: 8px; }
.fl-document__content { max-width: var(--fl-content); }
.fl-document__content h2 { margin-top: 1.6em; }
.fl-document__content p { margin: 1em 0; }

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

.fl-rag-slot {
    min-height: 64px;
    margin: 40px 0;
    border: 1px dashed #ccc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fl-color-muted);
    font-size: 14px;
}
.fl-rag-slot::after { content: "RAG slot (placeholder)"; }

/* Главная: техническая grid */
.fl-homepage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--fl-gap);
    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;
}

/* Site header: country selector, language, fixed menu */
.fl-site-header { border-bottom: 1px solid #eee; padding: 12px 0; margin-bottom: 32px; }
.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 #eee; 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; text-decoration: none; color: var(--fl-color-text); }
.fl-country-select__list a:hover { background: #f6f6f6; }
.fl-lang-switch { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.fl-lang-switch a, .fl-lang-switch span { font-weight: 600; text-decoration: none; }
.fl-lang-switch .is-active { color: var(--fl-color-accent); }
.fl-lang-switch .is-muted { color: var(--fl-color-muted); }
.fl-main-menu { display: flex; gap: 20px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.fl-main-menu a { text-decoration: none; color: var(--fl-color-text); font-weight: 600; }
.fl-main-menu a:hover { color: var(--fl-color-accent); }

/* Section page */
.fl-section__title { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; margin: 0 0 24px; }
.fl-section-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--fl-gap); list-style: none; margin: 0; padding: 0;
}
.fl-section-grid__item a { display: block; text-decoration: none; color: var(--fl-color-text); }
.fl-section-grid__item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; }
.fl-section-grid__title { display: block; margin-top: 8px; font-weight: 600; }
