/* =============================================
   SINGLE POST — Photo Gallery Slider
   ============================================= */

.post-hero__slider {
    position: relative;
    width: 100%;
    height: 520px;
    margin-top: 90px; /* لتعويض الهيدر الثابت */
    overflow: hidden;
    background: #1D3557;
}

.post-slider__track {
    position: relative;
    height: 100%;
}

/* Each slide fills the full slider area absolutely */
.post-slide {
    position: absolute;
    inset: 0;
    display: none;
}

.post-slide.active {
    display: block;
}

.post-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ── Arrow buttons ── */
.post-slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 10;
}

.post-slider__btn:hover {
    background: rgba(0, 0, 0, 0.6);
}

.post-slider__prev { left: 20px; }
.post-slider__next { right: 20px; }

.post-slider__btn svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Dots ── */
.post-slider__dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.post-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.post-slider__dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

/* ── RTL ── */
[dir="rtl"] .post-slider__prev { left: auto; right: 20px; }
[dir="rtl"] .post-slider__next { right: auto; left: 20px; }

/* ── Responsive portrait ── */
@media (max-width: 1024px) and (orientation: portrait) {
    .post-hero__slider {
        height: 260px;
        margin-top: 70px;
    }

    .post-slider__btn {
        width: 36px;
        height: 36px;
    }
}

/* ── Responsive landscape ── */
@media (max-width: 1024px) and (orientation: landscape) {
    .post-hero__slider {
        height: 360px;
    }
}

/* =============================================
   SINGLE POST — Related Articles
   rel- prefixed classes only
   Completely independent from news.css
   ============================================= */

/* ── Section wrapper ── */
.related-posts {
    background: #F0F4FA;
    padding: 60px 0 80px;
}

.related-title {
    font-size: 22px;
    font-weight: 800;
    color: #1D3557;
    margin: 0 0 32px;
}

/* ── Grid ── */
.rel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Card ── */
.rel-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(28, 53, 87, 0.07);
    box-shadow: 0 2px 12px rgba(28, 53, 87, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
}

.rel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(28, 53, 87, 0.12);
}

/* ── Card image ── */
.rel-card__img {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
    text-decoration: none;
}

.rel-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.rel-card__img:hover img {
    transform: scale(1.04);
}

/* ── Placeholder ── */
.rel-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3C78B4, #1D3557);
}

/* ── Category badge ── */
.rel-category {
    position: absolute;
    bottom: 10px;
    left: 12px;
    background: #3C78B4;
    color: #1D3557;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
}

[dir="rtl"] .rel-category {
    left: auto;
    right: 12px;
}

/* ── Card body ── */
.rel-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* ── Meta (date) ── */
.rel-meta {
    font-size: 11px;
    font-weight: 600;
    color: #3C78B4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Title ── */
.rel-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #1D3557;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rel-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.rel-card__title a:hover {
    color: #3C78B4;
}

/* ── Excerpt ── */
.rel-card__excerpt {
    font-size: 15px;
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ── Read more link ── */
.rel-btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #3C78B4;
    text-decoration: none;
    transition: gap 0.2s;
    margin-top: auto;
}

.rel-btn-link:hover {
    gap: 10px;
}

/* =============================================
   RTL
   ============================================= */

[dir="rtl"] .rel-card__title,
[dir="rtl"] .rel-card__excerpt {
    text-align: right;
}

/* =============================================
   RESPONSIVE — Portrait mobile
   ============================================= */

@media (max-width: 1024px) and (orientation: portrait) {
    .rel-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .rel-card {
        flex-direction: row;
        border-radius: 8px;
    }

    .rel-card__img {
        width: 120px;
        flex-shrink: 0;
        aspect-ratio: unset;
    }

    .rel-card__body {
        padding: 14px 16px;
    }

    .rel-card__title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .rel-card__excerpt {
        display: none;
    }
}

/* =============================================
   RESPONSIVE — Landscape mobile
   ============================================= */

@media (max-width: 1024px) and (orientation: landscape) {
    .rel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}


/* Responsive iframe/embed */
.post-content iframe {
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* ── Post video embed ── */
.post-hero__video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    margin-top: 90px;
}
.post-hero__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 1024px) and (orientation: portrait) {
    .post-hero__video {
        margin-top: 70px;
    }
}

/* Video slide inside slider */
.post-slide--video {
    background: #000;
}
.post-slide--video iframe {
    display: block;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    border: none;
}

/* Post meta bar — program & location */
.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
    margin-top: 6px;
}

.post-meta-bar__program,
.post-meta-bar__location {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    color: #1D3557;
}

.post-meta-bar__program a {
    color: #3c78b4;
    text-decoration: none;
    font-weight: 800;
    border-bottom: 1px solid #3C78B4;
}

.post-meta-bar__program a:hover {
    border-bottom-color: #1D3557;
}

.post-meta-bar__location {
    color: #1D3557;
}

/* Location links in post meta bar */
.post-meta-bar__loc-link {
    color: #1D3557;
    text-decoration: none;
    border-bottom: 1px solid #3C78B4;
}

.post-meta-bar__loc-link:hover {
    color: #3C78B4;
}

.post-meta-bar__sep {
    color: #6B7280;
    font-size: 12px;
}

/* ===========================
   PROGRAM RELATED NEWS
   =========================== */

.program-news {
    padding: 48px 0 24px;
    background: #F8FAFC;
}

.program-news__title {
    font-size: 22px;
    font-weight: 700;
    color: #1D3557;
    margin-bottom: 24px;
}

.program-news__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.program-news__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #E2EAF4;
    border-radius: 8px;
    padding: 18px 24px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.program-news__card:hover {
    border-color: #3C78B4;
    box-shadow: 0 2px 12px rgba(60, 120, 180, 0.1);
}

.program-news__card-body {
    flex: 1;
}

.program-news__date {
    font-size: 12px;
    color: #6B7280;
    display: block;
    margin-bottom: 6px;
}

.program-news__card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1D3557;
    margin: 0 0 6px;
    line-height: 1.4;
}

.program-news__excerpt {
    font-size: 13px;
    color: #6B7280;
    margin: 0;
    line-height: 1.5;
}

.program-news__arrow {
    flex-shrink: 0;
    margin-inline-start: 16px;
    color: #3C78B4;
}

@media (max-width: 768px) {
    .program-news__card {
        padding: 14px 16px;
    }
    .program-news__card-title {
        font-size: 14px;
    }
}

/* Load More button */
.program-news__more-wrap {
    text-align: center;
    margin-top: 20px;
}

.program-news__load-more {
    padding: 10px 28px;
    background: #3C78B4;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.program-news__load-more:hover {
    background: #2d5f8f;
}

.program-news__load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
