/*
Theme Name: Vidblag
Theme URI: https://vidblag.ru
Description: Тема vidblag.ru, воспроизводит дизайн бывшего сайта на Tilda без кода Tilda
Version: 0.2.0
Author: Migration
Text Domain: vidblag
*/

:root {
    --bg-dark: #040137;
    --menu-bg: rgba(4, 1, 55, 0.70);
    --text-light: #f2f2f2;
    --title-light: #e6e6e6;
    --hover: #fab359;
    --active: #cbcbe1;
    --accent-yellow: #ffdd00;
    --feed-bg: #85849f;
    --feed-border: #4a4e6d;
    --font-head: 'Cormorant Infant', Georgia, serif;
    --font-body: 'Inter', Arial, sans-serif;
    --font-menu: Arial, sans-serif;
    --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5em;
    color: var(--title-light);
}

a { color: var(--text-light); text-decoration: none; transition: color .3s ease-in-out; }
a:hover { color: var(--hover); }

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* === Header / Menu (t229) === */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--menu-bg);
    backdrop-filter: blur(4px);
    height: 60px;
}

.site-header .container {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.primary-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    align-items: center;
}

.primary-nav li { position: relative; padding: 0 15px; }

.primary-nav a {
    font-family: var(--font-menu);
    font-size: 16px;
    text-transform: uppercase;
    color: var(--text-light);
}

.primary-nav li:nth-child(5) > a { color: var(--accent-yellow); }
.primary-nav .current-menu-item > a { color: var(--active); }
.primary-nav a:hover { color: var(--hover); }

/* Подменю (t-menusub) */
.primary-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    min-width: 300px;
    background: var(--feed-bg);
    border-radius: 10px;
    padding: 10px 0;
    flex-direction: column;
}

.primary-nav li:hover .sub-menu,
.primary-nav li:focus-within .sub-menu { display: flex; }

.primary-nav .sub-menu li { padding: 6px 20px; }
.primary-nav .sub-menu a { font-size: 18px; text-transform: none; }

/* === Hero (t396) === */
.hero {
    position: relative;
    min-height: 560px;
    margin-top: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(rgba(4,1,55,.25), rgba(4,1,55,.25)),
        url('assets/images/tild6433-6465-4835-a363-343831353762__stars1.png') center top / cover no-repeat,
        var(--bg-dark);
}

.hero__city {
    position: absolute;
    left: 50%; bottom: 76px;
    transform: translateX(-50%);
    width: 1200px; max-width: 100%;
    pointer-events: none;
}

.hero__glow {
    position: absolute;
    inset: 0;
    background: url('assets/images/tild3837-3634-4362-a233-656161616635__vidblag-light.png') center / cover no-repeat;
    filter: blur(3px);
    opacity: .9;
    pointer-events: none;
}

.hero__title {
    position: relative;
    z-index: 2;
    margin-top: 50px;
    max-width: 760px;
    padding: 0 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 40px;
}

.hero__bar {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 76px;
    background: #04013c;
}

/* === Разделитель секций (t1022) === */
.section-divider {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0;
}

.section-divider .line {
    flex: 1;
    height: 2px;
    opacity: .5;
}

.section-divider .line--left  { background-image: linear-gradient(to right, transparent 0%, #ffffff 55%); }
.section-divider .line--right { background-image: linear-gradient(to left,  transparent 0%, #ffffff 55%); }

.section-divider .icon {
    width: 40px; height: 40px;
    background: url('assets/images/tild6331-6261-4863-a337-653166643462__orthodox_cross_m319z.svg') center / contain no-repeat;
}

/* === Секции (t050 + контент) === */
.section {
    padding: 90px 0;
}

.section__title {
    text-align: center;
    color: var(--title-light);
    font-size: 48px;
    margin: 0 0 40px;
}

.section__actions {
    text-align: center;
    margin-top: 40px;
}

/* === Кнопка "Показать больше" (t-btnflex) === */
.btn-more {
    display: inline-block;
    padding: 12px 32px;
    color: #ffffff;
    background: var(--bg-dark);
    border: 3px solid var(--text-light);
    border-radius: 20px;
    font-family: var(--font-body);
    font-weight: 500;
}

.btn-more:hover {
    color: var(--bg-dark);
    background: var(--text-light);
    border-color: var(--text-light);
}

/* === Footer === */
.site-footer {
    background: var(--bg-dark);
    border-top: 1px solid rgba(242,242,242,.15);
    padding: 40px 0;
    margin-top: 60px;
}

.site-footer .footer-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin: 0 0 20px; padding: 0;
}

.site-footer .copyright {
    text-align: center;
    color: rgba(242,242,242,.6);
    font-size: 14px;
}

/* === Основное === */
.site-main { min-height: 60vh; }

.entry-content a { text-decoration: underline; }

@media screen and (max-width: 980px) {
    .hero__title { font-size: 30px; margin-top: 70px; }
    .section { padding: 45px 0; }
    .section__title { font-size: 32px; }
    .primary-nav ul { flex-wrap: wrap; justify-content: center; }
}

/* === Карточки потока (аналог t-feed) === */
.feed-list { display: flex; flex-direction: column; }
.feed-card { display: flex; gap: 30px; padding: 25px 0; border-bottom: 1px solid rgba(242,242,242,.2); align-items: flex-start; }
.feed-card:last-child { border-bottom: none; }
.feed-card__thumb { flex: 0 0 200px; display: block; }
.feed-card__thumb img { width: 200px; height: 150px; object-fit: cover; border-radius: 5px; display: block; }
.feed-card__title { font-family: var(--font-menu); font-size: 18px; font-weight: 400; text-transform: uppercase; color: var(--text-light); margin: 0 0 10px; line-height: 1.3; }
.feed-card__title a { color: inherit; }
.feed-card__title a:hover { color: var(--hover); }
.feed-card__date { font-family: var(--font-menu); font-size: 16px; color: var(--text-light); }
.feed-list--compact .feed-card__thumb { flex-basis: 160px; }
.feed-list--compact .feed-card__thumb img { width: 160px; height: 120px; }
.feed-empty { color: rgba(242,242,242,.6); }

/* === Список с сайдбаром (как /news в Тильде) === */
.feed-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 40px; align-items: start; }
.reklama-widget { background: var(--feed-bg); border: 2px solid var(--feed-border); border-radius: 8px; padding: 20px; box-shadow: 0 4px 8px rgba(0,0,0,.1); }
.reklama-card { margin-bottom: 20px; }
.reklama-card:last-child { margin-bottom: 0; }
.reklama-card img { width: 100%; border-radius: 4px; display: block; }
.reklama-title { color: var(--text-light); font-family: var(--font-menu); font-size: 16px; margin: 10px 0 0; line-height: 1.4; }
.reklama-title a { color: inherit; }

/* === Эмблема в hero === */
.hero__logo { position: relative; z-index: 2; display: block; width: 206px; height: auto; margin: 10px auto 0; }

@media screen and (max-width: 980px) {
    .feed-layout { grid-template-columns: 1fr; }
    .feed-card { flex-direction: column; }
    .feed-card__thumb { flex-basis: auto; }
    .feed-card__thumb img { width: 100%; height: auto; }
}

/* === Фиксы по сверке с оригиналом === */
.site-header .container { max-width: none; padding: 0 40px; }
.primary-nav li { padding: 0 12px; }
.hero { display: block; }
.hero__title { margin: 40px auto 0; }

/* Вводный абзац страницы */
.page-intro { max-width: 1100px; margin: 0 auto 40px; color: var(--text-light); font-size: 18px; line-height: 1.7; }

/* Пилюли-фильтры (как в оригинале /clerics) */
.filter-pills { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 30px 0 50px; }
.filter-pills a { border: 1px solid rgba(242,242,242,.8); border-radius: 40px; padding: 8px 22px; font-size: 14px; color: var(--text-light); }
.filter-pills a:hover { color: var(--hover); border-color: var(--hover); }
.filter-pills a.active { background: #31206b; border-color: #31206b; }

/* Сетка карточек 4 в ряд (священники, храмы) */
.feed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 30px; }
.feed-grid .feed-card { display: block; padding: 0; border-bottom: none; }
.feed-grid .feed-card__thumb { flex: none; }
.feed-grid .feed-card__thumb img { width: 100%; height: 260px; object-fit: cover; object-position: top; border-radius: 0; }
.feed-grid .feed-card__title { font-size: 16px; margin-top: 12px; }
.feed-grid .feed-card__date { display: none; }
@media screen and (max-width: 980px) { .feed-grid { grid-template-columns: repeat(2, 1fr); } }

/* === Подвал: контакты и форма (нижний блок оригинала) === */
.site-footer { padding: 60px 0 40px; margin-top: 0; border-top: none; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 60px; align-items: start; }
.footer-org { display: flex; gap: 20px; align-items: center; margin-bottom: 30px; }
.footer-org img { width: 120px; height: 120px; object-fit: contain; border-radius: 12px; }
.footer-org span { font-family: var(--font-menu); font-size: 26px; text-transform: uppercase; color: var(--text-light); line-height: 1.2; }
.footer-center-col { text-align: center; }
.footer-emblem { width: 180px; height: auto; }
.footer-name { font-family: var(--font-menu); font-size: 26px; text-transform: uppercase; margin: 20px 0; color: var(--text-light); }
.footer-center-col p { color: var(--text-light); }
.footer-design { margin-top: 30px; font-size: 12px; color: rgba(242,242,242,.6); }
.footer-form-title { font-size: 40px; margin-bottom: 24px; }
.footer-form-col textarea,
.footer-form-col input[type="text"] { width: 100%; background: transparent; border: 1px solid var(--text-light); border-radius: 8px; color: var(--text-light); padding: 14px 16px; margin-bottom: 16px; font-family: var(--font-body); font-size: 16px; }
.footer-form-col textarea { min-height: 180px; resize: vertical; }
.footer-form-col ::placeholder { color: rgba(242,242,242,.5); }
.footer-consent { font-size: 14px; color: var(--text-light); margin-top: 16px; }
.footer-consent a { color: var(--hover); }
.vq-result { color: var(--hover); margin-bottom: 16px; }
@media screen and (max-width: 980px) { .footer-grid { grid-template-columns: 1fr; } }

/* Заглушка для постов без картинок */
.feed-card__thumb-placeholder img { width: 200px; height: 150px; object-fit: cover; border-radius: 5px; opacity: 0.6; }
.feed-list--compact .feed-card__thumb-placeholder img { width: 160px; height: 120px; }

/* Плавный скролл к якорю */
html { scroll-behavior: smooth; }
#feed-anchor { scroll-margin-top: 100px; }

/* Плавная смена контента при AJAX-фильтрации */
.feed-list {
    transition: opacity 0.2s ease-in-out;
}
