/* ============================================================
   ALMA NEWS SECTION — «Більше від ALMA»
   ============================================================ */

.alma-news-section {
    background-color: var(--bg-3, #F3F8F3);
}

.alma-news-layout {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.alma-news-header .alma-news-title {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    color: var(--header, #0c2c1c);
    margin: 0;
    line-height: 1.2;
}

/* ----------------------------------------------------------
   Порожній стан
   ---------------------------------------------------------- */
.alma-news-empty {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #c8e6c9;
}

/* ----------------------------------------------------------
   Обгортка слайдера / грід (≤3 картки)
   ---------------------------------------------------------- */
.alma-news-swiper-wrap {
    position: relative;
}

/* Відступи по боках для стрілок — тільки коли є слайдер */
.alma-news-swiper-wrap.has-slider {
    padding: 0 56px;
}

/* Статичний грід для ≤3 карток */
.alma-news-grid-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ----------------------------------------------------------
   Swiper-обгортка
   ---------------------------------------------------------- */
.alma-news-swiper {
    overflow: hidden;
    /* місце для dots знизу */
    padding-bottom: 36px !important;
}

/* Всі слайди однакової висоти — розтягуються по найвищому */
.alma-news-swiper .swiper-wrapper {
    align-items: stretch;
}

.alma-news-swiper .swiper-slide {
    height: auto;
}

/* ----------------------------------------------------------
   Картка
   ---------------------------------------------------------- */
.alma-news-card {
    background: #fff;
    border-radius: 12px;
    border-top: 3px solid var(--theme-3, #41C575);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.alma-news-card:hover {
    box-shadow: 0 8px 28px rgba(65, 197, 117, 0.2);
    transform: translateY(-4px);
}

.alma-news-pinned-card {
    border-top-color: var(--theme-4, #79B900);
}

/* ----------------------------------------------------------
   Фото (квадратне)
   ---------------------------------------------------------- */
.alma-news-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e8f5e9;
    flex-shrink: 0;
}

.alma-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.alma-news-card:hover .alma-news-thumb img {
    transform: scale(1.04);
}

/* ----------------------------------------------------------
   Текст
   ---------------------------------------------------------- */
.alma-news-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 16px 16px;
    gap: 8px;
    min-width: 0;
}

.alma-news-pin-badge {
    font-size: 12px;
    opacity: 0.75;
    line-height: 1;
}

.alma-news-card-title {
    font-family: "Europa Nova", "Europa Nuova", sans-serif !important;
    font-size: 16px;
    font-weight: 700;
    color: var(--header, #0c2c1c);
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.alma-news-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.alma-news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    gap: 8px;
}

.alma-news-date {
    font-size: 11px;
    color: var(--theme-3, #41C575);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.alma-news-date i { font-size: 10px; }

.alma-news-read-more {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-3, #41C575);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease, gap 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.alma-news-read-more i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.alma-news-read-more:hover {
    color: var(--header, #0c2c1c);
    gap: 7px;
}

.alma-news-read-more:hover i {
    transform: translate(2px, -2px);
}

/* ----------------------------------------------------------
   Навігація слайдера (стрілки + dots)
   ---------------------------------------------------------- */

/* Стрілки — абсолютно по центру висоти слайдів (вище dots) */
.alma-news-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--theme-3, #41C575);
    background: #fff;
    color: var(--theme-3, #41C575);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(65, 197, 117, 0.2);
    position: absolute;
    /* center of slides area (total height minus 36px padding-bottom for dots) */
    top: calc((100% - 36px) / 2);
    transform: translateY(-50%);
    z-index: 10;
}

.alma-news-nav-prev {
    left: 0;
}

.alma-news-nav-next {
    right: 0;
}

.alma-news-nav-btn:hover {
    background: var(--theme-3, #41C575);
    color: #fff;
    box-shadow: 0 4px 14px rgba(65, 197, 117, 0.35);
}

.alma-news-nav-btn.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
    border-color: #ccc;
    color: #ccc;
}

/* Swiper pagination dots — центруються автоматично через position:absolute */
.alma-news-pagination {
    position: absolute !important;
    bottom: 8px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.alma-news-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 1;
    border-radius: 50%;
    transition: background 0.25s, width 0.25s;
    margin: 0 !important;
}

.alma-news-pagination .swiper-pagination-bullet-active {
    background: var(--theme-3, #41C575);
    width: 22px;
    border-radius: 4px;
}

/* ----------------------------------------------------------
   МОДАЛЬНЕ ВІКНО
   ---------------------------------------------------------- */
.alma-news-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 44, 28, 0.72);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.alma-news-modal-overlay.alma-modal-open {
    opacity: 1;
    visibility: visible;
}

.alma-news-modal-box {
    background: #fff;
    border-radius: 16px;
    max-width: 720px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    transform: translateY(24px);
    transition: transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-3, #41C575) #f0f0f0;
}

.alma-news-modal-overlay.alma-modal-open .alma-news-modal-box {
    transform: translateY(0);
}

.alma-news-modal-close {
    position: sticky;
    top: 0;
    float: right;
    margin: 14px 14px 0 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--header, #0c2c1c);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease;
}

.alma-news-modal-close:hover { background: var(--theme-3, #41C575); }

.alma-news-modal-content {
    padding: 8px 32px 32px;
    clear: both;
}

.alma-news-modal-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 18px;
}

.alma-news-modal-meta {
    font-size: 12px;
    color: var(--theme-3, #41C575);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.alma-news-modal-title {
     font-family: "Europa Nova", "Europa Nuova", sans-serif !important;
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 700;
    color: var(--header, #0c2c1c);
    margin: 0 0 16px;
    line-height: 1.3;
}

.alma-news-modal-body {
    font-size: 13px;
    color: #444;
    line-height: 1.7;
}

.alma-news-modal-body p { margin-bottom: 12px; }

hr.alma-news-more-divider {
    border: none;
    border-top: 2px dashed var(--theme-3, #41C575);
    margin: 18px 0;
    opacity: 0.4;
}

.alma-news-modal-body h2,
.alma-news-modal-body h3,
.alma-news-modal-body h4 {
    color: var(--header, #0c2c1c);
    margin: 18px 0 8px;
}

.alma-news-modal-body ul,
.alma-news-modal-body ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.alma-news-modal-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
}

.alma-news-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.alma-news-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(65, 197, 117, 0.2);
    border-top-color: var(--theme-3, #41C575);
    border-radius: 50%;
    animation: almaSpinnerRotate 0.7s linear infinite;
}

@keyframes almaSpinnerRotate { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------
   АДАПТИВ
   ---------------------------------------------------------- */
@media (max-width: 991px) {
    .alma-news-grid-inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .alma-news-swiper-wrap.has-slider {
        padding: 0 48px;
    }

    .alma-news-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
}

@media (max-width: 575px) {
    .alma-news-grid-inner {
        grid-template-columns: 1fr;
    }

    .alma-news-card:hover { transform: none; }

    .alma-news-modal-content { padding: 8px 18px 24px; }

    .alma-news-swiper-wrap.has-slider {
        padding: 0 40px;
    }

    .alma-news-nav-btn {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }
}