body{
    font-family: 'moontserrat', sans-serif;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}
/* Apply to containers with animations */
[data-aos] {
    overflow-x: hidden;
    overflow-y: clip; /* Modern browsers support 'clip' which prevents scrollbar */
}

/* For older browsers */
@supports not (overflow-y: clip) {
    [data-aos] {
        overflow-y: visible; /* Fallback */
    }
}

.heading {
    margin: 100px 0;
    text-align: center;
}

.heading h1 {
    font-size: 120px;
    background-image: url(/assets/images/churchcomplex/churchucomplex\ \(1\).jpg);
    background-size: cover;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: 20px;
    font-weight: 1000;
    text-transform: uppercase;
}


.events {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.events .container {
    display: flex;
    margin-bottom: 150px;
    align-items: center;
    padding: 0;
    width: 100%;
    max-width: 1350px;
    padding-left: 30px;
}

.event {
    padding: 35px;
    flex: 1;
    text-align: justify;
    display: flex;
    flex-direction: column;
}

.events img {
    width: 50%;
    max-width: 800px;
    height: auto;
    object-fit: cover;
    aspect-ratio: 1.5/1;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.367);
}

/* Стилізація секції eventElement */
.eventElement {
    position: relative;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    padding-left: 30px;
    margin: 25px 0;
    color: #333;
   
}

/* Вертикальна риска */
.eventElement::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: #8b5e3b; /* Колір як на інших сторінках */
    border-radius: 2px;
}

/* Стилізація основного тексту опису */
.eventDescription {
    font-size: 18px;
    line-height: 1.7;
    color: #555;
}

/* Заголовок події */
.event h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: -5px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
}

/* Підкреслення заголовка */


/* Responsive Design */
@media screen and (max-width: 1400px) {
    .events .container {
        max-width: 1140px;
        margin: 0 20px 80px;
    }
}

@media screen and (max-width: 1200px) {
    .heading h1 {
        
        letter-spacing: 10px;
    }
}

@media screen and (max-width: 992px) {
    .heading h1 {
        font-size: 100px;
        letter-spacing: 5px;
    }

    .events .container {
        flex-direction: column !important;
        margin: 0 20px 80px;
        padding-left: 0px;
    }

    .events img {
        width: 100%;
        aspect-ratio: 16/9;
    }

    .event {
        padding: 25px;
        text-align: justify;
    }

    .eventElement {
        font-size: 15px;
        padding-left: 25px;
        margin: 20px 0;
    }
    
    .eventDescription {
        font-size: 16px;
    }
    
    .event h3 {
        font-size: 28px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
}

@media screen and (max-width: 768px) {
    .heading h1 {
       
        letter-spacing: 3px;
    }

    .events .container {
        margin: 0 15px 60px;
    }

    .events img {
        aspect-ratio: 4/3;
    }

    .event {
        padding: 15px;
    }

    .eventElement {
        font-size: 14px;
        padding-left: 20px;
        margin: 15px 0;
    }
    
    .eventElement::before {
        width: 3px;
    }
    
    .eventDescription {
        font-size: 15px;
        margin-top: 15px;
    }
    
    .event h3 {
        font-size: 24px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    /* Збільшення розміру каруселі на мобільних пристроях */
    .carousel {
        height: 70vh; /* збільшуємо висоту на планшетах */
        min-height: 450px;
        max-height: none; /* прибираємо обмеження максимальної висоти */
    }
    
    /* Покращення для тексту на каруселі для кращої видимості */
    .carousel-caption h1 {
        font-size: 32px;
    }
    
    .carousel-caption p {
        font-size: 16px;
    }
}

@media screen and (max-width: 576px) {
    .heading h1 {
        font-size: 65px;
        letter-spacing: 2px;
    }

    .events .container {
        margin: 0 10px 40px;
    }

    .events img {
        aspect-ratio: 1/1;
    }

    .event {
        padding: 10px;
    }

    .event h3 {
        font-size: 1.2rem;
    }

    .event p {
        font-size: 0.9rem;
    }

    .eventElement {
        font-size: 13px;
        padding-left: 15px;
        margin: 12px 0;
    }
    
    .eventDescription {
        font-size: 14px;
        margin-top: 12px;
    }
    
    .event h3 {
        font-size: 20px;
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .event h3::after {
        width: 40px;
        height: 2px;
    }
    
    .carousel {
        height: 80vh; /* ще більше збільшуємо на мобільних */
        min-height: 500px;
    }
    
    /* Зменшуємо відступи, щоб збільшити видиму площу */
    .carousel-inner {
        height: 100%;
    }
    
    .carousel-item {
        height: 100%;
    }
    
    .carousel-item img {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

@media screen and (max-width: 375px) {
    .heading h1 {
        font-size: 50px;
        letter-spacing: 1px;
    }

    .events .container {
        margin: 0 5px 30px;
    }
    .events img {
      padding: 0;
      box-shadow: none;
    }
    .event {
        padding: 5px;
    }
    
    .carousel {
        height: 85vh; /* максимальна висота для малих екранів */
        min-height: 450px;
    }
}