@charset "utf-8";
/* CSS Document */
{
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        font-family: "Times New Roman", Georgia, serif;
        /* Светло-зелёный градиент фона сайта */
        background: linear-gradient(180deg, #e8f5e0 0%, #c8e6b8 50%, #dff0d0 100%);
        background-attachment: fixed;
        color: #4a2c17;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

    /* ===== ШАПКА ===== */
    header {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 15px 15px 0;
    }

    /* Место для изображения */
    .banner {
        width: 100%;
        height: 300px;
        /* Заглушка — замените на реальное изображение */
        background: linear-gradient(135deg, #a8d5a2 0%, #7fb87a 50%, #b5dcae 100%);
        border: 2px solid #6b4423;
        border-radius: 6px 6px 0 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #4a2c17;
        font-size: 1.6em;
        font-style: italic;
        text-shadow: 1px 1px 2px rgba(255,255,255,0.6);
        overflow: hidden;
    }

    .banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Название сайта */
    .site-title {
        text-align: center;
        font-family: "Times New Roman", Georgia, serif;
        color: #5b3313;
        font-size: 2.2em;
        font-weight: bold;
        letter-spacing: 1px;
        padding: 12px 0 8px;
        text-shadow: 1px 1px 3px rgba(255,255,255,0.7);
    }
  .church-card {
        display: flex;
        gap: 20px;
        background: linear-gradient(180deg, #eaf6e2 0%, #d9edd0 100%);
        border: 1px solid #a8c99a;
        border-radius: 6px;
        padding: 15px;
        margin-bottom: 22px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    }

    .church-card .photo {
        width: 220px;
        height: 160px;
        flex-shrink: 0;
        background: linear-gradient(135deg, #b5dcae 0%, #8fc489 100%);
        border: 2px solid #6b4423;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #4a2c17;
        font-style: italic;
        font-size: 0.9em;
        text-align: center;
        padding: 5px;
        overflow: hidden;
    }

    .church-card .photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .church-card .info {
        flex: 1;
    }

    .church-card .info h2 {
        color: #5b3313;
        font-size: 1.3em;
        margin-bottom: 8px;
        padding-bottom: 6px;
        border-bottom: 1px dashed #a8c99a;
    }

    .church-card .info p {
        margin-bottom: 8px;
        font-size: 1.2em;
        text-align: left;
    }

    .church-card .info .meta {
        font-size: 0.9em;
        color: #6b4423;
        font-style: italic;
        margin-top: 8px;
    }
    /* ===== ГОРИЗОНТАЛЬНОЕ МЕНЮ ===== */
    nav.main-menu {
        background: linear-gradient(180deg, #6b4423 0%, #4a2c17 100%);
        border-radius: 0 0 6px 6px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    }

    nav.main-menu > ul {
        list-style: none;
        display: flex;
        flex-wrap: wrap;
    }

    nav.main-menu > ul > li {
        position: relative;
        flex: 1 1 auto;
        text-align: center;
    }

    nav.main-menu > ul > li > a {
        display: block;
        padding: 14px 18px;
        color: #ffffff;
        text-decoration: none;
        font-size: 1.05em;
        font-weight: bold;
        /* Тень текста */
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
        transition: background 0.3s;
        border-right: 1px solid rgba(255,255,255,0.15);
    }

    nav.main-menu > ul > li:last-child > a {
        border-right: none;
    }

    nav.main-menu > ul > li > a:hover {
        background: rgba(255,255,255,0.15);
    }

    /* Выпадающие подменю */
    nav.main-menu ul ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 260px;
        background: linear-gradient(180deg, #7a5230 0%, #5b3313 100%);
        list-style: none;
        border-radius: 0 0 6px 6px;
        box-shadow: 0 6px 12px rgba(0,0,0,0.35);
        z-index: 100;
    }

    nav.main-menu ul li:hover > ul {
        display: block;
    }

    nav.main-menu ul ul li {
        text-align: left;
    }

    nav.main-menu ul ul li a {
        display: block;
        padding: 11px 18px;
        color: #ffffff;
        text-decoration: none;
        font-size: 0.95em;
        font-weight: normal;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        transition: background 0.25s;
    }

    nav.main-menu ul ul li:last-child a {
        border-bottom: none;
    }

    nav.main-menu ul ul li a:hover {
        background: rgba(255,255,255,0.18);
        padding-left: 24px;
    }

    /* ===== ОСНОВНОЙ КОНТЕЙНЕР ===== */
    .container {
        width: 100%;
        max-width: 1200px;
        margin: 20px auto;
        padding: 0 15px;
        display: flex;
        gap: 20px;
        flex: 1;
    }

    /* ===== БОКОВОЕ МЕНЮ ===== */
    aside.sidebar {
        width: 240px;
        flex-shrink: 0;
        background: linear-gradient(180deg, #d4ecc8 0%, #b8dfa8 100%);
        border: 2px solid #6b4423;
        border-radius: 6px;
        padding: 15px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.15);
        height: fit-content;
    }

    aside.sidebar h3 {
        color: #5b3313;
        font-size: 1.15em;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 2px solid #6b4423;
        text-align: center;
    }

    aside.sidebar ul {
        list-style: none;
    }

    aside.sidebar ul li {
        margin-bottom: 8px;
    }

    aside.sidebar ul li a {
        display: block;
        padding: 8px 10px;
        color: #4a2c17;
        text-decoration: none;
        border-left: 3px solid transparent;
        border-radius: 3px;
        transition: all 0.25s;
        font-size: 0.95em;
    }

    aside.sidebar ul li a:hover {
        background: rgba(107, 68, 35, 0.12);
        border-left-color: #6b4423;
        padding-left: 15px;
    }

    /* ===== ЦЕНТРАЛЬНАЯ ЧАСТЬ ===== */
    main.content {
        flex: 1;
        /* Очень светло-зелёный фон */
        background: #f2faec;
        border: 2px solid #6b4423;
        border-radius: 6px;
        padding: 25px 30px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.15);
        min-height: 400px;
    }

    main.content h1 {
        color: #5b3313;
        font-size: 1.8em;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #b8dfa8;
    }

    main.content h2 {
        color: #6b4423;
        font-size: 1.35em;
        margin: 20px 0 10px;
    }

    main.content p {
        line-height: 1.5;
        margin-bottom: 12px;
        text-align: justify;
        font-size: 1.05em;
    }

    /* ===== ПОДВАЛ ===== */
    footer {
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 15px;
        text-align: center;
        color: #5b3313;
        font-size: 0.9em;
    }

    /* ===== АДАПТИВНОСТЬ ===== */
    @media (max-width: 800px) {
        .container {
            flex-direction: column;
        }
        aside.sidebar {
            width: 100%;
        }
        nav.main-menu > ul {
            flex-direction: column;
        }
        nav.main-menu > ul > li > a {
            border-right: none;
            border-bottom: 1px solid rgba(255,255,255,0.15);
        }
        nav.main-menu ul ul {
            position: static;
            min-width: 100%;
        }
        .site-title {
            font-size: 1.5em;
        }
    }
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 25px 0 10px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-block;
    padding: 8px 14px;
    color: #ffffff;
    background: linear-gradient(180deg, #6b4423 0%, #4a2c17 100%);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    transition: background 0.25s;
}

.pagination a:hover {
    background: linear-gradient(180deg, #8a5a30 0%, #5b3313 100%);
}

.pagination a.active {
    background: linear-gradient(180deg, #a8d5a2 0%, #7fb87a 100%);
    color: #4a2c17;
    text-shadow: none;
    font-weight: bold;
    pointer-events: none;
}

.pagination a.next {
    margin-left: 8px;
}

h1 {
        text-align: center;
        color: #5b3313;
        font-size: 2em;
        margin-bottom: 10px;
        text-shadow: 1px 1px 3px rgba(255,255,255,0.7);
    }

    h2.section-title {
        max-width: 1000px;
        margin: 30px auto 15px;
        color: #5b3313;
        font-size: 1.4em;
        padding-bottom: 8px;
        border-bottom: 2px solid #b8dfa8;
    }

    /* ===== ЛЕНТА МИНИАТЮР ===== */
    .gallery-thumbs {
        max-width: 1000px;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
        padding: 15px;    
        border-radius: 6px;
        
    }

    .gallery-thumbs .thumb {
        width: 140px;
        height: 100px;
        border: 2px solid #6b4423;
        border-radius: 4px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.25s, box-shadow 0.25s;
        background: linear-gradient(135deg, #b5dcae 0%, #8fc489 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #4a2c17;
        font-size: 0.8em;
        font-style: italic;
        text-align: center;
        padding: 4px;
    }

    .gallery-thumbs .thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .gallery-thumbs .thumb:hover {
        transform: scale(1.07);
        box-shadow: 0 5px 15px rgba(107,68,35,0.4);
    }

    /* ===== ЛАЙТБОКС ===== */
    .lightbox {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(20, 12, 5, 0.93);
        z-index: 9999;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .lightbox.open {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* Верхняя панель: счётчик и закрыть */
    .lightbox-top {
        position: absolute;
        top: 15px;
        left: 0;
        right: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 25px;
        color: #fff;
        font-size: 1.1em;
        z-index: 10;
    }

    .lightbox-counter {
        background: rgba(74,44,23,0.75);
        padding: 6px 16px;
        border-radius: 20px;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
        border: 1px solid rgba(255,255,255,0.3);
    }

    .lightbox-close {
        background: rgba(74,44,23,0.75);
        color: #fff;
        border: 1px solid rgba(255,255,255,0.4);
        width: 42px;
        height: 42px;
        border-radius: 50%;
        font-size: 1.4em;
        cursor: pointer;
        transition: background 0.3s, transform 0.3s;
        line-height: 1;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    }

    .lightbox-close:hover {
        background: #6b4423;
        transform: rotate(90deg);
    }

    /* Основная зона с фото и стрелками */
    .lightbox-stage {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 1100px;
        flex: 1;
        min-height: 0;
    }

    .lightbox-image-wrap {
        position: relative;
        max-width: 100%;
        max-height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lightbox-image-wrap img {
        max-width: 100%;
        max-height: 65vh;
        object-fit: contain;
        border: 3px solid #6b4423;
        border-radius: 6px;
        box-shadow: 0 0 40px rgba(0,0,0,0.7);
        background: #d9edd0;
    }

    .lightbox-image-wrap .placeholder-big {
        width: 70vw;
        max-width: 900px;
        height: 60vh;
        background: linear-gradient(135deg, #b5dcae 0%, #8fc489 100%);
        border: 3px solid #6b4423;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #4a2c17;
        font-size: 1.5em;
        font-style: italic;
        text-align: center;
        padding: 20px;
    }

    .lightbox-caption {
        color: #fff;
        font-size: 1.15em;
        text-shadow: 2px 2px 5px rgba(0,0,0,0.95);
        margin-top: 12px;
        text-align: center;
        max-width: 90%;
    }

    /* Стрелки лайтбокса */
    .lightbox-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: rgba(74,44,23,0.7);
        border: 2px solid rgba(255,255,255,0.5);
        color: #fff;
        width: 55px;
        height: 55px;
        border-radius: 50%;
        font-size: 1.6em;
        cursor: pointer;
        transition: background 0.3s, transform 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    }

    .lightbox-arrow:hover {
        background: #6b4423;
        transform: translateY(-50%) scale(1.1);
    }

    .lightbox-arrow.prev { left: 10px; }
    .lightbox-arrow.next { right: 10px; }

    /* Лента миниатюр внизу лайтбокса */
    .lightbox-thumbs {
        display: flex;
        gap: 8px;
        padding: 12px;
        margin-top: 15px;
        max-width: 90vw;
        overflow-x: auto;
        background: rgba(74,44,23,0.55);
        border-radius: 8px;
        border: 1px solid rgba(255,255,255,0.2);
        scrollbar-width: thin;
    }

    .lightbox-thumbs::-webkit-scrollbar { height: 8px; }
    .lightbox-thumbs::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); border-radius: 4px; }
    .lightbox-thumbs::-webkit-scrollbar-thumb { background: #8a5a30; border-radius: 4px; }

    .lightbox-thumbs .lb-thumb {
        width: 80px;
        height: 60px;
        flex-shrink: 0;
        border: 2px solid transparent;
        border-radius: 4px;
        overflow: hidden;
        cursor: pointer;
        transition: border-color 0.25s, transform 0.25s;
        opacity: 0.65;
        background: linear-gradient(135deg, #b5dcae 0%, #8fc489 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #4a2c17;
        font-size: 0.7em;
        font-style: italic;
    }

    .lightbox-thumbs .lb-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .lightbox-thumbs .lb-thumb:hover {
        opacity: 1;
        transform: scale(1.06);
    }

    .lightbox-thumbs .lb-thumb.active {
        border-color: #ffffff;
        opacity: 1;
        box-shadow: 0 0 12px rgba(255,255,255,0.6);
    }

    /* Адаптив */
    @media (max-width: 800px) {
        .gallery-thumbs .thumb { width: 110px; height: 80px; }
        .lightbox-arrow { width: 42px; height: 42px; font-size: 1.2em; }
        .lightbox-arrow.prev { left: 4px; }
        .lightbox-arrow.next { right: 4px; }
        .lightbox-image-wrap img { max-height: 50vh; }
        .lightbox-thumbs .lb-thumb { width: 60px; height: 45px; }
        .lightbox-counter { font-size: 0.9em; padding: 4px 12px; }
    }

.quote {
    margin: 22px 0;
    padding: 15px 20px 15px 25px;
    background:  #F2FAEC;
    border-left: 5px solid #6b4423;
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #4a2c17;
}

.quote p {
    margin-bottom: 10px;
    line-height: 1.7;
    font-size: 1.08em;
    text-align: justify;
}

.quote cite {
    display: block;
    text-align: right;
    font-style: normal;
    font-size: 0.95em;
    color: #6b4423;
    font-weight: bold;
}

.quote cite::before {
    content: "— ";
}

main.content img.img-left {
    float: left;
    max-width: 300px;
    margin: 5px 20px 15px 0;
    display: block;
}

@media (max-width: 600px) {
    main.content img.img-left {
        float: none;
        max-width: 100%;
        margin: 15px auto;
    }
}
main.content a.lightbox-link {
    display: inline-block;
    cursor: zoom-in;
    transition: opacity 0.25s;
}

main.content a.lightbox-link:hover {
    opacity: 0.85;
}

main.content a.img-link {
    display: inline-block;
    cursor: zoom-in;
    text-decoration: none;
    border: none;
    transition: opacity 0.25s;
}

main.content a.img-link img {
    display: block;
    border: 2px solid #6b4423;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    background: #d9edd0;
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 0;
}

main.content a.img-link:hover img {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(107, 68, 35, 0.35);
}

/* Обтекание справа */
main.content a.img-right {
    float: right;
    max-width: 320px;
    margin: 5px 0 15px 22px;
}

main.content a.img-left {
    float: left;
    max-width: 320px;
    margin: 5px 22px 15px 0;
}
/* ===== КАРТИНКА С ПОДПИСЬЮ И ОБТЕКАНИЕМ ===== */

main.content figure.img-figure {
    margin: 5px 0 15px 22px;
    max-width: 320px;
    display: block;
}

/* Обтекание справа */
main.content figure.img-right {
    float: right;
    margin: 5px 0 15px 22px;
}

/* Обтекание слева (если понадобится) */
main.content figure.img-left {
    float: left;
    margin: 5px 22px 15px 0;
}

/* Ссылка-обёртка */
main.content figure.img-figure a.img-link {
    display: block;
    cursor: zoom-in;
    text-decoration: none;
    border: none;
    transition: opacity 0.25s;
}

main.content figure.img-figure a.img-link img {
    display: block;
    width: 100%;
    height: auto;
    border: 2px solid #6b4423;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    background: #d9edd0;
    transition: transform 0.3s, box-shadow 0.3s;
    margin: 0;
}

main.content figure.img-figure a.img-link:hover img {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(107, 68, 35, 0.35);
}

/* Подпись под картинкой */
main.content figure.img-figure figcaption {
    font-size: 0.88em;
    font-style: italic;
    color: #6b4423;
    text-align: center;
    line-height: 1.4;
    padding: 8px 6px 0;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
}

/* Отменяем обтекание на узких экранах */
@media (max-width: 600px) {
    main.content figure.img-right,
    main.content figure.img-left {
        float: none;
        max-width: 100%;
        margin: 18px auto;
    }
    main.content figure.img-figure figcaption {
        padding: 6px 10px 0;
    }
}
main.content figure.img-figure.img-center {
    float: none;
    display: block;
    margin: 22px auto;
    max-width: 500px;   /* при необходимости измените */
    text-align: center;
}

main.content figure.img-figure.img-center a.img-link {
    display: block;
}

main.content figure.img-figure.img-center a.img-link img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border: 2px solid #6b4423;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    background: #d9edd0;
    transition: transform 0.3s, box-shadow 0.3s;
}

main.content figure.img-figure.img-center a.img-link:hover img {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(107, 68, 35, 0.35);
}

main.content figure.img-figure.img-center figcaption {
    font-size: 0.9em;
    font-style: italic;
    color: #6b4423;
    text-align: center;
    line-height: 1.4;
    padding: 8px 10px 0;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.6);
}

/* На узких экранах картинка растягивается на всю ширину колонки */
@media (max-width: 600px) {
    main.content figure.img-figure.img-center {
        max-width: 100%;
        margin: 18px auto;
    }
}
/* ===== РЯД ИЗ НЕСКОЛЬКИХ ФОТОГРАФИЙ ===== */

main.content .img-row {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    margin: 25px 0;
    clear: both;   /* обрывает возможное обтекание сверху */
}

/* Отменяем обтекание у карточек внутри ряда */
main.content .img-row figure.img-figure {
    float: none;
    margin: 0;
    flex: 1 1 200px;
    max-width: 280px;
    text-align: center;
}

main.content .img-row figure.img-figure a.img-link {
    display: block;
    cursor: zoom-in;
    text-decoration: none;
}

main.content .img-row {
    display: flex;
    gap: 18px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 25px 0;
}

main.content .img-row figure.img-figure {
    flex: 0 1 auto;             /* ширина по содержимому */
    max-width: none;
    margin: 0;
    text-align: center;
}

main.content .img-row figure.img-figure a.img-link img {
    display: block;
    width: auto;
    height: 220px;              /* фиксируем высоту, ширина авто */
    /* object-fit не нужен — фото не режется */
    border: 2px solid #6b4423;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    background: #d9edd0;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* На узких экранах — по два фото в ряд */
@media (max-width: 700px) {
    main.content .img-row figure.img-figure {
        flex: 1 1 45%;
        max-width: 45%;
    }
    main.content .img-row figure.img-figure a.img-link img {
        height: 150px;
    }
}

/* На телефонах — по одному фото */
@media (max-width: 480px) {
    main.content .img-row figure.img-figure {
        flex: 1 1 100%;
        max-width: 100%;
    }
    main.content .img-row figure.img-figure a.img-link img {
        height: 220px;
    }
}