/* CSS-переменные для единообразия цветовой палитры */
:root {
    --color-bg: #fdfaf1;
    --color-text: #4a3f35;
    --color-heading: #8b6b23;
    --color-accent: #d4af37;
    --color-white: #fff;
    --color-border: #eee;
    --color-footer-bg: #4a3f35;
    --color-footer-text: #fdfaf1;
    --font-serif: "Georgia", serif;
    --radius: 8px;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.03);
    --shadow-header: 0 2px 5px rgba(0, 0, 0, 0.05);
    --max-width: 1200px;
    --gold-gradient: linear-gradient(rgba(255, 253, 245, 0.7), rgba(255, 253, 245, 0.7));
}

/* === Сброс и базовые элементы === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-serif);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-wrap: break-word;
}

/* Прижимаем футер к низу при коротком контенте */
body > main,
body > .container {
    flex: 1;
}

h1,
h2,
h3 {
    color: var(--color-heading);
    text-align: center;
    overflow-wrap: break-word;
    hyphens: auto;
}

a {
    color: var(--color-heading);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

/* === Навигация === */
header {
    background-image: var(--gold-gradient);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 3px solid var(--color-accent);
    box-shadow: var(--shadow-header);
    width: 100%;
    margin: 0;
    padding: 2.5rem 0;
    position: relative;
}

.header-top {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.5rem 1rem 0 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.header-content-row {
    display: flex;
    align-items: center;
    position: relative;
    gap: 2rem;
    padding: 0.25rem 0;
}

.header-logo-block {
    flex-shrink: 0;
    z-index: 1;
}

.header-text-block {
    display: flex;
    justify-content: center;
    flex: 1;
    z-index: 1;
}

.header-logo-wrapper {
    flex-shrink: 0;
}

.header-logo {
    height: 180px;
    width: auto;
    object-fit: contain;
    display: block;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header-text h1 {
    color: var(--color-heading);
    font-size: 1.6rem;
    margin: 0;
    line-height: 1.3;
    font-weight: bold;
    text-align: center;
}

.header-text .blessing {
    color: var(--color-text);
    font-size: 1.2rem;
    font-style: italic;
    margin: 0;
    line-height: 1.4;
    text-align: center;
}

nav {
    width: 100%;
    max-width: var(--max-width);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
    box-sizing: border-box;
    flex-basis: 100%;
    z-index: 2;
    margin-bottom: -1rem;
}

nav a {
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-heading);
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--color-accent);
}

/* === Контейнер === */
.container,
main.container {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 0.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* === Блок 1: Расписание и Календарь === */
.info-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 6rem;
    width: 100%;
    box-sizing: border-box;
}

/* Адаптивность для 320px */
@media (max-width: 400px) {
    body {
        padding: 0 0.25rem;
    }
    
    .container,
    main.container {
        padding: 0 0.25rem;
    }
    
    .help-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .info-block {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .info-column {
        padding: 0.5rem;
    }
    
    .info-column:first-child {
        padding: 0;
    }
    
    .announcement-container {
    }
    
    .schedule-img {
        max-width: 100%;
        width: 100%;
    }
}

.info-column {
    background: var(--color-white);
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-column:first-child {
    padding: 0;
    overflow: hidden;
}

.info-column:first-child .schedule-img {
    width: 100%;
    height: auto;
    display: block;
}

.info-column:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Правая колонка с объявлениями */
.info-column.right-column {
    overflow: visible;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.column-section {
    display: flex;
    flex-direction: column;
}

.announcements-section {
}

.announcement-container {
    width: 100%;
    overflow: hidden;
    text-align: center;
}

@media (min-width: 771px) and (max-width: 1200px) {
    .announcement-container {
        width: 100%;
    }
    
    .info-column.right-column {
        width: 100%;
    }
}

#announcement-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    display: block;
    margin: 0;
    padding: 0;
}

.announcement-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}



.announcement-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: var(--shadow-light);
}

.announcement-nav:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

.announcement-prev {
    left: 10px;
}

.announcement-next {
    right: 10px;
}

.schedule-img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 771px) and (max-width: 1200px) {
    .schedule-img {
        max-width: 100%;
    }
}

/* Блок 2: Новости */
.news-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.news-card:hover { transform: translateY(-5px); }
.news-card img { width: 100%; height: auto; object-fit: cover; }
.news-card-content { padding: 1rem; }
.news-card-title { font-weight: bold; margin-bottom: 0.5rem; display: block; }

/* Блок 3: Помощь */
.help-block {
    text-align: center;
    margin-bottom: 3rem;
    width: 100%;
    box-sizing: border-box;
}

.help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.help-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
}

.help-buttons .help-btn {
    width: 100%;
    max-width: 500px;
}

.help-btn {
    background-color: var(--color-white);
    border: 2px solid var(--color-accent);
    color: var(--color-heading);
    padding: 2rem 2.5rem;
    border-radius: var(--radius);
    font-weight: bold;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-align: center;
    box-sizing: border-box;
}

.help-btn:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* === Два окна (Новости + Календарь) === */
.window {
    background: var(--color-white);
    border: 2px solid var(--color-accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.window:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Блок 2: Новости и календарь */
.two-windows-section:not(.school-section) {
    display: flex;
    gap: 1rem;
    margin: 3rem 0 1.5rem 0;
    max-width: var(--max-width);
    box-sizing: border-box;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.two-windows-section .left-window {
    flex: 0 0 69%;
}

.two-windows-section .right-window {
    flex: 0 0 30%;
    align-self: flex-start;
    height: fit-content;
    overflow: hidden;
}

.calendar-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}

.calendar-wrapper * {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
    float: none !important;
    position: relative !important;
    clear: both !important;
}


.calendar-wrapper div,
.calendar-wrapper span,
.calendar-wrapper p,
.calendar-wrapper a {
    max-width: 100% !important;
    width: 100% !important;
}

/* === Блок Воскресная школа === */
.school-pages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem auto;
    width: 100%;
    box-sizing: border-box;
}

.school-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 2.5rem 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius);
    background: var(--color-white);
    box-shadow: var(--shadow-light);
    font-size: 1.1rem;
    min-height: 200px;
    box-sizing: border-box;
}

.school-link:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.school-link h2 {
    color: var(--color-heading);
    margin-top: 0;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
    font-size: 1.3rem;
}

.school-link:hover h2,
.school-link:hover p {
    color: var(--color-white);
}

.school-link p {
    color: var(--color-text);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

/* Блок 4: Воскресная школа */
.school-section {
    display: flex;
    margin: 6rem 0 1.5rem 0;
    width: 100%;
    box-sizing: border-box;
}

.school-section .left-window,
.school-section .right-window {
    flex: 0 0 calc(50% - 0.75rem);
    box-sizing: border-box;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.school-section .left-window {
    margin-right: 1.5rem;
}

.school-section .school-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--color-accent);
    border-radius: var(--radius);
}

.school-section .school-link:hover {
    background-color: var(--color-accent);
}

.school-section .school-link:hover h2,
.school-section .school-link:hover p {
    color: var(--color-white);
}

.news-grid-6 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    min-height: 300px;
}

.news-grid-6 .news-card {
    aspect-ratio: 1 / 1;
    position: relative;
    display: block;
    overflow: hidden;
    text-decoration: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.8rem;
    border: 2px solid var(--color-accent);
}

.news-grid-6 .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.news-grid-6 .news-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 70%;
    object-fit: cover;
}

.news-grid-6 .news-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 40%;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: #fff;
    text-align: center;
}

.news-grid-6 .news-card-title {
    font-weight: bold;
    display: block;
    overflow: visible;
    font-size: 1rem;
    line-height: 1.2;
    padding: 0 0.25rem;
    box-sizing: border-box;
    word-wrap: break-word;
    hyphens: auto;
}

.news-card-preview {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.announcement-dot:hover {
    background: var(--color-heading);
}

.announcement-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.announcement-dot.active {
    background: var(--color-accent);
    transform: scale(1.3);
}

.announcement-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 5;
}

/* === Благотворители === */
/* Заголовок на всю ширину */
.qr-title-full {
    text-align: center;
    width: 100%;
    margin-bottom: 1.5rem;
}

.qr-title {
    text-align: center;
    color: var(--color-heading);
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.2rem;
    line-height: 1.4;
    width: 100%;
    display: block;
}

/* Секция с QR-кодом */
.qr-section {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    align-items: flex-start;
}

.qr-content {
    flex: 1;
}

.qr-image-wrapper {
    flex-shrink: 0;
    text-align: center;
    margin-top: 6rem;
}

.qr-code-img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 0.5rem;
}

.qr-caption {
    font-size: 0.9rem;
    color: var(--color-text);
    margin: 0;
    font-style: italic;
}

h2 {
    text-align: center;
    color: var(--color-heading);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

/* === Архив новостей (страница «О жизни прихода») === */
.news-archive {
    margin: -5rem 0;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

.news-archive h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-heading);
}

.archive-list {
    max-width: 1200px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
}

.archive-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
    align-items: flex-start;
}

.archive-item:last-child {
    border-bottom: none;
}

.archive-thumb-img {
    width: 240px;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius);
    flex-shrink: 0;
    box-shadow: var(--shadow-medium);
}

.archive-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.archive-item-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-heading);
    text-decoration: none;
    line-height: 1.4;
}

.archive-item-title:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.archive-preview {
    font-size: 1rem;
    color: #666;
    margin: 0.4rem 0 0.6rem;
    line-height: 1.6;
}

.archive-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: 0.45rem 1.1rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.archive-link:hover {
    background: var(--color-accent);
    color: var(--color-white);
}

@media (max-width: 600px) {
    .archive-item {
        flex-direction: column;
        gap: 1rem;
    }
    .archive-thumb-img {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: contain;
    }
    .archive-preview {
        font-size: 0.95rem;
    }
    .archive-link {
        align-self: stretch;
        text-align: center;
    }
}

/* Галерея внутри новостных страниц */
.news-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Изображения в галерее новостей */
.news-gallery img {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius);
    margin-top: 1rem;
    display: block;
}

.news-gallery picture {
    display: block;
    width: 100%;
    max-width: 800px;
}

/* Lightbox */
.lightbox {
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

/* Футер */
footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    flex-shrink: 0;
}

.footer-social {
    text-align: right;
}

.footer-social a {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.footer-social a:hover {
    opacity: 0.8;
}

/* === Фотографии сеткой === */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.photos-grid img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-light);
}

.footer-social img {
    width: 32px;
    height: 32px;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-contacts {
    text-align: left;
    line-height: 1.8;
}

.footer-contacts p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

.footer-contacts strong {
    color: var(--color-accent);
}

/* Стили для страницы школы */

/* FAQ секции */
.faq-section {
    margin-bottom: 2rem;
}

/* Сакраментальные секции */
.sacrament-section {
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-border);
}

.sacrament-section:last-child {
    border-bottom: none;
}

.sacrament-section h2 {
    text-align: left;
    margin-bottom: 1rem;
    color: var(--color-heading);
}

.sacrament-section article {
    max-width: 800px;
}

/* Стили для навигации на странице таинств */

/* === Адаптивность для 768px === */
@media (max-width: 768px) {
    /* Header */
    header {
        padding: 1rem 0;
    }
    
    .header-top {
        gap: 1.5rem;
    }
    
    .header-content-row {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        position: static;
    }
    
    .header-logo-block {
        position: static;
        transform: none;
        margin: 0;
    }
    
    .header-logo {
        height: 180px;
        max-width: 200px;
    }
    
    .header-text-block {
        margin-left: 0;
        text-align: center;
        align-items: center;
    }
    
    .header-text h1 {
        font-size: 1.1rem;
    }
    
    .header-text .blessing {
        font-size: 1rem;
    }
    
    nav {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.5rem 0;
    }
    
    nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    /* Layout */
    .info-block {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
        padding: 0 0.5rem;
    }
    
    .info-column {
        padding: 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .info-column:first-child {
        padding: 0;
    }
    
    .info-column.right-column {
        overflow: visible;
    }
    
    .announcement-container {
    }
    
    .schedule-img {
        max-width: 100%;
        height: auto;
    }
    
    .two-windows-section {
        flex-direction: column;
        max-width: 100%;
        padding: 0 0.5rem;
    }
    
    .two-windows-section .left-window,
    .two-windows-section .right-window {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        flex-basis: 100%;
    }
    
    .news-grid-6 {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .news-grid-6 .news-card-title {
        font-size: 1.5rem;
    }
    
    .help-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .help-buttons {
        flex-direction: column;
    }
    
    .help-buttons .help-btn {
        width: 100%;
        max-width: none;
    }
    
    .help-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .school-section {
        margin: 3rem 0 1rem 0;
    }
    
    .school-section .left-window,
    .school-section .right-window {
        flex: 0 0 100%;
        margin-right: 0;
    }
}

/* Бургер-меню */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-heading);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Мобильное меню */
.main-nav {
    display: flex;
    gap: 2.5rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-light);
        gap: 1rem;
        z-index: 999;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav a {
        padding: 0.75rem 1rem;
        text-align: center;
        border: 1px solid var(--color-accent);
        border-radius: var(--radius);
    }
}

@media (max-width: 768px) {
    .school-link {
        padding: 1.25rem 0.75rem;
        font-size: 1rem;
        height: auto;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .school-link h2 {
        font-size: 1.1rem;
    }
    
    .school-pages {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }
    
    footer {
        padding: 1.5rem 1rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-contacts {
        text-align: center;
    }
    
    .footer-social {
        text-align: center;
    }

    /* Announcement nav */
    .announcement-nav {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .announcement-prev {
        left: 5px;
    }
    .announcement-next {
        right: 5px;
    }
    
    .announcement-dot {
        width: 8px;
        height: 8px;
    }
    
    .announcement-wrapper img {
        height: auto;
    }
    
    /* QR-секция */
    .qr-section {
        flex-direction: column;
    }
    .qr-image-wrapper {
        margin-top: 1rem;
        align-self: center;
    }
    .qr-code-img {
        width: 150px;
    }
    
    /* Container & windows */
    .container,
    main.container {
        padding: 0 0.25rem;
    }
    
    .window {
        padding: 0.75rem;
    }
    
    .photos-grid {
        grid-template-columns: 1fr;
    }
}

/* === Адаптивность для 480px === */
@media (max-width: 480px) {
    .header-text h1 {
        font-size: 0.85rem;
    }
    
    .header-text .blessing {
        font-size: 0.8rem;
    }
    
    nav {
        gap: 0.4rem;
        padding: 0.3rem 0;
    }
    
    nav a {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    .header-logo {
        height: 140px;
        max-width: 160px;
    }
}

/* === пагинация новостей === */
.news-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 1.5rem 0;
    flex-wrap: wrap;
    position: sticky;
    bottom: 0;
    background-color: var(--color-bg, #fdfaf1);
    border-top: 1px solid var(--color-border, #eee);
    z-index: 10;
    margin-top: 2rem;
}

.news-pagination a,
.news-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--color-border, #eee);
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-text, #4a3f35);
    font-size: 14px;
    transition: all 0.2s ease;
}

.news-pagination a:hover {
    background-color: var(--color-accent, #d4af37);
    color: var(--color-white, #fff);
    border-color: var(--color-accent, #d4af37);
}

.news-pagination .current {
    background-color: var(--color-accent, #d4af37);
    color: var(--color-white, #fff);
    border-color: var(--color-accent, #d4af37);
    font-weight: 600;
}

.news-pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

.news-pagination .dots {
    border: none;
    pointer-events: none;
}
