/* ================================================================
   HOMEPAGE NAUJIENŲ SLIDERIS
   Dedama į Avada > Global CSS (arba prie homepage CSS).
   Spalvos / šriftai paimti iš esamo Sakuros dizaino.
   ================================================================ */

/* SVARBU: overflow uždaromas TIK ant slider sekcijos, NE ant html/body.
   Avada temose `body { overflow-x: hidden }` sukuria antrą scrollbar'ą,
   todėl Swiper'io transform'ą izoliuojame čia, sekcijos viduje. */
.hp-news-section {
    max-width: 1300px;
    width: 100%;
    margin: auto;
    padding: 64px 32px;
    box-sizing: border-box;
    overflow: hidden;          /* neleidžia slideriui išsilieti už ekrano */
}

/* Visi vidiniai elementai laiko box-sizing, kad padding'ai neperaugtų pločio */
.hp-news-section *,
.hp-news-section *::before,
.hp-news-section *::after {
    box-sizing: border-box;
}

.hp-news-inner {
    width: 100%;
    max-width: 100%;
}

/* --- Avada konteinerio apsaugos ---
   Code/HTML elementas Avada'oje sėdi viduje .fusion-column-wrapper /
   .fusion-builder-row. Šie elementai kartais turi neigiamus margin'us ar
   fiksuotą plotį, dėl ko slideris išsilieja. Užfiksuojame plotį. */
.hp-news-section,
.hp-news-section .fusion-row,
.hp-news-section .fusion-column-wrapper {
    max-width: 1300px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.hp-news-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

#main .hp-news-head h2 {
    color: #0B264D;
    margin: 0;
}

.hp-news-head .btn-sakuros {
    margin-top: 0;
    color: #0B264D;
    border: 1px solid #0B264D;
    white-space: nowrap;
}

.hp-news-head .btn-sakuros:hover {
    background: #0B264D;
    color: #FFF;
    border: 1px solid #0B264D;
}

/* --- Swiper viewport --- */
.hp-news-swiper {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.hp-news-swiper .swiper-wrapper {
    align-items: stretch;
    box-sizing: border-box;
}

.hp-news-swiper .swiper-slide {
    height: auto;        /* leidžia kortelėms ištįsti per visą aukštį */
    display: flex;
    box-sizing: border-box;
}

/* --- Kortelė --- */
.hp-news-card {
    background: #0B264D;
    border: 1px solid #E1D29E;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    display: flex;
}

.hp-news-card-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.hp-news-card-img {
    width: 100%;
    height: 220px;             /* fiksuotas aukštis – patikima visuose narš. */
    aspect-ratio: 16 / 10;     /* moderniose narš. perima proporciją */
    flex: 0 0 auto;            /* neleidžia paveikslėliui ištįsti flex'e */
    overflow: hidden;
}

.hp-news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

/* Jei naršyklė palaiko aspect-ratio – atsisakome fiksuoto aukščio */
@supports (aspect-ratio: 1) {
    .hp-news-card-img {
        height: auto;
    }
}

.hp-news-card-link:hover .hp-news-card-img img {
    transform: scale(1.05);
}

.hp-news-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    flex: 1;
}

.hp-news-date {
    font-family: Mulish;
    font-size: 14px;
    line-height: 20px;
    color: #E1D29E;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#main .hp-news-title {
    color: #FFF !important;
    font-family: "DM Serif Display" !important;
    font-size: 24px !important;
    font-weight: 400 !important;
    line-height: 30px !important;
    letter-spacing: -0.25px;
    margin: 0;
}

.hp-news-excerpt {
    color: #FFF;
    font-family: Mulish;
    font-size: 16px;
    line-height: 24px;
    margin: 0;
    /* max 3 eilutės */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hp-news-more {
    margin-top: auto;
    padding-top: 8px;
    font-family: Mulish;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #E1D29E;
}

.hp-news-card-link:hover .hp-news-more {
    text-decoration: underline;
}

/* --- Valdikliai (rodyklės + taškai) --- */
.hp-news-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    width: 100%;
    max-width: 100%;
}

.hp-news-prev,
.hp-news-next {
    flex: 0 0 auto;
}

.hp-news-prev,
.hp-news-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #E1D29E;
    background: transparent;
    color: #0B264D;
    cursor: pointer;
    transition: all .2s ease;
    padding: 0;
}

.hp-news-prev:hover,
.hp-news-next:hover {
    background: #0B264D;
    color: #E1D29E;
}

.hp-news-prev.swiper-button-disabled,
.hp-news-next.swiper-button-disabled {
    opacity: .35;
    cursor: default;
}

.hp-news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
}

.hp-news-pagination .swiper-pagination-bullet {
    width: 9px;
    height: 9px;
    background: #0B264D;
    opacity: .25;
    border-radius: 50%;
    transition: all .2s ease;
}

.hp-news-pagination .swiper-pagination-bullet-active {
    opacity: 1;
    width: 24px;
    border-radius: 6px;
    background: #E1D29E;
}

.swiper-pagination-horizontal.swiper-pagination-bullets {
    justify-content: center !important;
}

/* ================================================================
   RESPONSIVE  (slidesPerView tvarko JS; čia tik tarpai/dydžiai)
   ================================================================ */

@media (max-width: 1024px) {
    .hp-news-section {
        padding: 48px 32px;
    }
}

@media (max-width: 768px) {
    .hp-news-section {
        padding: 48px 16px;
    }
    .hp-news-head {
        margin-bottom: 24px;
    }
    #main .hp-news-title {
        font-size: 22px !important;
        line-height: 28px !important;
    }
}

@media (max-width: 600px) {
    .hp-news-section {
        padding: 40px 16px;
    }
    .hp-news-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .hp-news-head .btn-sakuros {
        width: 100%;
        justify-content: center;
    }
    .hp-news-card-body {
        padding: 20px;
    }
}
