:root {
    /* 🎨 Рамки */
    --border-content: #FBC550;
    --border-menu-active: #F8AB05;
    --border-menu-hover: #C58B0F;
    --border-submenu: #FBBF3C;

    /* 🎨 Фоны */
    --bg-submenu-hover: #F5CD75;

    /* 🎨 Текст */
    --text-content: #0001FC;
    --text-menu: #000000;
    --text-menu-hover: #ffffff;
    --text-menu-active: #261B03;

    /* 🔤 Шрифты */
    --font-menu: "Times New Roman", Georgia, Times, serif;
    --font-content: Verdana, Geneva, Arial, Helvetica, sans-serif;
}

/* Сброс */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Общие */
html {
    font-size: 100%;
}

body {
    font-family: var(--font-content);
    background-color: #F5CD75;
    background-image: url(../img/page-bg.jpg);
    background-repeat: repeat;
    background-attachment: scroll;
    background-position: top left;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: normal;
    color: var(--text-content);
}

/* Контейнер */
.container {
    max-width: clamp(320px, 90vw, 990px);
    /* max-width: 990px; */
    margin: 0 auto;
}

/* Верхний блок (синий фон) */
.header__top {
    padding-top: clamp(15px, 4vw, 30px);
    /* padding-top: 30px; */
}

.header__inner {
    background-color: #00f;
    background: url("../img/header-bg.jpg") center/cover no-repeat;
    border-radius: 25px 25px 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Текст смещен вправо */
    padding-top: clamp(30px, 8vw, 70px);
    padding-bottom: clamp(10px, 3vw, 17px);
    /* padding-top: 70px; 
    padding-bottom: 17px; */
    text-align: right;
    border-left: 1px solid var(--border-content);
    border-right: 1px solid var(--border-content);
    border-top: 1px solid var(--border-content);
}

/* Текст (заголовок + подзаголовок) */

.header__title {
    font-family: var(--font-menu);
    font-size: clamp(1.4rem, 5vw, 2.3rem);
    /* font-size: 2.3rem; */
    font-style: normal;
    font-weight: bold;
    line-height: 1.2;
    padding: 0;
    margin-bottom: 23px;
    color: #F4C662;
}

.header__subtitle {
    font-family: var(--font-menu);
    font-size: clamp(1rem, 3vw, 1.6rem);
    /* font-size: 1.6rem; */
    padding: 0;
    margin: 0;
    color: #FFFFFF;
}

/* Меню (жёлтые кнопки) */
.header__nav-wrapper {
    background-color: #f0b429;
    padding: 3px;
    background: url("../img/nav.png") center/cover no-repeat;
    border-left: 1px solid var(--border-content);
    border-right: 1px solid var(--border-content);
}


/* Список меню */

/* Основной список */
.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
    list-style: none;
}

/* Пункт меню */
.menu-item {
    position: relative;
    border-radius: 10px 0;
    margin: 0;
    z-index: 1;
}

/* Ссылки */
.menu > .menu-item > a {
    box-sizing: border-box;
    font-family: var(--font-menu);
    display: block;
    text-decoration: none;
    background: url("../img/menubgitem.png") center/cover no-repeat, linear-gradient(#ffd46b, #e0a800);
    padding: clamp(2px, 1vw, 4px) clamp(8px, 2vw, 14px);
    line-height: clamp(20px, 3vw, 27px);
    border-radius: 10px 0;
    border: 1px solid transparent;
    color: #000;
    font-size: 0.9rem;
    transition: 0.2s;
}

/* Hover */
.menu > .menu-item:hover > a {
    color: #fff;
    border: 1px solid var(--border-menu-hover);
}

.menu-item.active {
    z-index: 2;
}


/* Активный пункт */
.menu > .current-menu-item > a,
.menu > .current-menu-item:hover > a {
    background: #fff;
    color: #261B03;
    border: 1px solid var(--border-menu-active);
    cursor: default;
}

/* Подменю */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    /* display: none; */

    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
    pointer-events: none;

    transition: 
        opacity 0.3s ease,
        transform 0.3s ease;

    background: #C88A04;
    padding: 1px 1px 0;
    list-style: none;
}

/* Пункты подменю */
.sub-menu li {
    background: #fff;
    margin-bottom: 1px;
    line-height: clamp(20px, 3vw, 26px);
    border-radius: 0;
}

/* Ссылки подменю */
.sub-menu a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: var(--text-menu);
    transition: 0.2s;
}

/* Показ подменю */
.menu-item:hover .sub-menu {
    display: block;
    background: #FBBF3C;
}

/* Hover в подменю */
.sub-menu a:hover {
    background: var(--bg-submenu-hover);
    color: #fff;
}

.menu-item:hover .sub-menu,
.menu-item:focus-within .sub-menu {
    /* display: block; */
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.main__container {
    /* margin: 0 auto; */
    background-color: #fff;
    border-left: 1px solid var(--border-content); /* #fbbf3c*/
    border-right: 1px solid var(--border-content);
}

.header__inner,
.main__container {
    padding-left: clamp(10px, 4vw, 20px);
    padding-right: clamp(10px, 4vw, 20px);
    /* padding-left: 20px;
    padding-right: 20px; */
}

.content {
    max-width: clamp(500px, 70%, 800px);
    /* max-width: 550px; */
    margin: 0 auto;
    font-size: 1rem;
    text-align: left;
    line-height: 150%;
    padding-top: clamp(15px, 4vw, 30px);
    padding-bottom: clamp(10px, 3vw, 15px);
    /* padding-top: 30px;
    padding-bottom: 15px; */
    display: flex;
    flex-direction: column;
}

.content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

.content__image {
    width: 100%;
    margin-bottom: clamp(20px, 5vw, 40px); /* Адаптивный отступ снизу */
    display: flex;
    justify-content: center; /* Центрируем фото, если оно узкое */
}

.content__image img {
    max-width: 100%;      /* Не дает картинке вылезти за края */
    height: auto;         /* Сохраняет пропорции */
    border-radius: 15px;  /* Мягкие углы в стиле сайта */
    border: 1px solid #C99930; /* Тонкая золотистая рамка */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Легкая тень */
}

/* Стих */
.content__poem {
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-bottom: clamp(15px, 4vw, 30px);
    /* margin-bottom: 30px; */
}

.content__poem p {
    margin-bottom: clamp(10px, 2.5vw, 20px);
    /* margin-bottom: 20px; */
    line-height: 1.6;
}

/* Обычный текст */
.content__text {
    text-align: justify;
    line-height: 1.6;
    text-indent: clamp(10px, 4vw, 37px);
    /* text-indent: 37px;
    line-height: 20px; */
}

.content__text p {
    margin-bottom: clamp(10px, 2.5vw, 20px);
    /* margin-bottom: 20px; */
    line-height: 1.6;
}
.avtop {
    text-align: right;
}

footer {
    margin-bottom: clamp(15px, 4vw, 30px);
    /* margin-bottom: 30px; */
}

.footer__inner {
    background: linear-gradient(#FDE5A4 0%, #F8B526 50%, #E18D00 100%);
    border-radius: 0 0 25px 25px;
    padding: 10px 20px ;
    text-align: center;
    border-left: 1px solid var(--border-content); /* #fbbf3c */
    border-right: 1px solid var(--border-content);
    border-bottom: 1px solid var(--border-content);
}

.footer__copyright {
    font-family: "Times New Roman", Georgia, Times, Serif;
    color: #000;
}

/* медиазапросы */
@media (hover: hover) {
    .menu-item:hover .sub-menu {
        display: block;
    }
}

@media (min-width: 1200px) {

    .content {
        max-width: 65ch;
    }

    .container {
        max-width: 1100px;
    }
}

@media (max-width: 1024px) {

    .content {
        max-width: 90%;
    }

    .header__inner {
        padding-top: clamp(20px, 6vw, 50px);
    }
}

@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .menu {
        flex-direction: column;
        align-items: stretch;
    }

    .menu-item > a {
        text-align: center;
    }

    .header__inner {
        justify-content: center;
        text-align: center;
    }
    .sub-menu {
        position: static;
        opacity: 1;
        transform: none;
        visibility: visible;
        pointer-events: auto;
        display: none;      /* скрываем нормально */
    }

    .menu-item.active .sub-menu {
        display: block;
    }

    .content__poem {
        margin-left: 0;
    }
}

@media (max-width: 480px) {

    .header__inner {
        justify-content: center;
        text-align: center;
    }

    .header__title {
        margin-bottom: 10px;
    }

    .content {
        max-width: 100%;
    }

    .content__poem {
        margin-left: 0;
        max-width: 100%;
    }

    .content__text {
        text-indent: 0;
        text-align: left;
    }
}