* {
    box-sizing: border-box; 
    margin: 0;/* Всі елементи враховують рамки і відступи у своїй ширині/висоті */
}

::-webkit-scrollbar-thumb {
    background: rgba(136, 136, 136, 0.7); /* Прозорий повзунок */
}
/* Стилізація скроллбару */
::-webkit-scrollbar {
    width: 6px; /* Ширина скроллбару */
}

/* Фон скроллбару */
::-webkit-scrollbar-track {
    background: #AB8574; /* Колір фону */
    border-radius: 10px; /* Закруглені кути */
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green); /* Прозорий повзунок */
}
/* При наведенні змінюється колір повзунка */
::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-brown);
}

:root {
    --primary-gold: #fffb1f;
    --primary-green: #027166;
    --primary-green-dark: #155941;
    --primary-white: #ffffff;
    --primary-black: #000000;
    --primary-brown: #6d4c41;
    --secondary-grey: #f4f4f4;
    --secondary-milk: #e9d7b9;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Приховує горизонтальний скрол */
    width: 100vw; /* Забезпечує повне покриття ширини екрана */
}

.page {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--primary-black);
    background-color: var(--primary-green);
    line-height: 1.6;
    max-width: 100vw; /* Обмежує ширину сторінки */
    overflow-x: hidden; /* Додає захист від горизонтального скролу */
}

h1, h2, h3 {
    font-family: 'Montserrat', serif;
    color: var(--primary-white);
    text-shadow: 2px 2px 5px rgb(0, 0, 0);
    font-size: 2.25em; /* Збільшено розмір заголовків на 25% */
    font-weight: bold;
}

p {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.625em; /* Збільшено розмір тексту на 25% */
}


/* === HEADER === */
.header {
    background-color: var(--primary-green);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 3000;
    padding: 12px 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    background-color: var(--primary-green-dark);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.header__container {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === ЛОГО === */
.header__logo {
    display: flex;
    align-items: center;
}

.header__logo-img {
    max-height: 46px;
    transition: transform 0.3s ease;
}

.header__logo-img:hover {
    transform: scale(1.05);
}

.header__logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
}

.header__logo-link:hover {
    transform: scale(1.05);
    opacity: 0.85;
}

.header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 110;
    transition: transform 0.4s ease;
}

.header__burger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-gold);
    border-radius: 2px;
    transition: all 0.4s ease;
}

/* Активний стан — бургер трансформується в хрестик */
.header__burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__burger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.header__burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Активний стан: хрестик */
.header__burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.header__burger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.header__burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === НАВІГАЦІЯ === */
.header__nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 100px;
}


.header__nav-list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    animation: fadeInDown 0.4s ease-in-out;
}

.header__nav-item {
    display: inline-block;
}

.header__nav-link {
    text-decoration: none;
    color: var(--primary-white);
    font-weight: 600;
    font-size: 15px;
    padding: 0.6em 0.4em;
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 0.4px;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background-color: var(--primary-gold);
    transition: width 0.3s ease;
}

.header__nav-link:hover::after {
    width: 100%;
}

.header__nav-link:hover {
    color: var(--primary-gold);
}

/* === СОЦМЕРЕЖІ === */
.header__social {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.header__social-link {
    font-size: 20px;
    color: var(--primary-white);
    padding: 6px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.header__social-link:hover {
    transform: scale(1.15);
}

/* Індивідуальні стилі соцмереж */
.header__social-link__0:hover { color: rgb(97, 127, 235); }
.header__social-link__1:hover { color: rgb(242, 23, 23); }
.header__social-link__2:hover {
    background-image: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.header__social-link__3:hover { color: rgb(91, 110, 180); }

.header__social--mobile {
    display: none;
}


.about-parishes {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(90deg, #31170b, #3D2216, #784E3D, #AB8574, #d4a089);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Вирівнювання зверху */
    color: #333;
}

.about-parishes__container {
    position: relative;
    max-width: 1280px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px; /* Додає відступ між контентом та зображеннями */
}

.about-parishes__content {
    flex: 1;
    max-width: 600px;
    margin-right: 40px;
    text-align: justify;
}

.about-parishes__title {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.about-parishes__description {
    width: 580px;
    font-size: 18px;
    line-height: 1.5;
    word-spacing: 2px;
    letter-spacing: 0.001em;
    color: #fff;
    margin-bottom: 30px;
    text-shadow: 2px 2px 5px rgb(0, 0, 0);
}

.about-parishes__image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.about-parishes__image {
    width: 100%;
    max-width: 600px;
    height: 500px;
    object-fit: cover;
    object-position: top;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}


/* Загальні стилі футера */
.footer {
    background: var(--primary-green);
    color: #ecf0f1;
    padding: 20px 0;
    text-align: center;
}

.footer__container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer__left,
.footer__center,
.footer__right {
    flex: 1;
    min-width: 250px;
    text-align: center;
    margin: 10px 0;
}

/* Контактна інформація */
.footer__contact {
    margin: 5px 0;
    font-size: 16px;
}

.footer__contact i {
    margin-right: 8px;
    color: #ffffff; /* Золотистий колір */
}

/* Стилі для клікабельних елементів */
.footer__link {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.footer__link:hover {
    color: var(--primary-gold);
}

/* Стилі для соціальних іконок у футері */
.footer__social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
}

.footer__social-link {
    font-size: 1.0625em; /* Розмір шрифту, як у хедері */
    color: var(--primary-white);
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer__social-link:hover {
    transform: scale(1.2);
}

/* Кольори при наведенні (як у хедері) */
.footer__social-link--facebook:hover {
    color: rgb(38, 66, 166);
}

.footer__social-link--instagram:hover {
    background-image: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
    background-clip: text;
}

.footer__social-link--telegram:hover {
    color: rgb(22, 54, 170);
}

.footer__social-link--email:hover {
    color: var(--primary-gold);
}

/* Копірайт */
.footer__text {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.8;
}


@media (max-width: 1024px) {
    .header__nav {
        gap: 50px;
    }
    
    .about-parishes {
        padding: 80px 20px;
    }

    .about-parishes__container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-parishes__content {
        max-width: 100%;
        margin-right: 0;
        text-align: center;
    }

    .about-parishes__description {
        width: 100%;
        font-size: 17px;
    }

    .about-parishes__image {
        height: 400px;
    }
    
}

@media (max-width: 991.98px) {
    .header__container {
        grid-template-columns: auto 1fr auto;
        gap: 24px;
    }

    .header__burger {
        display: flex;
    }

    .header__nav {
        flex-direction: column;
        align-items: center;
        background-color: var(--primary-green);
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        display: none;
        padding: 20px;
    }

    .header__nav.header__nav--active {
        display: flex;
    }

    .header__nav-list {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .header__social--desktop {
        display: none;
    }

    .header__social--mobile {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 20px;
    }
}

@media (max-width: 992px) {
    
    .header__container {
        grid-template-columns: auto 1fr auto;
    }

    .header__social {
        display: none;
    }

    .header__burger {
        display: flex;
    }

    .header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-green);
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 24px 0;
        z-index: 1000;
    }

    .header__nav--active {
        display: flex;
    }

    .header__nav-list {
        flex-direction: column;
        gap: 18px;
        text-align: center;
        margin-bottom: 16px;
    }

    .header__nav-list .header__nav-link {
        font-size: 16px;
    }

    /* Виводимо соцмережі всередині бургер-меню */
    .header__nav .header__social {
        display: flex;
        justify-content: center;
        padding-top: 10px;
        gap: 12px;
    }

}

@media (max-width: 767.98px) {
    .header__container {
        grid-template-columns: 1fr auto;
        justify-content: space-between;
        gap: 16px;
    }

    .header__logo {
        justify-content: center;
    }
    
}

@media (max-width: 768px) {
    
    .header__container {
        grid-template-columns: 1fr auto;
        justify-content: space-between;
        gap: 0;
    }

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

    .header__logo-link {
        display: block;
        margin: 0 auto;
    }

    .header__burger {
        justify-self: end;
    }
    
    .header__nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background:
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8)),
            url('/img/holy_tr.webp') no-repeat center center / cover;
        padding: 0 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
    
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    
        transition:
            max-height 0.6s ease,
            padding 0.6s ease,
            gap 0.6s ease,
            opacity 0.4s ease,
            visibility 0.6s ease;
        
        z-index: 99;
        color: #fff;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
    }
    
    .header__nav--active {
        max-height: 500px; /* або більше, якщо у тебе більше пунктів */
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 30px 0;
        gap: 20px;
    }
    
    
    .about-parishes {
        padding: 125px 15px 58px;
    }

    .about-parishes__title {
        font-size: 26px;
    }

    .about-parishes__description {
        font-size: 15px;
        line-height: 1.5;
    }

    .about-parishes__image {
        height: 320px;
    }

}

@media (max-width: 480px) {
    .about-parishes__title {
        font-size: 22px;
    }

    .about-parishes__description {
        font-size: 15px;
    }

    .about-parishes__image {
        height: 250px;
    }
}