/* ══════════════════════════════════════════════════════════
   Yeniliklər (fzacademy.az blog API)
   Dizayn və slayder mənbə saytdakı `.home-posts` bloku ilə eynidir
   (Swiper 12 — `SwiperStory` namespace-i altında, qlobal Swiper 6.4.5-ə
   toxunmadan). Yalnız lazım olan səhifələrdə yüklənir.
   ══════════════════════════════════════════════════════════ */

.home-posts-area {
    padding: 56px 0;
}

.home-posts {
    position: relative;
}

/* ── Slayder (Swiper 12 — SwiperStory) ────────────────────── */
/* İlkin yüklənmədə slaydlar alt-alta düzülüb "sıçramasın" deyə
   slayder Swiper işə düşənə qədər gizlidir (mənbə saytdakı `hide-slider`). */
.hide-slider {
    height: 0;
    opacity: 0;
}

.hide-slider.swiper-initialized {
    height: auto;
    opacity: 1;
}

.home-posts-pagination {
    position: absolute;
    top: 5px !important;
    left: 50% !important;
    transform: translateX(-50%);
    width: auto !important;
    height: 0;
    z-index: 2;
}

.home-posts-pagination .swiper-pagination-bullet {
    background: var(--card-bg, #fff);
    opacity: 1;
    position: relative;
    margin: 0 7.5px !important;
}

.home-posts-pagination .swiper-pagination-bullet-active {
    background: #444;
}

@property --home-posts-bullet-progress {
    syntax: '<percentage>';
    initial-value: 0%;
    inherits: false;
}

.home-posts-pagination .swiper-pagination-bullet-active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border-radius: 50%;
    background: conic-gradient(#444 var(--home-posts-bullet-progress), transparent 0);
    -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    mask: radial-gradient(closest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
    animation: home-posts-bullet-progress 4s linear forwards;
    pointer-events: none;
}

@keyframes home-posts-bullet-progress {
    from {
        --home-posts-bullet-progress: 0%;
    }

    to {
        --home-posts-bullet-progress: 100%;
    }
}

.home-posts-slider {
    overflow: visible;
}

.home-post a {
    width: 100%;
    background: var(--card-bg, #fff);
    padding: 16px 16px 24px;
    display: block;
    border-radius: 20px;
    text-decoration: none;
}

.home-post-thumbnail {
    overflow: hidden;
    border-radius: 16px;
}

.home-post a:hover .home-post-thumbnail img {
    transform: scale(1.05);
}

.home-post-thumbnail img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: auto 1080 / 1350;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.home-post-thumbnail-placeholder {
    width: 100%;
    aspect-ratio: auto 1080 / 1350;
    border-radius: 16px;
    background: var(--color-background-secondary, #eff1f4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: var(--color-text-tertiary, #9aa1ac);
}

.home-post-title h3 {
    font-size: 24px;
    padding-top: 16px;
    color: var(--color-text-primary, #14161a);
    line-height: 1.3;
}

@media (max-width: 1100px) {
    .home-post-title h3 {
        font-size: 20px;
    }
}

@media (max-width: 500px) {
    .home-posts-area {
        padding: 36px 0;
    }

    .home-post-title h3 {
        font-size: 18px;
    }
}

/* ══════════════════════════════════════════════════════════
   /xeberler/ — siyahı
   ══════════════════════════════════════════════════════════ */
.news-archive-area {
    padding: 40px 0 60px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.news-grid-item {
    display: block;
}

.news-grid-item .home-post-title h3 {
    font-size: 20px;
}

.news-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted, #6b7280);
}

.news-pager {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
}

.news-pager .simple-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 991px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 575px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════════════════════════
   /xeberler/?id= — tək xəbər
   ══════════════════════════════════════════════════════════ */
.news-single-area {
    padding: 30px 0 60px;
}

.news-single {
    max-width: 820px;
    margin: 0 auto;
}

.news-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted, #6b7280);
    margin-bottom: 18px;
    text-decoration: none;
}

.news-back:hover {
    color: var(--main-color-text, #8a7a00);
}

.news-single-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text-primary, #14161a);
}

.news-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 14px 0 22px;
    font-size: 13px;
    color: var(--text-muted, #6b7280);
}

.news-single-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-single-image img {
    width: 100%;
    border-radius: 16px;
    display: block;
    margin-bottom: 26px;
}

.news-single-content {
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-text-primary, #14161a);
    word-wrap: break-word;
}

.news-single-content img,
.news-single-content iframe,
.news-single-content video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
}

.news-single-content p {
    margin-bottom: 16px;
}

.news-single-content a {
    color: var(--main-color-text, #8a7a00);
    text-decoration: underline;
}

.news-single-content h2,
.news-single-content h3,
.news-single-content h4 {
    margin: 26px 0 12px;
    line-height: 1.3;
}

.news-single-content ul,
.news-single-content ol {
    margin: 0 0 16px 22px;
}

.news-single-content li {
    margin-bottom: 8px;
}

@media (max-width: 575px) {
    .news-single-title {
        font-size: 24px;
    }
}

/* ── Qaranlıq rejim ─────────────────────────────────────── */
html[data-theme="dark"] .home-post a {
    background: var(--card-bg, #1a1a1a);
}

html[data-theme="dark"] .home-post-thumbnail-placeholder {
    background: var(--color-background-secondary, #202020);
}
