@media (min-width: 544px) and (max-width: 921px) {

    .tourism-home-allpois-cta{
        width: 100%;
    }

    .diocesi-home-heading-container, .diocesi-home-subheading-container, .diocesi-home-searchbox-container{
        width: 60% !important;
    }

    .home-responsive-hero-title{
        font-size: 48.83px !important;
    }
    
    .tourism-home-event-slide-title{
        font-size: 20px !important;
    }

    .diocesi-home-inner-banner-container{
        width: 70% !important;
    }

    .home-responsive-banner-claim{
        font-size: 25px !important;
    }

    .home-responsive-hero-subheading{
        font-size: 20px !important;
    }

    .diocesi-home-routes-section-container{
        margin-top: 62px !important;
    }

    .diocesi-home-banner-full-width-wrapper{
        width: 100% !important;
        margin-left: 0 !important;
    }

    .diocesi-home-banner-routes-image{
        top: 80px !important;
    }

    .tourism-home-pois-swiper, .tourism-home-events-swiper, .tourism-home-institution-swiper{
        width: 100vw !important;
    }

    .diocesi-home-banner-routes-image{
        object-fit: cover !important;
    }

    .tourism-home-pois-arrow-right{
        display: none !important;
    }

    .tourism-home-pois-arrow-left{
        display: none !important;
    }

    .tourism-home-events-arrow-right{
        display: none !important;
    }

    .tourism-home-events-arrow-left{
        display: none !important;
    }

    .diocesi-home-institution-arrow-right{
        display: none !important;
    }

    .diocesi-home-institution-arrow-left{
        display: none !important;
    }

    .diocesi-home-routes-list-entry-category{
        max-width: 200px !important;
        font-size: 16px;
    }

    .diocesi-home-routes-list-entry-thumbnail{
        width: 110px !important;
        height: 110px !important;
    }

    .diocesi-home-routes-container {
        height: 424px !important;
    }

    .diocesi-home-routes-list-entry{
        height: 133px !important;
    }

    .diocesi-home-hero-section-container{
        display: none !important;
    }

    .diocesi-home-hero-section-container-tablet{
        height: 560px;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        gap: 32px;
        padding: 0 20px !important;
    }

    .diocesi-home-institution-container{
        flex-direction: column;
        padding: 48px 20px !important;
        height: 708px !important;
    }

    .diocesi-home-institution-swiper-wrapper{
        width: 100% !important;
    }

    .diocesi-home-institution-claim-text{
        width: 100% !important;
        height: 35% !important;
    }

    .diocesi-home-institution-full-width-wrapper{
        height: 708px !important;
    }

    .diocesi-home-routes-section-container-left{
        width: 50% !important;
    }

    .diocesi-home-routes-section-container-right{
        width: 50% !important;
    }

    
}

/* MOBILE*/
@media (max-width: 544px) {

    .tourism-home-allpois-cta{
        width: 100%;
    }

    .tourism-home-pois-swiper, .tourism-home-events-swiper, .tourism-home-institution-swiper{
        width: 100vw !important;
    }

    .tourism-home-pois-container{
        margin-top: 48px !important;
    }

    .diocesi-home-events-container {
        margin-top: 48px !important;
    }

    .diocesi-home-responsive-title{
        font-size: 25px;
    }

    .diocesi-home-hero-section-container{
        display: none !important;
    }

    .diocesi-home-hero-section-container-mobile{
        height: 392px;
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        gap: 32px;
    }

    .diocesi-home-heading-container{
        width: 75% !important;
    }

    .diocesi-home-subheading-container{
        width: 75% !important;
    }

    .diocesi-home-searchbox-container{
        width: 100% !important;
        /*margin-top: 64px !important;*/
    }

    .diocesi-home-routes-section-container{
        display: none !important;
    }

    .diocesi-home-routes-section-container-mobile{
    width: 100%;
    display: flex !important;
    align-items: flex-start;
    flex-direction: column;
    gap: 40px;
    margin-top: 80px;
    }

    .diocesi-home-routes-container-mobile {
        width: 100%;
        height: 100%;
        display: flex !important;
        flex-direction: column;
        gap: 16px;
    }

    .diocesi-home-routes-list-entry{
        height: 156px !important;
        padding: 10px !important;
    }

    .diocesi-home-routes-list-entry-category{
        max-width: 170px !important;
    }
    

    .diocesi-home-routes-list-entry-thumbnail{
        width: 138px !important;
        height: 138px !important;
    }

    .diocesi-bg-radial-right, .diocesi-bg-radial-left{
        display: none !important;
    }

    .diocesi-home-institution-full-width-wrapper{
        height: 732px !important;
    }

    .diocesi-home-institution-container{
        flex-direction: column;
        padding: 48px 12px !important;
    }

    .diocesi-home-institution-claim-text{
        width: 100% !important;
        height: 35% !important;
    }

    .diocesi-home-institution-swiper-wrapper{
        width: 100% !important;
    }

    .diocesi-home-banner-full-width-wrapper{
        height: 230px !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    .diocesi-home-inner-banner-wrapper{
        height: 230px !important;
        padding: 35px 15px !important;
        border-radius: 24px !important;
    }

    .diocesi-home-banner-cta-wrapper{
        width: 100%;
    }
    
    .diocesi-home-inner-banner-container{
        width: 100% !important;
    }
    
    .diocesi-home-banner-routes-image{
        display: none !important;
    }

    
    .tourism-home-pois-arrow-right{
        display: none !important;
    }

    .tourism-home-pois-arrow-left{
        display: none !important;
    }

    .tourism-home-events-arrow-right{
        display: none !important;
    }

    .tourism-home-events-arrow-left{
        display: none !important;
    }

    .diocesi-home-institution-arrow-right{
        display: none !important;
    }

    .diocesi-home-institution-arrow-left{
        display: none !important;
    }
}


.diocesi-bg-radial-left{
    height: 650px;
    width: 650px;
    background: radial-gradient(circle, rgba(250, 247, 236, 1) 10%, rgba(250, 247, 236, 0) 50%); 
    position: absolute;
    top: -100px;
    left: -550px;
    z-index: -1;
}

.diocesi-bg-radial-right{
    height: 650px;
    width: 650px;
    background: radial-gradient(circle, rgba(250, 247, 236, 1) 10%, rgba(250, 247, 236, 0) 50%); 
    position: absolute;
    top: 200px;
    right: -550px;
    z-index: -1;
}

.tourism-home-flex-container{
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ========================================================================================================
                                        HERO SECTION
   ======================================================================================================== */

.diocesi-home-hero-section-container{
    width: 100%;
    display: flex;
    height: 700px;
    gap: 20px;
    margin-top: 64px;
}   

.diocesi-home-hero-section-container-left{
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 48px;
}

.diocesi-home-heading-container{
    display: flex;
    width: 100%;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.diocesi-home-subheading-container{
    overflow: hidden;
}

.scroll-in-title {
    transform: translateX(-100%);
    opacity: 0;
    animation: scrollInFromLeft 0.9s ease-out forwards;
}

/* Stagger animations for each line 
.scroll-in-title:nth-child(1) {
    animation-delay: 0s;
}
.scroll-in-title:nth-child(2) {
    animation-delay: 0.3s;
}
.scroll-in-title:nth-child(3) {
    animation-delay: 0.6s;
}
*/

@keyframes scrollInFromLeft {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.diocesi-home-hero-section-container-right{
    width: 50%;
    height: 100%;
    display: flex;
    gap: 20px;
}

.diocesi-home-hero-images-left{
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 80px;

}

.diocesi-home-mosaic-image{
    border-radius: 24px;
}

.scale-in-image {
    transform: scale(0);
    opacity: 0;
    animation: scaleIn 0.9s ease-out forwards;
  }
  
@keyframes scaleIn {
    to {
      transform: scale(1);
      opacity: 1;
    }
}

.diocesi-home-first-image{
    width: 100%;
    height: 380px;
}

.floating-diagonal-image{
    animation: floatDiagonal 2s ease-in-out infinite;
}

/* Moves up */
.floating-up-image{
    animation: floatUpDown 2s ease-in-out infinite;
}

/* Moves down */
.floating-down-image{
    animation: floatDownUp 2s ease-in-out infinite;
}

@keyframes floatDiagonal {
    0%, 100% {
      transform: translate(0, 0);
    }
    50% {
      transform: translate(-10px, -10px); /* move up and left */
    }
  }

@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px); /* or -5px for gentler motion */
  }
}

@keyframes floatDownUp {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(10px);
    }
  }

.diocesi-home-bg-image{
    min-width: 100%;
    height: 100px;
    border-radius: 24px;
    margin-left: -40px;
}

.diocesi-home-hero-images-right{
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.diocesi-home-second-image{
    width: 100%;
    height: 324px;
    border-radius: 24px;
}

.diocesi-home-third-image{
    width: 100%;
    height: 276px;
    border-radius: 24px;
}

.diocesi-home-searchbox-container{
    display: flex;
    justify-content: flex-start;
    width: 90%;
    animation: expandWidth 0.9s ease-out forwards;
}

@keyframes expandWidth {
    from {
        width: 60%;
    }
    to {
        width: 90%;
    }
}

.diocesi-home-search-form{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.diocesi-home-searchbox{
    padding-left: 50px !important;
    font-size: 16px !important;
    border-radius: 39px !important;
    height: 64px !important;
    background-color: #FFF !important;
    border: 1px solid rgb(221, 221, 221, 0.5) !important;
    box-shadow: 0px 1px 20px 10px rgba(0, 0, 0, 0.04) !important;
    color: var(--diocesi-global-color-gray) !important;
    font-family: 'Gotham', sans-serif;
}


/* ========================================================================================================
                                        POI SECTION
   ======================================================================================================== */
.scroll-section{
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1.2s ease-out, transform 1.5s ease-out;
    will-change: transform, opacity;
}

.scroll-section.visible {
    opacity: 1;
    transform: translateY(0);
  }

.tourism-home-pois-container {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    margin-top: 48px;
}

.diocesi-home-pois-title-container{
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.tourism-home-pois-arrow-right{
    position: absolute;
    right: 15px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 100;
    
}

.tourism-home-pois-arrow-left{
    position: absolute;
    left: 15px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 100;
}

.diocesi-home-swiper-nav-circle-container{
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
}

.tourism-home-allpois-cta-wrapper{
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.tourism-home-allpois-cta{
    margin-top: 40px;
}

/* ========================================================================================================
                                        ROUTES SECTION
   ======================================================================================================== */

.diocesi-home-routes-section-container {
    width: 100%;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 40px;
    margin-top: 48px;
}   

.diocesi-home-routes-container{
    width: 100%;
    height: 560px;
    display: flex;
    gap: 20px;
}

.split-left,
.split-right {
  opacity: 0;
  transition: transform 0.8s ease-out, opacity 0.6s ease-out;
  will-change: transform, opacity;
}

.split-left {
  transform: translateX(-250px);
}

.split-right {
  transform: translateX(250px);
}

.split-right:nth-child(1) {
    transition-delay: 0s; 
}
  
.split-right:nth-child(2) {
    transition-delay: 0.05s; 
}

.split-right:nth-child(3) {
    transition-delay: 0.1s; 
}

.split-right:nth-child(4) {
    transition-delay: 0.15s; 
}

.split-left.visible,
.split-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.diocesi-home-routes-section-container-left {
    width: 60%;
    height: 100%;
}

.diocesi-home-first-route-wrapper{
    width: 100%;
    height: 100%;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}


/*Through the use of this class->img rule, the class diocesi-home-first-route-image can be removed*/
.diocesi-home-first-route-image-link-gradient img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    position: relative;
  }
  
  .diocesi-home-first-route-image-link-gradient:hover img {
    transform: scale(1.1);
  }
  

/*Adds a linear gradient on the image*/
.diocesi-home-first-route-image-link-gradient::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
}

.diocesi-home-first-route-overlay-information{
    position: absolute;
    width: 75%;
    bottom: 40px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--diocesi-global-color-white);
    line-height: normal;
    z-index: 1;
}

.diocesi-home-first-route-favorite-container{
    position: absolute;
    top: 20px;
    right: 20px;
    cursor: pointer;
}

.diocesi-home-first-route-title{
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.diocesi-home-routes-list-entry-favorite-container{
    position: absolute;
    top: 10px;
    right: 10px;
}

.diocesi-home-first-route-category{
    font-size: 20px;
}

.diocesi-home-first-route-overlay-information a{
    color: var(--diocesi-global-color-white);
}

.diocesi-home-routes-section-container-right {
    width: 40%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.diocesi-home-routes-list-entry{
    position: relative;
    background-color: var(--diocesi-global-color-white);
    width: 100%;
    height: 170px;
    border-radius: 24px;
    border: 1px solid rgba(221, 221, 221, 0.5);
    box-shadow: 0px 1px 10px 5px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
}

.diocesi-home-routes-list-entry:hover{
    border-radius: 24px;
    border: 1px solid #DDD;
    background: #FFF;
    box-shadow: 0px 1px 20px 10px rgba(0, 0, 0, 0.12);
}

.diocesi-home-routes-list-entry-thumbnail{
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 24px;
}

.diocesi-home-routes-list-entry-image{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.5s ease;
}

.diocesi-home-routes-list-entry-image:hover{
    transform: scale(1.1);
}

.diocesi-home-routes-list-entry-info{
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        gap: 16px;
}

.diocesi-home-routes-list-entry-title {
    font-size: 20px;
    font-weight: bold;
    line-height: 24px;
    max-height: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.diocesi-home-routes-list-entry-category{
    max-width: 230px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* ========================================================================================================
                                        BANNER SECTION
   ======================================================================================================== */

.diocesi-home-banner-full-width-wrapper{
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    width: 100vw;
    margin-top: 48px;
    height: 420px;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: visible;
}

    .fade-in-slow {
    opacity: 0;
    transition: opacity 1.5s ease-out; /* 👈 slow fade */
    will-change: opacity;
  }
  
  .fade-in-slow.visible {
    opacity: 1;
  }

.diocesi-home-banner-routes-image{
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: none;
    overflow: visible;
}

.diocesi-home-inner-banner-wrapper{
    width: 100%;
    max-width: 1140px;
    height: 390px;
    background: #FCFBF4;
    display: flex;
    justify-content: center;
    padding: 78px 0;
    border-radius: 24px;
}

.diocesi-home-inner-banner-container{
    text-align: center;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    z-index: 1;
}



/* ========================================================================================================
                                        EVENTS SECTION
   ======================================================================================================== */

.diocesi-home-events-container {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    margin-top: 112px;
}

.tourism-home-events-arrow-left{
    position: absolute;
    left: 15px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 100;
}

.tourism-home-events-arrow-right{
    position: absolute;
    right: 15px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 100;
}


/* ========================================================================================================
                                        INSTITUTIONS SECTION
   ======================================================================================================== */


.diocesi-home-institution-full-width-wrapper{
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    width: 100vw;
    margin-top: 48px;
    height: 548px;
    display: flex;
    justify-content: center;
    background-color: #FCFBF4;
}

.diocesi-home-institution-container{
    width: 100%;
    height: 100%;
    max-width: 1140px;
    display: flex;
    padding: 48px 0;
}

.diocesi-home-institution-claim-text{
    height: 100%;
    width: 25%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0 16px 0 0;
}

.diocesi-home-compass-icon{
    font-size: 40px;
}

.diocesi-home-institution-swiper-wrapper{
    height: 100%;
    width: 75%;
}

.diocesi-home-institution-arrow-left{
    position: absolute;
    left: 15px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 100;
}

.diocesi-home-institution-arrow-right{
    position: absolute;
    right: 15px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 100;
}





.toggle-on-off-container {
    margin-top: 34px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.toggle-on-off {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 25px;
    border-radius: 34px;
   /*  border: solid 1px #000; */
}

.toggle-on-off input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-on-off label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 34px;
    background: #484848;
}

.toggle-on-off label:after {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 1px;
    top: 2.5px;
    background-color: #FFF;
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 50%;

}

.toggle-on-off input:checked + label {
    background-color: var(--diocesi-global-color-accent);
}

.toggle-on-off input:checked + label:after {
    -webkit-transform: translateX(20px);
    -ms-transform: translateX(20px);
    transform: translateX(20px);
    background-color: #fff;
}




/* Fix fo accessibility */
.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet, .swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
    margin: 0px 10px 0px 10px !important;
}

.frontpage-cta {
    display: flex !important;
    width: 141px !important;
    height: 40px !important;
    padding: 0px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
}

.h2-display {
    font-size:48.83px !important;
}

.h3-display {
    font-size: 25px !important;
}

.h3-display-big {
    font-size: 32px !important;
}

/* Mobile adjustment */
@media (max-width: 544px) {
    .frontpage-cta {
        margin-left: 20px;
    }
    .diocesi-home-responsive-title, .h2-display {
        font-size: 25px !important;
    }
}