/* ОБЩИЕ СБРОСЫ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ФЛАГ КАК ФОН НА ВЕСЬ ЭКРАН */
.flag {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: -1; /* фон позади контента */
    overflow: hidden;
}

/* ПОЛОСЫ ФЛАГА */
.stripe {
    position: relative;
    width: 100%;
}

/* ВЫСОТА ПОЛОС */
.stripe.green { flex: 7; }   /* верхняя половина */
.stripe.white { flex: 1; }   /* белая полоса 1/15 */
.stripe.red   { flex: 7; }   /* нижняя половина */

/* ГРАДИЕНТЫ И ТЕНИ */
.stripe.green {
    background: linear-gradient(180deg, #61AE56 0%, #4A9B45 100%);
    box-shadow: inset 0 20px 40px rgba(0,0,0,0.1);
}

.stripe.white {
    background: #ffffff;
}

.stripe.red {
    background: linear-gradient(180deg, #C13323 0%, #A82A1E 100%);
    box-shadow: inset 0 -20px 40px rgba(0,0,0,0.1);
}

/* ВОЛНЫ */
.wave {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 100%;
    opacity: 0.3;
    animation: wave 8s linear infinite;
}

.stripe.green .wave { background: rgba(255,255,255,0.15); animation-duration: 12s; }
.stripe.white .wave { background: rgba(0,0,0,0.05); animation-duration: 10s; }
.stripe.red   .wave { background: rgba(255,255,255,0.1); animation-duration: 8s; }

/* АНИМАЦИЯ ВОЛНЫ */
@keyframes wave {
    0% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(-25%) translateY(5px); }
    100% { transform: translateX(0) translateY(0); }
}

/* КОНТЕНТ ПО ЦЕНТРУ */
/* =========================
   Контентный блок
========================= */
.content {
    position: relative;
    width: 90%;              /* адаптивная ширина */
    max-width: 1200px;        /* максимум на десктопе */
    margin: 60px auto;       /* отступ сверху и центрирование */
    padding: 40px 40px;
    border-radius: 28px;
    background: rgb(30 30 30 / 9%); /* темный полупрозрачный фон для читаемости */
    backdrop-filter: blur(5px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    border: 2px solid transparent;
    overflow: hidden;
    z-index: 1;
}

/* Градиентная рамка */
.content::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    border-radius: 30px;
    background: #39433e7a;
    /*background: linear-gradient(270deg, rgba(53, 90, 47, 0.15), #ffffff2b, rgba(143, 63, 54, 0.19), rgba(73, 113, 67, 0.2));*/
    background-size: 600% 600%;
    z-index: -1;
    animation: borderMove 8s ease infinite;
}

@keyframes borderMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =========================
   Текст блога
========================= */
.blog-content {
    color: #f0f0f0;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    font-weight: 400;
}

/* Заголовки */
.blog-content h1,
.blog-content h2,
.blog-content h3 {
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    margin: 1.5em 0 0.5em 0;
    line-height: 1.2;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.blog-content h1 { font-size: 2.5rem; }
.blog-content h2 { font-size: 2rem; }
.blog-content h3 { font-size: 1.5rem; }

/* Абзацы */
.blog-content p {
    font-size: 1rem;
    margin: 1em 0;
    text-shadow: 0 0 4px rgba(0,0,0,0.7);
    text-align: justify;
}

/* Картинки */
.blog-content img {
    max-width: 100%;
    border-radius: 16px;
    /*margin: 20px 30px 20px 20px;*/
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* Списки */
.blog-content ul, .blog-content ol {
    padding-left: 1.5em;
    margin: 1em 0;
}

/* Цитаты */
.blog-content blockquote {
    border-left: 4px solid rgba(255,255,255,0.5);
    padding-left: 1em;
    margin: 1em 0;
    font-style: italic;
    opacity: 0.9;
}

.float-left {
    float: left;
    width: 300px;       /* желаемая ширина картинки */
    margin: 0 30px 10px 0; /* отступ справа и снизу */
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.float-right {
    float: right;
    width: 300px;
    margin: 0 0 10px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Чтобы блочные элементы не накладывались на float */
.blog-content::after {
    content: "";
    display: block;
    clear: both;
}

/* ===== ОБЩИЙ ФОН ===== */

.background-main,
.video-kazan,
.video-laishevo {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
    display: none; /* скрыты по умолчанию */
}

/* КАРТИНКА ПО УМОЛЧАНИЮ */
.background-main {
    display: block;
    background: url("/content/vechniy_ogon.jpg") center / cover no-repeat;
}

/* ВИДЕО */
.video-kazan video,
.video-laishevo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* затемнение поверх видео/картинки для читаемости текста */
.background-main::after,
.video-kazan::after,
.video-laishevo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */

@media (max-width: 768px) {
    .background-main {
        background-position: center center;
        background-size: cover;
    }
}

/* Адаптивность */
@media screen and (max-width: 768px) {
    .content {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .blog-content h1 { font-size: 2rem; }
    .blog-content h2 { font-size: 1.75rem; }
    .blog-content h3 { font-size: 1.3rem; }
    .blog-content p { font-size: 0.95rem; }
}
