.home-template .news {
    overflow: hidden;
}
.home-template .news-wrapper {
    margin-top: 24px;
}
.home-template .news-all-link {
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    display: block;
    margin-left: auto;
}
.home-template .news-all-items {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: end;
    -ms-flex-align: end;
    align-items: flex-end;
    gap: 12px;
}
.home-template .news-all-title {
    margin-top: 13px;
}
.home-template .post-main .post-meta {
    font-size: 14px;
    color: var(--gray);
}
.home-template .news-all-link:hover .news-all-title {
    color: var(--blue);
}
.home-template .news-all-link svg path {
    -webkit-transition: fill 0.3s ease;
    -o-transition: fill 0.3s ease;
    transition: fill 0.3s ease;
}
.home-template .news-all-link:hover svg path {
    fill: var(--blue);
}
.home-template .post-main .post-main-title {
    margin-top: 8px;
    line-height: 1.5;
}
.home-template .news-wrapper .cell.large-5 {
    padding-left: 16px;
}
.home-template .news-wrapper .news-title-items {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    align-items: center;
}
.home-template .news-wrapper .news-tiles {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}
.home-template .news-wrapper .news-all-posts {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
    gap: 10px;
}
.home-template .news-wrapper .news-all-posts article {
    overflow: hidden;
}
.home-template .news-wrapper .news-all-posts article a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}
.home-template .news-wrapper .news-all-posts article .post-thumbnail {
    width: 33%;
}
.home-template .news-wrapper .news-all-posts article img {
    min-height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}
.home-template .news-wrapper .news-all-title {
    margin: -6px 0 0;
}




.home-template .news .tabs-content {
  border: none;
}

.home-template .news .tabs-panel.is-active {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-top: 60px;
    gap: min(20px, 1.5vw);
}

.home-template .news .tabs-panel article {
    max-width: 32%;
}

.home-template .news .tabs-panel article  img{
    max-width: 100% !important;
	min-height: 251px;
	object-fit: cover;
}

    /* general style for all posts text */
.home-template article .content-post {
    width: 67%;
    padding-left: 20px;
}
.home-template article h2 {
    font-size: 14px;
    line-height: 1.2;
    margin-top: 5px;
}

.home-template .all-item a {
    font-size: 16px;
}
.home-template .all-item-link {
    color: #000;
    text-align: right;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 145%;
    gap: 16px;
    display: flex;
    align-items: center;
}
.home-template .top-content.flex {
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}
.home-template .top-content.main-posts .post-thumbnail {
    max-height: 430px;
    overflow: hidden;
}

.home-template .all-item a {
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
}

.home-template .media {
    overflow: hidden;
}

.home-template .swiper-slider-nav {
    position: relative;
    top: 62px;
}
.home-template .swiper-slider-nav .swiper-button-prev,
.home-template .swiper-slider-nav .swiper-button-next {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gray-super-light);
    border: 1px solid #e8e8f4;
    -webkit-transition: background-color 0.3s;
    -o-transition: background-color 0.3s;
    transition: background-color 0.3s;
}
.home-template .swiper-slider-nav .swiper-button-prev:after,
.home-template .swiper-slider-nav .swiper-button-next:after {
    font-size: 14px;
    color: var(--black);
    -webkit-transition: color 0.3s;
    -o-transition: color 0.3s;
    transition: color 0.3s;
    font-weight: 600;
}
.home-template .swiper-slider-nav .swiper-button-next:after {
    margin-left: 2px;
}
.home-template .swiper-slider-nav .swiper-button-prev:after {
    margin-right: 2px;
}
.home-template .swiper-slider-nav .swiper-button-prev {
    left: unset;
    right: calc(60% - 23px);

}

.home-template .swiper-slider-nav .swiper-button-next {
    left: unset;
    right: calc(40% - 23px);
}
.home-template .swiper-slider-nav .swiper-button-prev:hover,
.home-template .swiper-slider-nav .swiper-button-next:hover {
    background: var(--black);
}
.home-template .swiper-slider-nav .swiper-button-prev:hover:after,
.home-template .swiper-slider-nav .swiper-button-next:hover:after {
    color: var(--white);
}

.home-template .document {
    overflow: hidden;
    padding: 90px 0;
    margin-top: min(110px, 9vw);
    background: #b1ccde;
}
.home-template .document-wrapper {
    position: relative;
}
.home-template .document-wrapper:after {
    content: "";
    position: absolute;
    z-index: -1;
    top: -90px;
    left: -30vw;
    width: 150vw;
    height: calc(100% + 180px);
    background-color: var(--green-light);
}
.home-template .document-wrapper .document-post-wrapper {
    margin-top: 26px;
}
.home-template .document-wrapper .document-post-wrapper .content-post {
    width: 100%;
    margin-bottom: 24px;
}

.home-template .useful-info {
    margin-top: 98px;
}
.home-template .useful-info .top-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    margin-bottom: 32px;
}
.home-template .useful-info .swiper-slider-nav {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}
.home-template .useful-info .useful-link__item {
    margin-bottom: 44px;
}
.home-template .useful-info .useful-link__item-element-tile {
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 17px;
}
.home-template .useful-info .useful-link__item-element {
    width: 32%;
    background-color: var(--gray-super-light);
    padding: 20px 15px;
    gap: 24px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    min-height: 36%;
}
.home-template .useful-info .useful-link__item-element .col-1 {
    width: 40%;
}
.home-template .useful-info .useful-link__item-element .col-2 {
    width: 60%;
}
.home-template .useful-info .useful-link__item-element h3 {
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 26px;
}
.home-template .useful-info .useful-link__item-element img {
    max-width: 118px;
    height: auto;;
}
.home-template .useful-info .useful-link__item-link {
    position: relative;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    background: var(--black);
    max-width: 102px;
    min-height: 28px;
    border-radius: 20px;
    color: var(--white);
    font-size: 10px;
    -webkit-transition: background 0.35s linear;
    -o-transition: background 0.35s linear;
    transition: background 0.35s linear;
}
.home-template .useful-info .useful-link__item-link:before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    width: 0;
    height: 105%;
    -webkit-transition: width 0.35s;
    -o-transition: width 0.35s;
    transition: width 0.35s;
}
.home-template .useful-info .useful-link__item-link:hover:before {
    width: 101%;
}
.home-template .useful-info .useful-link__item-link:hover {
    background: transparent;
}
.home-template .useful-info .useful-link__item-link > * {
    position: relative;
    z-index: 1;
}
.home-template .useful-info .useful-info__scrollbar {
    max-width: 550px;
    margin: 0 auto;
    position: relative;
}


.home-template .sitemap {
    margin-top: 82px;
}
.home-template .sitemap .top-bar,
.home-template .sitemap .top-bar ul {
    background-color: transparent;
    padding-right: 0;
}

.home-template .sitemap .top-bar ul {
    justify-content: space-between;
}

.home-template .sitemap .accordion-title,
.home-template .sitemap .accordion-content {
    border: none;
    padding: 1rem 0;
}
.home-template .sitemap .accordion-title {
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    color: var(--black);
    font-size: 16px;
}
.home-template .sitemap .accordion-title:hover {
    background-color: transparent;
    color: var(--blue);
}
.home-template .sitemap .accordion-title:focus {
    background-color: transparent;
}
.home-template .sitemap .accordion-item > .accordion-title::before {
    content: "";
    top: 60%;
    right: -20px;
    border: inset 5px;
    border-bottom-width: 0;
    border-top-style: solid;
    border-color: var(--black) transparent transparent;
    -webkit-transition: border-color 0.3s;
    -o-transition: border-color 0.3s;
    transition: border-color 0.3s;
}
.home-template .sitemap .accordion-item > .accordion-title:hover::before {
    border-color: var(--blue) transparent transparent;
}

.home-template .sitemap  .menu-main-menu-container {
    width: 100%;
}

.home-template .sitemap .menu > .menu-item {
    font-size: 17px;
    max-width: 196px;
}
.home-template .sitemap .menu .menu-item a {
    padding-left: 0;
    font-size: 14px;
}
.home-template .sitemap .menu .sub-menu {
    list-style: none;
    margin-left: 0;
}
.home-template .sitemap .menu .sub-menu a {
    font-size: 12px;
    color: var(--gray);
    font-weight: 300;
}


@media (min-width: 1200px) {
    .home-template .document-wrapper .document-post-wrapper {
        -webkit-column-count: 2;
        -moz-column-count: 2;
        column-count: 2;
        -webkit-column-gap: 20px;
        -moz-column-gap: 20px;
        column-gap: 20px;
    }
    .home-template .document-wrapper .document-post-wrapper > * {
        display: block;
        break-inside: avoid;
        -webkit-column-break-inside: avoid;
        -moz-column-break-inside: avoid;
    }
}

@media (min-width: 1024px) {
    .home-template .news-wrapper .news-all-posts article {
        max-height: 137px;
    }

    .home-template .useful-info .mobile-view {
        display: none;
    }

}

/* Foundation breakpoint */
@media (max-width: 1023px) {
    .home-template {
        margin-top: 20px;
    }
    .home-template .desktop-view {
        display: none;
        visibility: hidden;
    }

    .home-template .post-main,
    .home-template .news-wrapper .news-tiles {
        margin-top: 16px;
    }

    .home-template .news-wrapper {
        margin-top: 0;
    }
    .home-template .news-wrapper .news-title-items {
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }
    .home-template .news-wrapper .post-thumbnail {
        width: 100%;
    }
    .home-template .news-all-items {
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }
    .home-template .news-all-title {
        margin-top: 0;
    }
    .home-template .news-wrapper .news-tiles article .post-meta {
        margin-top: 0;
    }
    .home-template .news-wrapper .news-tiles article h2 {
        font-weight: 300;
    }

    .home-template article h2 {
        font-size: clamp(12px, 3.3vw, 16px);
        font-weight: 400;
    }

    .home-template .post-main .post-meta {
        font-size: clamp(12px, 3.5vw, 18px);
    }
    .home-template .news-wrapper .cell.large-5 {
        padding-left: 0;
    }


    .home-template .all-item-link {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: end;
        -ms-flex-pack: end;
        justify-content: end;
        gap: 17px;
    }
    .home-template .all-item a {
        margin-right: 0;
    }
    .home-template .news-wrapper .news-all-title {
        margin: 0;
    }

    .home-template .useful-info .top-content {
        margin-bottom: 10px;
    }

    .home-template .useful-info .swiper-slider-nav.mobile-view {
        margin-top: 44px;
    }

    .home-template .useful-info .useful-info__scrollbar-mobile {
        padding-bottom: 30px;
    }

    .home-template
        .useful-info
        .useful-info__scrollbar-mobile
        .swiper-scrollbar {
        top: 0;
    }

    .home-template .useful-info .useful-link__item-element {
        width: fit-content;
        margin: 0 auto 30px;

        min-width: 550px;
    }

    .home-template .useful-info .useful-link__item-element img {
        aspect-ratio: unset;
    }

   .home-template .useful-info .mobile-view {
       display: block;
   }

    .home-template .useful-links-swiper .swiper-slide {
        height: auto;
        box-sizing: border-box;
        margin-bottom: 20px;
    }

    .home-template .useful-link__item-element {
        display: flex;
        gap: 15px;
    }


    .home-template
        .useful-info
        .useful-link__item-element
        .useful-link__item-element__zobrazhennya {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }


    .home-template .sitemap .menu {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
    .home-template .sitemap .menu > .menu-item {
        max-width: 25%;
    }
}

@media (max-width: 850px) {
    .home-template .news .tabs-panel article {
        max-width: 49%;
    }

    .home-template .news .tabs-panel article img {
        min-height: min(270px, 34vw);
        max-height: min(270px, 38vw);
    }

    .home-template .useful-info .useful-link__item-element {
        min-width: 100%;
    }
}

@media (max-width: 750px) {
    .home-template article .content-post {
        padding-left: 16px;
    }

    .home-template
        .useful-info
        .swiper-slider-nav.mobile-view
        .swiper-button-prev {
        left: 30%;
    }

    .home-template
        .useful-info
        .swiper-slider-nav.mobile-view
        .swiper-button-next {
        right: 30%;
    }


    .home-template h2.title {
        font-size: 28px;
    }

    .home-template .all-item a {
        font-size: 12px;
    }

    .home-template .useful-info {
        margin-top: 80px;
    }
    .home-template .useful-info .swiper-slider-nav.mobile-view {
        margin-top: 0;
    }


    .home-template .sitemap {
        margin-top: 140px;
    }
    .home-template .sitemap .menu {
        -webkit-box-pack: start;
        -ms-flex-pack: start;
        justify-content: flex-start;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: normal;
        -ms-flex-direction: row;
        flex-direction: row;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    .home-template .sitemap .menu > .menu-item {
        max-width: 50%;
    }
}

@media (max-width: 620px) {

    .home-template .news .tabs-panel.is-active {
        margin-top: 0;
    }

    .home-template .news .tabs-panel article {
        max-width: 100%;
        width: 100%;
    }

    .home-template .news .tabs-panel article img {
        min-height: auto;
        max-height: unset;
        object-fit: cover;
        height: 100%!important;
    }

    .home-template .news .post-main a {
        display: flex;
        min-height: 120px;
    }

    .home-template .top-content.main-posts .post-thumbnail {
        width: 30%!important;
    }

    .home-template .top-content.main-posts .post-content {
        padding-left: 16px;
        width: 70%!important;
    }

    .home-template .news  .post-main .post-meta {
        margin-top: 0;
    }

}

.top-content-media {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 45px;
}

.media-library-header {
    display: flex;
    align-items: center;
    gap: 38px;
    flex-direction: column;
}
.media-library-header h2 {
    color: var(--000000, #000);
    font-family: e-Ukraine;
    font-size: 36px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    margin-bottom: 0px;
    width: 100%;
}
.media-filters {
    display: flex;
    gap: 25px;
}
.media-filter-btn {
    color: #717171!important;
    text-align: center!important;
    font-size: 14px!important;
    font-style: normal!important;
    font-weight: 400!important;
    line-height: 145%!important;
    width: 84px!important;
    height: 32px!important;
    background: transparent!important;
    cursor: pointer!important;
    border: none!important;
}

/*.media-filter-btn {*/
/*    padding: 8px 20px;*/
/*    border: none;*/
/*    background-color: transparent;*/
/*    cursor: pointer;*/
/*    border-radius: 20px;*/
/*    font-weight: 500;*/
/*    transition: background-color 0.3s, color 0.3s;*/
/*}*/

.media-filter-btn.active {
    border-radius: 1000px!important;
    background: #000!important;
    color: #FFF!important;
    font-weight: 500!important;
}

.media-library-nav {
    display: flex;
    align-items: center;
    gap: 42px;
    flex-direction: column;
}

.swiper-navigation {
    display: flex;
    gap: 10px;
    position: relative;
}
.media_item-template-default .gallery-thumbnails {
    max-width: 800px!important;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 20px;
}
.media_item-template-default .entry-content img {
    width: 100%;
    object-fit: cover;
    height: 100%;
    object-position: center;
}
.media_item-template-default.singular .entry-title {
    font-size: 36px;
    font-weight: 500;
    text-align: center;
    max-width: 770px;
    margin: auto;
}
.media_item-template-default .entry-meta span {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray);
    text-align: center;
}
.media_item-template-default .entry-meta {
    margin-top: 10px;
    text-align: center;
}
.media_item-template-default .featured-image-wrapper {
    max-width: 800px!important;
}
.media_item-template-default.singular .has-post-thumbnail .entry-header {
    margin-top: 0px;
    padding-bottom: 0px;
}
.media_item-template-default .site-main {
    padding-top: 0px;
    padding-bottom: 0px;
}
.media_item-template-default .site-main article {
    margin-bottom: 0px;
}
.media_item-template-default.single.singular .entry-content {
    margin-top: 40px;
    margin-bottom: 0px;
}
.media_item-template-default .footer {
    margin-top: 0px;
}
@media (max-width: 1024px) {
    .swiper-navigation {
        display: flex;
        gap: 30px;
        position: absolute;
        top: 93%;
        left: calc(50% - 50px);
    }
    .media-library-slider .grid-x {
        position: relative;
    }
    .top-content-media {
        align-items: start;
    }
    .media-library-nav {
        margin-top: 8px;
    }
    .media_item-template-default .entry-meta {
        margin-top: 0px;
        margin-bottom: 10px;
    }
    .media_item-template-default.singular .entry-title {
        text-align: start;
        font-size: 20px;
    }
    .media_item-template-default .gallery-thumbnails {
        grid-template-columns: 1fr 1fr;
    }
}
.media-library-slider .swiper-button-prev,
.media-library-slider .swiper-button-next {
    position: static;
    width: 40px;
    height: 40px;
    margin: 0;
    background-color: #f0f0f0;
    border-radius: 50%;
}

.media-library-slider .swiper-button-prev::after,
.media-library-slider .swiper-button-next::after {
    font-size: 16px;
    color: #000;
}

.media-library-slider .media-swiper {
    position: relative;
    min-height: 300px; /* Prevents collapsing during AJAX calls */
}

.swiper-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Media Library Styles */
.media-library-slider {
    margin-top: 50px;
}

.media-library-grid, .photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.media-item {
    /*border: 1px solid #e8e8f4;*/
    /*border-radius: 8px;*/
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.media-item:hover {
    /*box-shadow: 0 4px 15px rgba(0,0,0,0.1);*/
}

.media-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.media-item-thumbnail {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.media-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    z-index: 10;
}

.play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 3px;
}

.media-item-content {
    /*padding-top: 20px;*/
}

.media-item-content h3 {
    margin-bottom: 0px;
    color: #000;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 145%;
}

.media-item-date {
    color: #717171;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
    line-height: 145%;
    margin-bottom: 5px;
}

.page-header {
    margin-bottom: 30px;
    border-bottom: 1px solid #e8e8f4;
    padding-bottom: 15px;
}

.pagination {
    margin-top: 40px;
    text-align: center;
}

/* Single Media Item */
.back-to-archive {
    display: inline-block;
    margin-bottom: 20px;
    color: #0073aa;
    text-decoration: none;
}

.entry-header {
    margin-bottom: 30px;
}

.photo-gallery-grid .gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}
