@font-face {
    font-family: "Cyrillic Old";
    src: url("../fonts/CyrillicOldBold.woff") format("woff"),
         url("../fonts/CyrillicOldBold.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Georgia";
    src: url("../fonts/georgia.ttf") format("truetype");
}

body {
    margin: 0px;
    font-family: "Georgia", serif;
    background-color: #FFFFFF;
    color: black;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    border-bottom: 1px solid #7FB68D;
    background-color: #FFFFFF;
    position: fixed;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box; /* <-- исправляет выход за экран */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 60px;
}

/* Компактная иконка-логотип — по умолчанию скрыта, показывается только на
   узких экранах (≤600px) вместо широкого текстового логотипа. */
.logo-mark {
    display: none;
}

/*Меню*/
.main-menu {
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-menu a {
    text-decoration: none;
    color: #000000;
    font-weight: 400;
    font-size: 16px;
}

.main-menu img {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.main-menu a:hover {
    color: #444;
}

.main-menu img:hover {
    transform: scale(1.05); /* лёгкое увеличение */
}

/*Вступительный блок*/
.title-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(24px, 4vw, 56px);
    /* side padding shrinks as the screen narrows, capped at 200px on wide screens;
       top padding clears the fixed navbar (~101px) with breathing room */
    padding: 150px clamp(40px, 11vw, 200px) 105px;
}

.title-text {
    flex: 1 1 60%;
    min-width: 0;       /* let the big title wrap instead of spilling over the image */
}

.title-image {
    flex: 0 1 38%;
}

.logo-head {
    position: relative;
    top: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-head img {
    width: auto;       /* ширина считается от высоты, чтобы крест не сжимало */
    height: 48px;
    padding: 0;        /* был padding-left: 10px — он обрезал крест */
    display: block;
}

/* Текст рядом с крестом — специфичнее общего .head, чтобы перебить
   margin-top: 56px и text-align: center из второго правила ниже */
.logo-head .head {
    font-family: "Georgia", serif;
    font-size: 28px;
    color: #7FB68D;
    font-style: italic;
    font-weight: 400;
    white-space: nowrap;
    margin: 0;
    text-align: left;
    line-height: 1.2;
}

.head {
    font-size: 30px;
    color: #7FB68D;
    font-style: italic;
    white-space: nowrap;
}

.title-head {
    position: relative;
    z-index: 1;              /* поверх картинки храма, чтобы заголовок не перекрывался */
    font-family: "Cyrillic Old", serif;
    font-size: clamp(56px, 6vw, 115px);
    line-height: 1.08;
    padding-left: 10px;
    font-weight: 400;
    overflow-wrap: break-word;
}

/*Краткая информация*/
.container {
    max-width: 100%;
    padding: 0 20px;
}

.text-pigeon {
    font-size: 30px;
    line-height: 20px;
    font-weight: 200;
    text-align: center;
}

.text-pigeon img {
    vertical-align: middle;
    height: 1em;
}

.text-calendar {
    text-align: center;
    font-size: 30px;
    font-weight: 200;
    line-height: 20px;
}

.text-calendar img {
    vertical-align: middle;
    height: 1em;
}

.text-bread {
    text-align: center;
    font-size: 25px;
    font-weight: 200;
    line-height: 20px;
    height: 56px;
}

.text-bread img {
    vertical-align: middle;
    height: 1em;
}

.holidays {
    padding-left: 80px;
    padding-right: 80px;
}

.holidays img {
    vertical-align: middle;
    height: 1em;
}

.holidays h3 {
    font-size: 30px;
    line-height: 50px;
    font-weight: 200;
    height: 40px;
}

.holidays p {
    font-size: 20px;
    line-height: 30px;
    height: auto;
}

.holidays a {
    color: #3D9152;
    font-size: 17px;
    line-height: 15px;
    vertical-align: sub;
}


.holidays a:hover {
    filter: brightness(0.8); /*затемнение при наведении*/
}

.quote {
    margin-bottom: 15px;
}

/*Контейнер с новостями*/
.news-section {
    max-width: 100%;
    padding: 40px 20px;
}

.main-headlines {
    font-size: 30px;
    line-height: 50px;
    font-weight: 200;
    min-height: 56px;   /* was height:56px — let long headings wrap & grow instead of overlapping the content below */
    margin: 0 0 8px;
    text-align: center;
}

/* On phones the long section headings wrap to 2+ lines — tighten the line
   spacing and keep them off the screen edges. */
@media (max-width: 600px) {
    .main-headlines {
        line-height: 1.3;
        padding: 0 16px;
    }
}

.news-grid {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.news-card {
    width: 300px;
    margin-top: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-images {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background-color: #D9D9D9;
    border: 1px solid #000000;
    display: block;
}

.date {
    width: 153px;
    height: 23px;
    background-color: #7FB68D;
    color: #000000;
    position: absolute;
    top: 20px;
    left: 1px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    padding-top: 1px;
}

.news-content {
    padding: 10px 1px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0;

/* Новое: фиксируем высоту текста */
    height: 100px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    }

.news-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, #38503E, #ffffff);
    width: 100%;
    margin: 5px 0;
}

 /*Описание новости*/
.news-description {
    font-size: 16px;
    margin-bottom: auto; /* чтобы прижать вверх*/
}

.read-more {
    display: block;
    margin-top: 20px;
    margin-bottom: 25px;
    font-size: 15px;
    color: #7FB68D;
    transition: 0.3s;
    text-align: center;
    text-decoration: underline;
}

.read-more:hover {
    filter: brightness(0.8); /*затемнение при наведении*/
}

.read-all-button {
    text-align: center;
    margin-top: 40px;
}

.read-all-button button,
.read-all-button a {
    display: inline-block;
    background: linear-gradient(to right, #3D9152, #7FB68D);
    color: white;
    padding: 15px 34.5px;
    font-size: 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.2s ease-in-out; /* плавный эффект */
}

.read-all-button button:hover,
.read-all-button a:hover {
    transform: scale(1.05); /* лёгкое увеличение */
    color: white;
}

/*О батюшке*/
.rector-main-inform {
    margin: 40px auto;
    max-width: 1280px;
    padding: 0 20px;
    box-sizing: border-box;
}

.square {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #a0d2a3, #3e5f47);
    border-radius: 20px;
    gap: 22px;
    height: 280px;
    padding-left: 108px;
    margin-bottom: 56px;
    margin-top: 70px;
}

.rector-image {
    display: flex;
    align-items: center;
    height: 100%;
}

.rector-image img {
    display: block; /* убирает лишние отступы */
    max-height: 100%;
    width: auto;
}

.about-rector {
    text-align: center;
}

.about-rector h2 {
    font-size: 40px;
    font-weight: 200;
    color: #000000;
    margin-bottom: 27px;
}

.about-rector h3 {
    font-size: 30px;
    font-weight: 200;
    color: #000000;
    margin-bottom: 27px;
}

.more-details-button,
a.more-details-button {
    display: inline-block;
    background: linear-gradient(to right, #A18C3B, #866D06);
    padding: 12px 31px;
    font-size: 20px;
    font-weight: 300;
    color: #FFFFFF;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.2s ease-in-out;
}

.more-details-button:hover,
a.more-details-button:hover {
    transform: scale(1.05);
    color: #FFFFFF;
}

/*Расписание Богослужений*/
/* Пустое расписание на главной (карточки дней — общий компонент
   includes/schedule_day.html, стили в блоке .schedule-week ниже). */
.schedule-empty {
    text-align: center;
    font-family: "Georgia", serif;
    color: #444;
    margin: 40px 0;
}

/*Секция с полезным*/
.section-useful-main {
    margin: 90px 120px;
}

.section-useful-main h2 {
    margin-bottom: 40px;
}

.section-useful {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.square-with-information {
    max-width: 413px;
    height: 201px;
    background: #DBF0E0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 30px;
    box-sizing: border-box;
}

.image-useful img {
    width: 100px;
    height: 85px;
}

.text-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    line-height: 20px;
    height: 100%;
}

.title {
    font-size: 18px;
    font-weight: 300;
    color: #000000;
    padding-left: 10px;
}

.square-with-information hr {
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, #A18C3B, #DBF0E0);
    border: none;
    margin: 5px 0;
}

.more-details a {
    font-size: 17px;
    font-weight: 200;
    color: #3D9152;
    text-decoration: underline;
    transition: all 0.3s ease;
    padding-left: 35px;
    margin-top: 5px; /* вместо padding-top */
    display: inline-block; /* чтобы margin работал */
}

/*Секция с храмами*/
.container-with-churches {
    display: flex;
    justify-content: center;
    gap: 196px;
    margin-top: 56px;
}

.square-of-churche-of-mother-of-Christ,
.square-of-churche-of-George {
    width: 435px;
    height: 170px;
    background: #DBF0E0;
    display: flex;
    justify-content: space-between; /*карточки слева, текст+ссылка справа*/
    align-items: center;
    padding: 18px 20px;
    position: relative;
}

h3 {
    font-weight: 400;
    font-size: 20px;
    line-height: 25px;
}

.text-churche1 {
    text-align: left;
    padding-left: 20px;
    flex: 1;
}

.information-of-chuche {
    font-size: 13px;
    line-height: 20px;
}

.map-photo,
.phone-photo {
    width: 19px;
    height: 19px;
    vertical-align: middle;
    margin-right: 10px;
}

.location-ch {
    color: #000000;
    text-decoration: none;
}

.phone-num {
    color: #000000;
    text-decoration: none;
}

.phone-num:hover {
    color: #444;
}

.location-ch:hover {
    color: #444;
}

.more {
    font-size: 15px;
    color: #A18C3B;
    position: absolute;
    bottom: 15px;
    right: 20px;
}

.more:hover {
    filter: brightness(0.8); /*затемнение при наведении*/
}

/*Футер*/
footer {
    background: #7FB68D;
    padding: 20px 75px 10px 75px;
    margin-top: 150px;
}

.section-with-footer {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 82px;
    max-width: 2000px;
    margin: 0 auto;
}

.main-information {
    margin-top: 10px;
}

.main-information p {
   max-width: 600px;
   margin: 20px 0;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.social-icons img {
    width: 35px;
    height: 35px;
    cursor: pointer;
}

.secondery-information p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 15px 0;
    max-width: 600px;
}

.secondery-information img {
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    margin-right: 10px;
}

.secondery-information a {
    color: inherit;
    text-decoration: underline;
}

.label {
    font-weight: 600;
    margin-right: 6px;
}

.secondery-information a:hover {
    color: #444;
}

.official {
    color: #866D06;
    text-align: center;
    margin-top: 40px;
    font-size: 16px;
}


/*Секция для поисковика*/
.search-form {
    display: flex; /* ставим элементы в строку */
    justify-content: center; /* центрируем */
    margin-top: 20px;
}

.search-input {
   width: 657px;
   height: 24px;
   border: 0.5px solid #000000;
   border-radius: 2px;
   margin-left: 750px;
   margin-right: 60px;
   z-index: 1000;
   position: absolute;
   background: #FFFFFF;
   padding: 2px 8px;
   top: 38px;
}

/*Секция с контактами*/

.head {
    font-family: "Georgia", serif;
    color: #000000;
    font-size: 40px;
    font-weight: 400;
    text-align: center;
    margin-top: 56px;
}

.contacts-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 70px;
}

.information-contacts {
    flex: 1;
    max-width: 600px;
    line-height: 25px;
    margin-left: 80px;
}

.information-contacts a {
    text-decoration: underline;
    color: #000000;
}

.information-contacts p {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.img-contacts {
    flex-shrink: 0;
    width: 25px;
    height: 25px;
}

.section-with-map {
    flex-shrink: 0;
    margin-right: 80px;
}

/* ============================================
   Дропдаун-меню в шапке
   (вложенные <ul> внутри .main-menu из includes/header.html)
   ============================================ */

.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Верхний уровень — горизонтальный ряд */
.main-menu > ul {
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-menu li {
    position: relative;
}

/* Подменю спрятано по умолчанию */
.main-menu li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #FFFFFF;
    border: 1px solid #7FB68D;
    min-width: 240px;
    padding: 8px 0;
    z-index: 1100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Подменю второго уровня — раскрывается ВНИЗ внутри родительского подменю,
   без отдельного бордера и тени (визуально "растворяется" внутри). */
.main-menu li li ul {
    position: static;
    top: auto;
    left: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-width: 0;
}

/* Пункты второго уровня — ещё мельче, чтобы отличаться от первого уровня */
.main-menu li li ul a {
    font-size: 13px;
    font-style: italic;
    font-weight: 300;
    color: #555;
    padding: 8px 18px 8px 30px; /* отступ слева больше — показывает вложенность */
    border-bottom: 1px solid #f5f5f5;
    line-height: 1.4;
}

.main-menu li li ul li:last-child > a {
    border-bottom: none;
}

.main-menu li li ul a:hover {
    background: #f7f7f7;
    color: #000;
}

/* Показываем подменю при наведении */
.main-menu li:hover > ul {
    display: block;
}

.main-menu li a {
    display: block;
    padding: 8px 14px;
}

/* Пункты ВНУТРИ выпадающего подменю — мельче, тоньше, italic Georgia,
   с воздухом между ними и тонкими разделителями */
.main-menu li ul a {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 14px;
    font-weight: 300;
    color: #222;
    padding: 12px 18px;
    border-bottom: 1px solid #efefef;
    line-height: 1.4;
    white-space: nowrap;
}

.main-menu li ul li:last-child > a {
    border-bottom: none;
}

.main-menu li ul a:hover {
    background: #f5f5f5;
    color: #000;
}

/* Треугольник-индикатор у пунктов с подменю (вниз) */
.main-menu .arrow {
    display: inline-block;
    margin-left: 6px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
}

/* Стрелка во втором уровне — такая же как у верхнего: вниз и рядом со словом.
   (Раньше стояла справа и вбок, но теперь подменю раскрывается вниз — стрелка
   должна об этом сигналить.) */

/* ============================================
   Раскрывающийся поиск в шапке
   ============================================ */

.search-toggle {
    background: none;
    border: none;
    padding: 6px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.search-toggle img {
    width: 18px;
    height: 18px;
    transition: transform 0.15s ease;
}

.search-toggle:hover img {
    transform: scale(1.1);
}

.search-toggle:focus-visible {
    outline: 2px solid #7FB68D;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Панель открывается прямо под шапкой (header — её containing block) */
.search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid #7FB68D;
    padding: 24px 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}

.search-panel-form {
    max-width: 1200px;
    margin: 0 auto;
}

.search-panel-input {
    width: 100%;
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 18px;
    padding: 12px 16px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background: transparent;
    outline: none;
    box-sizing: border-box;
    color: #222;
}

.search-panel-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-panel-input:focus {
    border-color: #7FB68D;
}

/* ============================================
   Страница-статья раздела "История храма"
   (ourtime, historyofbuilding, letter, reconstruction, secondconsecration)
   ============================================ */

.article-page {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

.breadcrumbs {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 15px;
    color: #7FB68D;
    padding: 130px 40px 0;
    margin: 0 auto 40px;
    max-width: 1200px;
    box-sizing: border-box;
}

.breadcrumbs a {
    color: #7FB68D;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: #444;
}

.article-part {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 22px;
    font-weight: 400;
    color: #444;
    margin: 0 0 10px;
    text-align: center;
}

.article-title {
    font-family: "Cyrillic Old", serif;
    font-size: 54px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 0 50px;
    line-height: 1.1;
}

.article-text {
    font-family: "Georgia", serif;
    font-size: 17px;
    line-height: 1.75;
    color: #222;
    margin: 0 0 28px;
    text-align: justify;
}

.article-text p {
    margin: 0 0 18px;
}

.article-text b {
    font-weight: 600;
}

.photo-card {
    margin: 40px auto;
    text-align: center;
}

.photo-card img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Если в одном блоке несколько картинок — раскладываем в ряд */
.photo-card img + img {
    margin-left: 16px;
}

.photo-caption {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 16px;
    color: #7FB68D;
    margin: 14px 0 0;
    line-height: 1.4;
    text-align: center;
}

/* Универсальные стили для любого текста внутри .article-page,
   чтобы простые страницы вроде "Крещение" или "Венчание" работали
   без обёртывания каждого <p> в <div class="article-text">. */
.article-page p {
    font-family: "Georgia", serif;
    font-size: 17px;
    line-height: 1.75;
    color: #222;
    margin: 0 0 18px;
    text-align: justify;
}

.article-page b {
    font-weight: 600;
}

/* На странице "Евангелие" текст лежит прямо в <div> без <p>. Стилизуем и его. */
.article-page > section > div,
.article-page > div:not(.article-text):not(.photo-card) {
    font-family: "Georgia", serif;
    font-size: 17px;
    line-height: 1.75;
    color: #222;
    text-align: justify;
}

/* Поднимаем специфичность подписи к фото, чтобы её не перебивало правило выше */
.article-page .photo-caption,
.photo-card .photo-caption {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 16px;
    color: #7FB68D;
    margin: 14px 0 0;
    line-height: 1.4;
    text-align: center;
}

/* Несколько <section class="article-page"> подряд (биография настоятеля
   и т.п.) — без огромного пустого пространства между ними */
.article-page + .article-page {
    margin-top: 60px;
}

/* Свободная картинка прямо внутри .article-page (фото настоятеля, иконы и т.п.) */
.article-page > img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Страница "Настоятель" — индивидуальный стиль
   (заголовок курсивом Georgia, круглое фото слева, информация справа)
   ============================================ */

.priest-section .article-title {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 44px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 0 40px;
    line-height: 1.2;
}

.priest-intro {
    display: flex;
    align-items: center;
    gap: 60px;
    margin: 0 auto;
}

.priest-photo {
    flex: 0 0 280px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: #f5f5f5;
}

.priest-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}

.priest-info {
    flex: 1;
}

.priest-info p {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.7;
    color: #222;
    margin: 0 0 18px;
    text-align: left;
}

.priest-info p b {
    font-weight: 700;
}

/* Биография: текст слева, итальянский Georgia, переносы строк из исходника сохраняются */
.priest-section > p {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.85;
    color: #222;
    margin: 0;
    text-align: left;
    white-space: pre-line;
}

/* Дата над заголовком новости-статьи */
.article-date {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 14px;
    color: #7FB68D;
    margin: 0 0 12px;
    text-align: center;
}

/* Цитата из Писания над текстом статьи */
.article-quote {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 18px;
    text-align: center;
    color: #222;
    margin: 0 0 30px;
    line-height: 1.5;
}

.article-quote span {
    color: #7FB68D;
    font-size: 15px;
    margin-left: 8px;
}

/* Подзаголовок внутри статьи: "Что нужно знать", "Необходимые документы" */
.article-subtitle {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 24px;
    font-weight: 400;
    color: #3D9152;
    margin: 36px 0 16px;
    text-align: left;
}

/* Список пунктов внутри статьи */
.article-list {
    font-family: "Georgia", serif;
    font-size: 16px;
    line-height: 1.7;
    color: #222;
    padding-left: 24px;
    margin: 0 0 20px;
}

.article-list li {
    margin: 0 0 10px;
}

.article-list li::marker {
    color: #7FB68D;
}

/* Благословение в конце статьи */
.article-blessing {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 17px;
    color: #3D9152;
    text-align: center;
    margin-top: 36px;
}

/* ============================================
   Страница "Расписание Богослужений"
   ============================================ */

.schedule-title {
    font-family: "Cyrillic Old", serif;
    font-size: 48px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 auto 50px;
    max-width: 1200px;
    padding: 0 40px;
    box-sizing: border-box;
    line-height: 1.2;
}

.schedule-week {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto 70px;
    padding: 0 40px;
    box-sizing: border-box;
}

.schedule-week > h3 {
    flex: 1 1 100%;
    font-family: "Georgia", serif;
    font-size: 26px;
    font-weight: 400;
    color: #222;
    text-align: center;
    margin: 0 0 30px;
    line-height: 1.3;
}

.schedule-week > div {
    flex: 0 1 240px;
    min-height: 340px;
    background: #DBF0E0;
    border-radius: 10px;
    padding: 22px 20px;
    box-sizing: border-box;
    text-align: center;
}

.schedule-week > div h4 {
    font-family: "Georgia", serif;
    font-size: 22px;
    font-weight: 400;
    color: #222;
    margin: 0 0 4px;
}

.schedule-week > div h5 {
    font-family: "Georgia", serif;
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin: 0 0 16px;
}

.schedule-week > div p {
    font-family: "Georgia", serif;
    font-size: 14px;
    line-height: 1.5;
    color: #222;
    margin: 0 0 12px;
    text-align: left;
}

.schedule-week > div hr {
    height: 1px;
    background: #A18C3B;
    width: 100%;
    border: none;
    margin: 16px auto;
    opacity: 0.5;
}

/* ============================================
   Страница "Новости" (список + пагинация)
   ============================================ */

.news-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 60px;
    padding: 0 40px;
    box-sizing: border-box;
}

.news-page > h2 {
    grid-column: 1 / -1;
    font-family: "Georgia", serif;
    font-size: 36px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 0 30px;
    line-height: 1.2;
}

.news-page article {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative; /* контекст для бейджа с датой */
    box-sizing: border-box;
}

/* Дата — зелёная плашка как на главной (.date): жирная, чёрный текст */
.news-page article > div:nth-of-type(1) {
    position: absolute;
    top: 20px;
    left: 0;
    width: 153px;
    height: 23px;
    line-height: 23px;
    background: #7FB68D;
    color: #000000;
    font-family: "Georgia", serif;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    z-index: 2;
}

/* Заглушка фото 4:3 — серый прямоугольник */
.news-page article > div:nth-of-type(2) {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #d9d9d9;
    border-radius: 0;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 32px;
    font-family: "Georgia", serif;
}

.news-page article h3 {
    font-family: "Georgia", serif;
    font-size: 15px;
    font-weight: 700;
    color: #000;
    margin: 0 0 24px;
    line-height: 1.4;
    padding-bottom: 18px;
    position: relative;
}

/* Линия-разделитель после заголовка: 2 px, градиент от тёмно-зелёного к белому */
.news-page article h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, #38503E, #FFFFFF);
}

.news-page article p {
    font-family: "Georgia", serif;
    font-size: 14px;
    line-height: 1.55;
    color: #222;
    margin: 0 0 12px;
    text-align: left;
}

.news-page article .read-more {
    margin-top: auto;
    padding-top: 28px;
    display: block;
    text-align: center;
    color: #7FB68D;
    text-decoration: underline;
    font-size: 15px;
    font-family: "Georgia", serif;
    transition: 0.3s;
}

.news-page article .read-more:hover {
    filter: brightness(0.8);
}

/* Пагинация — общая для новостей, фотогалереи, отчёта */
.pagination-section {
    text-align: center;
    margin: 0 auto 80px;
    padding: 0 40px;
    max-width: 1200px;
    box-sizing: border-box;
}

.pagination-section > div {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Стрелки-шевроны: оранжевые, без рамки. Видны всегда; когда вести некуда —
   серые и некликабельные (.is-disabled). */
.pagination-section .page-arrow {
    display: inline-flex;
    align-items: center;
    color: #E6A92E;
    font-size: 28px;
    font-weight: 400;
    line-height: 1;
    padding: 0 16px;
    text-decoration: none;
    font-family: "Georgia", serif;
    transition: color 0.2s;
}

.pagination-section a.page-arrow:hover {
    color: #B88216;
}

.pagination-section .page-arrow.is-disabled {
    color: #d6d6d6;
    cursor: default;
    pointer-events: none;
}

/* Номера страниц: чёрные, без рамок и фона */
.pagination-section .page {
    display: inline-block;
    padding: 0 6px;
    text-decoration: none;
    color: #222;
    font-family: "Georgia", serif;
    font-size: 16px;
    line-height: 1;
}

.pagination-section .page.active {
    color: #000;
    font-weight: 700;
}

.pagination-section .page:hover:not(.active) {
    color: #555;
}

.pagination-section .dots {
    color: #222;
    padding: 0 4px;
}

/* ============================================
   Страница "Новости" — выровненная сетка списка
   и кликабельные карточки (картинка + заголовок)
   ============================================ */

.news-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.news-list-grid .news-card {
    width: 100%;
    margin-top: 0;
}

/* Картинка и заголовок ведут на страницу новости */
.news-card a.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.news-card h3 a.card-link {
    transition: color 0.3s;
}

.news-card a.card-link:hover {
    color: #3D9152;
}

@media (max-width: 992px) {
    .news-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .news-list-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

/* ============================================
   Страница "Святыни храма"
   ============================================ */

.shrines-page {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 40px;
    box-sizing: border-box;
}

.shrines-page > h2 {
    font-family: "Georgia", serif;
    font-size: 36px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 0 30px;
    line-height: 1.2;
}

/* ============================================
   Страница "История храма" — оглавление со ссылками
   на 5 подстраниц истории
   ============================================ */

.history-index {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 40px;
    box-sizing: border-box;
}

.history-index > h2 {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 40px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 0 50px;
    line-height: 1.2;
}

/* Вступление: фото слева, текст справа */
.history-intro {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 60px;
}

.history-intro img {
    flex: 0 0 40%;
    max-width: 40%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.history-intro p {
    flex: 1;
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.65;
    color: #222;
    margin: 0;
    text-align: justify;
}

/* Сетка из 5 карточек — подразделы истории */
.history-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.history-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s ease;
}

.history-card:hover {
    opacity: 0.85;
}

.history-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.history-card h3 {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 15px;
    font-weight: 400;
    color: #222;
    margin: 14px 0 2px;
    text-align: center;
    line-height: 1.3;
}

.history-card p {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 15px;
    color: #222;
    margin: 0;
    text-align: center;
    line-height: 1.3;
}

/* Иконка + текст в строку — список "Цели и задачи" на information.html и т.п. */
.icon-list p {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 0 0 22px;
    text-align: left;
}

.icon-list p img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin: 4px 0 0;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    background: none;
}

.icon-list p span {
    flex: 1;
    font-family: "Georgia", serif;
    font-size: 16px;
    line-height: 1.65;
    color: #222;
}

/* ============================================
   Страница результатов поиска (seachlist.html)
   ============================================ */

.search-results-page {
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 40px;
    box-sizing: border-box;
}

.search-results-page h2 {
    font-family: "Georgia", serif;
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0 0 16px;
    line-height: 1.2;
}

.search-results-page > p {
    font-family: "Georgia", serif;
    font-size: 14px;
    color: #444;
    margin: 0 0 24px;
    line-height: 1.55;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: stretch;
    margin: 0 0 36px;
}

.search-form input {
    flex: 1;
    max-width: 420px;
    font-family: "Georgia", serif;
    font-size: 14px;
    font-style: italic;
    padding: 8px 12px;
    border: 1px solid #aaa;
    background: transparent;
    outline: none;
    color: #222;
}

.search-form input:focus {
    border-color: #7FB68D;
}

.search-form button {
    background: #DBF0E0;
    color: #222;
    border: 1px solid #7FB68D;
    padding: 8px 24px;
    font-family: "Georgia", serif;
    font-size: 14px;
    cursor: pointer;
}

.search-form button:hover {
    background: #c0e2c8;
}

.results-list {
    display: flex;
    flex-direction: column;
}

.search-result {
    text-decoration: none;
    color: inherit;
    padding: 18px 0;
    border-bottom: 1px solid #e0e0e0;
    display: block;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result h3 {
    font-family: "Georgia", serif;
    font-size: 18px;
    font-weight: 500;
    color: #3D9152;
    margin: 0 0 6px;
    text-decoration: underline;
}

.search-result p {
    font-family: "Georgia", serif;
    font-size: 14px;
    color: #444;
    margin: 0;
    line-height: 1.55;
}

.search-result:hover h3 {
    color: #2a6939;
}

/* ============================================
   Категория-карточки
   (страницы "Полезное", "Детская воскресная школа" — выбор подраздела)
   ============================================ */

.category-page {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 40px;
    box-sizing: border-box;
}

.category-page > h2 {
    flex: 1 1 100%;
    font-family: "Cyrillic Old", serif;
    font-size: 54px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 0 30px;
    line-height: 1.1;
}

.category-page > div {
    flex: 1 1 280px;
    max-width: 360px;
    background: #DBF0E0;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.category-page > div img {
    width: auto;
    max-width: 120px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 8px;
}

.category-page > div p,
.category-page > div h4 {
    font-family: "Georgia", serif;
    font-size: 18px;
    font-weight: 500;
    color: #222;
    margin: 0;
    line-height: 1.4;
}

.category-page > div hr {
    width: 80%;
    border: none;
    border-top: 1px solid #A18C3B;
    margin: 8px 0;
}

.category-page > div a.more-link {
    color: #3D9152;
    text-decoration: underline;
    font-family: "Georgia", serif;
    font-size: 16px;
}

.category-page > div a.more-link:hover {
    color: #2a6939;
}

/* ============================================
   Адаптивный навбар
   (гамбургер + мобильное меню-аккордеон для .main-menu из
   includes/header.html). Десктоп (≥993px) сохраняет hover-дропдауны
   как есть; здесь добавляется только скрытие гамбургера. Всё навбар-
   специфичное заскоплено на .main-menu / .nav-toggle, чтобы НЕ задеть
   <nav class="breadcrumbs"> на внутренних страницах.
   ============================================ */

/* Кнопка-гамбургер: спрятана на десктопе, показывается на ≤992px */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.nav-toggle__bar {
    display: block;
    width: 26px;
    height: 3px;
    background: #222;
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle:focus-visible {
    outline: 2px solid #7FB68D;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Анимация трёх линий в «крестик», когда меню открыто */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Стрелка-каретка — плавный поворот при раскрытии аккордеона */
.main-menu .arrow {
    transition: transform 0.2s ease;
}

@media (max-width: 1023px) {
    /* Шапка ниже: padding 14px 20px + лого 60px ≈ 88px высоты в свёрнутом
       виде, что укладывается в ~90-100px (отступы .breadcrumbs 130px /
       .title-menu 105px по-прежнему перекрывают шапку). */
    header {
        padding: 14px 20px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    /* Меню по умолчанию скрыто; раскрывается как панель под фикс-шапкой */
    .main-menu {
        display: none;
    }

    .main-menu.is-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        border-bottom: 1px solid #7FB68D;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        box-sizing: border-box;
        z-index: 1050;
    }

    /* Верхний уровень — вертикальный список во всю ширину */
    .main-menu > ul {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .main-menu li {
        position: static;
    }

    .main-menu li a {
        padding: 14px 20px;
    }

    /* Подменю — статичные аккордеоны, скрыты пока li не .is-open */
    .main-menu li ul {
        position: static;
        display: none;
        border: none;
        box-shadow: none;
        min-width: 0;
        padding: 0 0 0 16px;
        background: #FFFFFF;
    }

    /* На тач-устройствах НЕ раскрывать дропдаун по hover —
       только класс .is-open показывает подменю */
    .main-menu li:hover > ul {
        display: none;
    }

    .main-menu li.has-submenu.is-open > ul {
        display: block;
    }

    /* Каретка переворачивается, когда аккордеон открыт */
    .main-menu li.has-submenu.is-open > a .arrow {
        transform: rotate(180deg);
    }

    /* Поиск как обычный пункт меню во всю ширину */
    .main-menu .search-item {
        padding: 6px 12px;
    }

    /* Панель поиска — компактнее на узких экранах */
    .search-panel {
        padding: 16px 20px;
    }
}

/* ============================================
   Адаптив шапки, героя и подвала (узкие экраны)
   Фиксы переполнения по ширине на мобайле/планшете:
   логотип не выталкивает гамбургер, картинка храма
   не вылезает, подвал в столбик.
   ============================================ */

/* Картинка храма в герое не вылезает за свой блок (безопасно и на десктопе) */
.title-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Логотип в подвале (dlya-futera.png) не должен распирать колонку по ширине */
.main-information > img {
    max-width: 100%;
    height: auto;
}

/* Длинные ссылки/слова в тексте и заголовке статьи переносятся, а не распирают страницу */
.article-text,
.article-title {
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 1279px) {
    /* Шапка компактнее на узких экранах (логотип НЕ масштабируем — см. иконку ниже) */
    header {
        gap: 12px;
        padding: 14px 16px;
    }

    .nav-toggle {
        flex: 0 0 auto;
    }

    /* Герой: вертикальная раскладка, заголовок масштабируется,
       длинные надписи переносятся, картинка во всю ширину снизу */
    .title-menu {
        flex-direction: column;
        align-items: center;
        padding: 150px 16px 48px;
        gap: 16px;
    }

    .title-text {
        flex: 0 1 auto;
        max-width: 100%;
        text-align: center;
    }

    .logo-head {
        top: 0;
        justify-content: center;
    }

    .logo-head .head,
    .head {
        white-space: normal;
        font-size: clamp(16px, 5vw, 28px);
    }

    .title-head {
        font-size: clamp(34px, 9vw, 72px);
        line-height: 1.1;
        padding-left: 0;
    }

    .title-image {
        flex: 0 1 auto;
        width: 100%;
        text-align: center;
    }

    .title-image img {
        margin: 0 auto;
    }

    /* Блок настоятеля на главной — в столбик, без фикс-высоты и большого отступа */
    .rector-main-inform {
        margin: 32px auto;
        padding: 0 16px;
    }

    .square {
        flex-direction: column;
        height: auto;
        padding: 28px 20px;
        gap: 18px;
        text-align: center;
    }

    .rector-image {
        height: auto;
    }

    .rector-image img {
        max-height: 200px;
        max-width: 100%;
    }

    /* Страница настоятеля — фото над текстом */
    .priest-intro {
        flex-direction: column;
        gap: 24px;
        align-items: flex-start;
    }

    .priest-photo {
        flex-basis: auto;
        width: 220px;
        height: 220px;
    }

    /* Заголовок статьи 54px слишком большой для телефона — масштабируем */
    .article-title {
        font-size: clamp(28px, 7vw, 54px);
    }

    /* Подвал: колонки в столбик, без больших боковых отступов */
    footer {
        padding: 24px 20px;
        margin-top: 60px;
    }

    .section-with-footer {
        flex-direction: column;
        gap: 24px;
    }

    .main-information p,
    .secondery-information p {
        max-width: 100%;
    }
}

/* Узкие экраны: широкий текстовый логотип не помещается рядом с гамбургером
   и его нельзя сжимать — поэтому показываем компактную иконку-логотип. */
@media (max-width: 600px) {
    .logo .logo-full {
        display: none;
    }

    .logo .logo-mark {
        display: block;
        height: 52px;
        width: auto;
    }
}

/* ============================================
   Горизонтальное меню (≥1024px) с приоритет+ («Ещё»).
   Ниже 1024px — гамбургер (см. блок @media max-width:1023px):
   полноразмерный логотип занимает столько места, что пунктам
   рядом уже негде поместиться, поэтому там чище гамбургер.
   Компактно + подписи и стрелка ▼ не переносятся; пункты,
   которые не влезают, JS перекладывает в выпадашку «Ещё».
   ============================================ */
@media (min-width: 1024px) {
    header {
        padding: 18px 30px;
    }

    .main-menu > ul {
        gap: 14px;
    }

    .main-menu li a {
        padding: 8px 9px;
        font-size: 15px;
    }

    /* Подписи верхнего уровня — в одну строку (без переноса) */
    .main-menu > ul > li > a {
        white-space: nowrap;
    }

    /* Текст и стрелка ▼ в одной строке, стрелка по центру по вертикали */
    .main-menu .has-submenu > a {
        display: inline-flex;
        align-items: center;
    }
}

/* =====================================================================
   Фотогалереи (Swiper + GLightbox): карусель на главной, карусель в
   новости и адаптивная сетка страницы /gallery/.
   Зелёная палитра: #3D9152 / #7FB68D / #38503E, мятная подложка #DBF0E0.
   ===================================================================== */

/* ---- HOME: мятная полоса-обёртка (карусель внутри) ---- */
.section-with-photogallery {
    margin: 90px 0;
    text-align: center;
}

.gallery-strip {
    background: #DBF0E0;
    padding: 48px 0 40px;
    margin-top: 56px;
    position: relative;
}

.gallery-strip .read-all-button {
    margin-top: 36px;
}

/* Swiper-контейнер главной — с боковыми полями под стрелки */
.home-gallery {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 56px;
    box-sizing: border-box;
}

.home-gallery .swiper-slide {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(56, 80, 62, 0.18);
    background: #d9d9d9;
}

.home-gallery .swiper-slide a,
.home-gallery .swiper-slide img {
    display: block;
}

.home-gallery .swiper-slide img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.home-gallery .swiper-slide:hover img {
    transform: scale(1.06);
}

/* ---- NEWS detail: компактная карусель внутри статьи (900px колонка) ---- */
.news-gallery-block {
    margin: 44px 0 8px;
}

.news-gallery-block__title {
    font-family: "Cyrillic Old", serif;
    font-size: 28px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 0 24px;
    line-height: 1.2;
    position: relative;
}

.news-gallery-block__title::after {
    content: "";
    display: block;
    width: 80px;
    height: 2px;
    margin: 12px auto 0;
    background: linear-gradient(to right, #3D9152, #7FB68D);
    border-radius: 2px;
}

.news-gallery {
    padding: 0 44px;
    box-sizing: border-box;
}

.news-gallery .swiper-slide {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(56, 80, 62, 0.15);
    background: #d9d9d9;
}

.news-gallery .swiper-slide a,
.news-gallery .swiper-slide img {
    display: block;
}

.news-gallery .swiper-slide img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.news-gallery .swiper-slide:hover img {
    transform: scale(1.06);
}

/* ---- Общая зелёная тема Swiper (стрелки + буллеты) ---- */
.home-gallery .swiper-button-prev,
.home-gallery .swiper-button-next,
.news-gallery .swiper-button-prev,
.news-gallery .swiper-button-next {
    width: 40px;
    height: 40px;
    margin: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 50%;
    background: linear-gradient(to right, #3D9152, #7FB68D);
    box-shadow: 0 2px 8px rgba(56, 80, 62, 0.25);
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-gallery .swiper-button-prev { left: 8px; }
.home-gallery .swiper-button-next { right: 8px; }
.news-gallery .swiper-button-prev { left: 0; }
.news-gallery .swiper-button-next { right: 0; }

.home-gallery .swiper-button-prev:hover,
.home-gallery .swiper-button-next:hover,
.news-gallery .swiper-button-prev:hover,
.news-gallery .swiper-button-next:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(56, 80, 62, 0.35);
}

/* Стрелка-глиф мельче дефолтной */
.home-gallery .swiper-button-prev::after,
.home-gallery .swiper-button-next::after,
.news-gallery .swiper-button-prev::after,
.news-gallery .swiper-button-next::after {
    font-size: 16px;
    font-weight: 700;
}

.home-gallery .swiper-button-disabled,
.news-gallery .swiper-button-disabled {
    opacity: 0.45;
}

/* Буллеты пагинации в зелёный */
.section-with-photogallery .swiper-pagination-bullet,
.news-gallery-block .swiper-pagination-bullet {
    background: #38503E;
    opacity: 0.4;
}

.section-with-photogallery .swiper-pagination-bullet-active,
.news-gallery-block .swiper-pagination-bullet-active {
    background: #3D9152;
    opacity: 1;
}

/* Отступ под буллеты, чтобы не наезжали на фото */
.home-gallery,
.news-gallery {
    padding-bottom: 36px;
}

/* ---- GALLERY PAGE: адаптивная сетка ---- */
.gallery-page-section {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 40px;
    box-sizing: border-box;
}

.gallery-page-section__title {
    font-family: "Cyrillic Old", serif;
    font-size: 44px;
    font-weight: 400;
    color: #000;
    text-align: center;
    margin: 0 0 40px;
    line-height: 1.2;
}

.gallery-page {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-page__item {
    display: block;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(56, 80, 62, 0.15);
    background: #d9d9d9;
}

.gallery-page__item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-page__item:hover {
    box-shadow: 0 6px 20px rgba(56, 80, 62, 0.28);
}

.gallery-page__item:hover img {
    transform: scale(1.07);
}

.gallery-page-empty {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 18px;
    color: #7FB68D;
    text-align: center;
    margin: 40px 0 60px;
}

/* ---- Фокус-обводка для доступности (клавиатура) ---- */
.glightbox:focus-visible {
    outline: 3px solid #3D9152;
    outline-offset: 3px;
    border-radius: 12px;
}

/* ---- GLightbox: зелёный акцент ---- */
.glightbox-clean .gslide-title { font-family: "Georgia", serif; }
.glightbox-clean .gnext,
.glightbox-clean .gprev,
.glightbox-clean .gclose {
    background-color: rgba(61, 145, 82, 0.85);
    border-radius: 50%;
}
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover,
.glightbox-clean .gclose:hover {
    background-color: rgba(56, 80, 62, 0.95);
}
.gslide-description { background: #38503E; }
.gslide-title { color: #fff; }
.gdesc-inner { color: #DBF0E0; }

/* ---- Адаптив галерей ---- */
@media (max-width: 900px) {
    .gallery-page { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .gallery-page-section__title { font-size: 34px; }
}

@media (max-width: 640px) {
    .home-gallery { padding: 0 12px; }
    .home-gallery .swiper-button-prev,
    .home-gallery .swiper-button-next { display: none; } /* свайп вместо стрелок */
    .news-gallery { padding: 0 12px; }
    .news-gallery .swiper-button-prev,
    .news-gallery .swiper-button-next { display: none; }
}

@media (max-width: 560px) {
    .gallery-page { grid-template-columns: 1fr; }
    .gallery-page-section { padding: 0 20px; }
    .gallery-page-section__title { font-size: 28px; }
}

/* ============================================
   История храма (pages/history.html)
   ============================================ */

/* Hero-баннер с фоновым фото и затемнением поверх. */
.history-hero {
    position: relative;
    min-height: 380px;
    margin: 0 0 55px;
    border-radius: 12px;
    overflow: hidden;
    background-color: #38503E;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.history-hero__scrim {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(180deg, rgba(24, 42, 28, 0.25) 0%, rgba(24, 42, 28, 0.68) 100%);
}

.history-hero__eyebrow {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 20px;
    color: #DBF0E0;
    margin: 0 0 12px;
    letter-spacing: 0.5px;
}

.history-hero__title {
    font-family: "Cyrillic Old", serif;
    font-size: 62px;
    font-weight: 400;
    line-height: 1.05;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.history-hero__meta {
    font-family: "Georgia", serif;
    font-size: 18px;
    color: #fff;
    margin: 18px 0 0;
    padding: 7px 20px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    backdrop-filter: blur(2px);
}

/* Заголовок-фолбэк, когда у храма нет главного фото. */
.history-founded {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 18px;
    color: #7FB68D;
    text-align: center;
    margin: -34px 0 44px;
}

/* --- Тело статьи (HTML, импортированный из WordPress) --- */
.history-content {
    text-align: justify;
}

/* WP оборачивает весь текст в .entry-content — снимаем его отступы. */
.history-content .entry-content {
    margin: 0;
    padding: 0;
}

.history-content p {
    margin: 0 0 18px;
}

.history-content h1,
.history-content h2,
.history-content h3 {
    font-family: "Cyrillic Old", serif;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
    color: #1c1c1c;
    margin: 42px 0 20px;
}

.history-content h1 { font-size: 36px; }
.history-content h2 { font-size: 29px; }
.history-content h3 { font-size: 24px; }

.history-content ul {
    margin: 0 0 18px;
    padding-left: 26px;
}

.history-content li {
    margin: 0 0 8px;
}

.history-content a {
    color: #7FB68D;
    text-decoration: underline;
}

/* Фото внутри истории: по центру, в рамке, не вылезают за колонку. */
.history-content img {
    display: block;
    height: auto;
    max-width: 100%;
    margin: 26px auto;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.history-content a:has(img) {
    text-decoration: none;
    border: 0;
}

/* Audio players (e.g. chant recordings in «Библиотека регента») */
.history-content audio {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 18px auto;
}

/* Битые относительные ссылки <a href="files/..."> из WP-экспорта.
   galleries.js переписывает их на src картинки (+ .glightbox); пока скрипт
   не отработал — гасим переход, чтобы клик не уводил в 404. */
.history-content a[href^="files"]:not(.glightbox) {
    pointer-events: none;
    cursor: default;
}

.history-empty {
    text-align: center;
    font-family: "Georgia", serif;
    color: #444;
    margin: 40px 0 80px;
}

@media (max-width: 600px) {
    .history-hero { min-height: 260px; margin-bottom: 40px; }
    .history-hero__scrim { padding: 30px 20px; }
    .history-hero__eyebrow { font-size: 17px; }
    .history-hero__title { font-size: 38px; }
    .history-hero__meta { font-size: 16px; }
    .history-content h1 { font-size: 28px; }
    .history-content h2 { font-size: 24px; }
    .history-content h3 { font-size: 21px; }
    .history-content { text-align: left; }
}

/* ============================================
   Храмы Самарканда (pages/church_list.html)
   ============================================ */

.churches-page {
    max-width: 1200px;
    margin: 0 auto 90px;
    padding: 0 40px;
}

/* Same grid reused on the home page ("Храмы Самарканда" block). */
.churches-section {
    max-width: 1200px;
    margin: 70px auto;
    padding: 0 40px;
}

.churches-section .churches-grid {
    margin-top: 30px;
}

.churches-intro {
    font-family: "Georgia", serif;
    font-size: 18px;
    line-height: 1.6;
    color: #444;
    text-align: center;
    max-width: 720px;
    margin: -30px auto 50px;
}

.churches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.church-card {
    display: flex;
    flex-direction: column;
    width: 340px;
    background: #fff;
    border: 1px solid #e6efe8;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.church-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(56, 80, 62, 0.22);
}

.church-card__media {
    aspect-ratio: 4 / 3;
    background: #DBF0E0;
    overflow: hidden;
}

.church-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.church-card:hover .church-card__media img {
    transform: scale(1.05);
}

.church-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 22px 24px 26px;
}

.church-card__title {
    font-family: "Cyrillic Old", serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
    color: #1c1c1c;
    margin: 0 0 12px;
}

.church-card__meta {
    font-family: "Georgia", serif;
    font-size: 15px;
    color: #6a6a6a;
    margin: 0 0 6px;
}

.church-card__address {
    font-style: italic;
}

.church-card__more {
    margin-top: auto;
    align-self: flex-start;
    display: inline-block;
    background: linear-gradient(to right, #3D9152, #7FB68D);
    color: #fff;
    padding: 9px 22px;
    border-radius: 6px;
    font-family: "Georgia", serif;
    font-size: 15px;
    transition: transform 0.2s ease;
}

.church-card:hover .church-card__more {
    transform: scale(1.04);
}

@media (max-width: 900px) {
    .churches-page { padding: 0 24px; }
}

@media (max-width: 600px) {
    .church-card { width: 100%; max-width: 360px; }
    .churches-intro { font-size: 16px; margin-top: -20px; }
    .church-card__title { font-size: 23px; }
}

/* ============================================
   «Полезное» — карточки-ссылки (хаб + блок на главной)
   ============================================ */

.useful-page {
    max-width: 1200px;
    margin: 0 auto 90px;
    padding: 0 40px;
}

.useful-section {
    max-width: 1200px;
    margin: 70px auto;
    padding: 0 40px;
}

.useful-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 28px;
    margin-top: 30px;
}

.useful-card {
    flex: 1 1 280px;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #DBF0E0;
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.useful-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(56, 80, 62, 0.22);
}

.useful-card__img {
    width: auto;
    max-width: 120px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 8px;
}

.useful-card__text {
    font-family: "Georgia", serif;
    font-size: 18px;
    font-weight: 500;
    color: #222;
    margin: 0;
    line-height: 1.4;
}

.useful-card hr {
    width: 80%;
    border: none;
    border-top: 1px solid #A18C3B;
    margin: 8px 0;
}

.useful-card__more {
    color: #3D9152;
    text-decoration: underline;
    font-family: "Georgia", serif;
    font-size: 16px;
}

.useful-card:hover .useful-card__more {
    color: #2a6939;
}

@media (max-width: 900px) {
    .useful-page,
    .useful-section { padding: 0 24px; }
}

@media (max-width: 600px) {
    .useful-card { flex-basis: 100%; max-width: 360px; }
}

/* ============================================
   Pastoral "article" blocks inside .history-content
   (quote / subtitle / list / blessing) — re-assert the design look, since
   .history-content's element rules (p/h3/ul) out-specify the bare classes.
   ============================================ */

.history-content .article-quote {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 18px;
    text-align: center;
    color: #222;
    margin: 0 0 30px;
    line-height: 1.5;
}

.history-content .article-quote span {
    color: #7FB68D;
    font-size: 15px;
    font-style: normal;
    margin-left: 8px;
}

.history-content .article-subtitle {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 24px;
    font-weight: 400;
    color: #3D9152;
    text-align: left;
    line-height: 1.3;
    margin: 36px 0 16px;
}

.history-content ul.article-list {
    padding-left: 24px;
    margin: 0 0 20px;
}

.history-content ul.article-list li::marker {
    color: #7FB68D;
}

.history-content .article-blessing {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 17px;
    color: #3D9152;
    text-align: center;
    margin-top: 36px;
}

/* Оглавление «Беседы №1–12» — аккуратная сетка одинаковых зелёных чипов
   вместо разноцветных ссылок в столбик. */
.history-content .talks-toc {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 0 auto 32px;
    max-width: 760px;
}

.history-content .talks-toc__item {
    display: inline-block;
    padding: 10px 20px;
    background: #DBF0E0;
    border-radius: 8px;
    color: #2a6939;
    font-family: "Georgia", serif;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.history-content .talks-toc__item:hover {
    background: #c2e6cb;
    transform: translateY(-2px);
}