/* ==========================================================================
   Hero News Slider Styles
   ========================================================================== */

/* -------------------------------------------------------------------------
   Main Container
   ------------------------------------------------------------------------- */
.hero-news-slider {
    position: relative;
    margin-bottom: 2rem;
    overflow: hidden;
    background: #090d16;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.hero-news-slider:last-child {
    margin-bottom: 0;
}

.hero-news-swiper {
    width: 100%;
    height: 390px;
    position: relative;
    border-radius: inherit;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
    display: block;
}

.hero-news-swiper > .swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.hero-news-swiper > .swiper-wrapper > .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform, opacity;
    display: block;
}

/* -------------------------------------------------------------------------
   Slide
   ------------------------------------------------------------------------- */
.hero-slide {
    position: relative;
    overflow: hidden;
}

/* Background image */
.hero-slide__image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide__image > img,
.hero-slide__image .hero-slide__cover-img,
.hero-slide__image video.hero-bg-video,
.hero-slide__image iframe.hero-bg-embed {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    border: none;
    pointer-events: none;
}

.hero-slide__image > img,
.hero-slide__image .hero-slide__cover-img {
    transition: transform 6s ease-out;
    z-index: 2;
    will-change: transform;
}

.swiper-slide-active .hero-slide__image > img,
.swiper-slide-active .hero-slide__image .hero-slide__cover-img {
    transform: translate(-50%, -50%) scale(1.04);
}

/* Placeholder background when slide has no image */
.hero-slide__placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 75% 30%, rgba(30, 58, 138, 0.35) 0%, transparent 60%),
                radial-gradient(circle at 20% 80%, rgba(13, 110, 253, 0.25) 0%, transparent 50%),
                linear-gradient(135deg, #090d16 0%, #111827 50%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.hero-slide__placeholder-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.5;
}

.hero-slide__placeholder-logo {
    position: absolute;
    left: 50%;
    top: 35%;
    transform: translate(-50%, -50%);
    max-width: min(220px, 45vw);
    max-height: 68px;
    object-fit: contain;
    opacity: 0.40;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
}

.hero-slide__placeholder-symbol {
    position: absolute;
    left: 50%;
    top: 35%;
    transform: translate(-50%, -50%);
    width: 84px;
    height: 84px;
    max-width: 25vw;
    max-height: 25%;
    object-fit: contain;
    opacity: 0.40;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5));
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
}

.hero-slide__image.has-failed-image > img,
.hero-slide__image.has-failed-image .hero-slide__cover-img {
    display: none !important;
}

/* Gradient overlay */
.hero-slide__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to top,
        rgba(9, 13, 22, 0.95) 0%,
        rgba(9, 13, 22, 0.65) 45%,
        rgba(9, 13, 22, 0.20) 75%,
        rgba(9, 13, 22, 0.05) 100%
    );
}

/* -------------------------------------------------------------------------
   Floating Top Elements (Category & Timestamp)
   ------------------------------------------------------------------------- */
.hero-slide__floating-top {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    right: 5.5rem;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    pointer-events: none;
}

.hero-slide__floating-top > * {
    pointer-events: auto;
}

/* Category badge */
.hero-slide__category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.35rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #ffffff;
    background: #0a58ca;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(10, 88, 202, 0.35);
    font-family: var(--bs-font-sans-serif);
}

.hero-slide__category:hover,
.hero-slide__category:focus-visible {
    background: #084298;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 88, 202, 0.45);
}

.hero-slide__timestamp {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    padding: 0.35rem 0.8rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    font-family: var(--bs-font-sans-serif);
}

.hero-slide__timestamp i {
    font-size: 0.72rem;
    line-height: 1;
}

/* -------------------------------------------------------------------------
   Fixed Navigation Controls
   ------------------------------------------------------------------------- */
.hero-slider__controls,
.hero-slider__controls--fixed {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    pointer-events: auto;
}

.hero-news-swiper-button-prev,
.hero-news-swiper-button-next {
    position: static;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-news-swiper-button-prev:hover,
.hero-news-swiper-button-next:hover {
    background: var(--akm-primary, #0d6efd);
    border-color: var(--akm-primary, #0d6efd);
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

/* -------------------------------------------------------------------------
   Content Layer
   ------------------------------------------------------------------------- */
.hero-slide__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 800px;
    opacity: 1;
    transform: translateY(0);
}

/* Title */
.hero-slide__title {
    font-family: var(--bs-font-serif, 'Literata', Georgia, serif);
    font-size: clamp(1.2rem, 2.2vw + 0.55rem, 1.85rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    text-wrap: balance;
    overflow-wrap: break-word;
}

.hero-slide__title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-slide__title a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.hero-slide__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.hero-slide__body--publication,
.hero-slide__body--news {
    width: 100%;
}

.hero-slide__publication-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
}

/* Meta & Author */
.hero-slide__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--bs-font-sans-serif);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
}

.hero-slide__author {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.25rem 0.75rem 0.25rem 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-slide__author-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero-slide__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
}

.hero-slide__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide__avatar-initials {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--bs-font-sans-serif);
}

.hero-slide__author-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* -------------------------------------------------------------------------
   Pagination Dots
   ------------------------------------------------------------------------- */
.hero-news-swiper-pagination {
    display: none !important;
}

/* -------------------------------------------------------------------------
   Responsive — Tablet
   ------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .hero-news-slider {
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }

    .hero-news-swiper {
        height: 380px;
    }

    .hero-slide__content {
        padding: 1.75rem;
    }

    .hero-slide__placeholder-symbol {
        width: 68px;
        height: 68px;
        top: 32%;
        opacity: 0.35;
    }

    .hero-slide__placeholder-logo {
        max-width: 170px;
        max-height: 52px;
        top: 32%;
        opacity: 0.35;
    }
}

/* -------------------------------------------------------------------------
   Responsive — Mobile
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .hero-news-slider {
        border-radius: 14px;
        margin-bottom: 1.25rem;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    }

    .hero-news-swiper {
        height: 350px;
    }

    .hero-slide__floating-top {
        top: 0.75rem;
        left: 0.75rem;
        right: 4.8rem;
        gap: 0.4rem;
    }

    .hero-slider__controls,
    .hero-slider__controls--fixed {
        top: 0.75rem;
        right: 0.75rem;
        gap: 0.35rem;
    }

    .hero-news-swiper-button-prev,
    .hero-news-swiper-button-next {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        font-size: 1rem;
    }

    .hero-slide__content {
        padding: 1.25rem;
        gap: 0.5rem;
    }

    .hero-slide__category {
        font-size: 0.72rem;
        padding: 0.3rem 0.75rem;
    }

    .hero-slide__timestamp {
        font-size: 0.72rem;
        padding: 0.3rem 0.75rem;
    }

    .hero-slide__placeholder-symbol {
        width: 56px;
        height: 56px;
        top: 28%;
        opacity: 0.28;
    }

    .hero-slide__placeholder-logo {
        max-width: 140px;
        max-height: 42px;
        top: 28%;
        opacity: 0.28;
    }

    .hero-slide__title {
        font-size: 1.2rem;
        line-height: 1.25;
    }
}

/* -------------------------------------------------------------------------
   Responsive — Small Mobile
   ------------------------------------------------------------------------- */
@media (max-width: 575px) {
    .hero-news-swiper {
        height: 330px;
    }

    .hero-slide__content {
        padding: 1rem;
    }

    .hero-slide__title {
        font-size: 1.1rem;
    }
}

/* -------------------------------------------------------------------------
   RTL Support (for Kurdish Sorani / Arabic)
   ------------------------------------------------------------------------- */
[dir="rtl"] .hero-slide__floating-top {
    left: 4.8rem;
    right: 0.75rem;
}

[dir="rtl"] .hero-slider__controls,
[dir="rtl"] .hero-slider__controls--fixed {
    left: 0.75rem;
    right: auto;
}

[dir="rtl"] .hero-slide__content {
    left: auto;
    right: 0;
}

/* -------------------------------------------------------------------------
   Print
   ------------------------------------------------------------------------- */
@media print {
    .hero-news-slider {
        display: none;
    }
}

.hero-slide__hitbox {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hero-slide__content {
    z-index: 3;
}

.hero-slide__content a,
.hero-slider__thumb {
    position: relative;
    z-index: 4;
}

@media (min-width: 768px) {
    .hero-news-slider {
        margin-bottom: 0;
        border-radius: 18px;
    }
}

@media (min-width: 992px) {
    #hero-primary #heroNewsSlider {
        margin-left: -14px;
        width: calc(100% + 14px);
    }
}
