/*=============== MEDIA & NEWS PAGE STYLES ===============*/

/*=============== HERO SECTION ===============*/
.news-hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--first-color-lighten) 0%, var(--body-color) 100%);
    position: relative;
    overflow: hidden;
}

    .news-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(0,0,0,0.02)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
        opacity: 0.5;
    }

.news-hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.news-hero__subtitle {
    display: inline-block;
    background: #efc1a9;
    color: #fff;
    padding: 0.5rem 1.5rem;
    border-radius: 2rem;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
    margin-bottom: 1rem;
}

.news-hero__title {
    font-size: var(--biggest-font-size);
    color: var(--title-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.news-hero__description {
    font-size: var(--h3-font-size);
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.news-hero__image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .news-hero__image img {
        width: 100%;
        max-width: 500px;
        border-radius: 1rem;
        animation: float 3s ease-in-out infinite;
    }

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/*=============== FILTER TABS ===============*/
.news-filter {
    padding: 2rem 0;
    background: var(--body-color);
    /* position: sticky; */
    top: var(--header-height);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-filter__tabs {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.news-filter__tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--container-color);
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-color);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .news-filter__tab:hover {
        background: var(--first-color-lighten);
        border-color: #efc1a9;
        color: #efc1a9;
        transform: translateY(-2px);
    }

    .news-filter__tab.active {
        background: #efc1a9;
        border-color: #efc1a9;
        color: #fff;
    }

    .news-filter__tab i {
        font-size: 1.25rem;
    }

/*=============== NEWS GRID ===============*/
.news-grid {
    padding: 4rem 0;
}

.news-grid__container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/*=============== NEWS CARD ===============*/
.news-card {
    background: var(--container-color);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

    .news-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    }

    .news-card.featured {
        grid-column: span 2;
        grid-row: span 2;
    }

        .news-card.featured .news-card__image {
            height: 400px;
        }

        .news-card.featured .news-card__title {
            font-size: var(--h2-font-size);
        }

.news-card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #efc1a9;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: var(--small-font-size);
    font-weight: var(--font-semi-bold);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .news-card__badge.award {
        background: linear-gradient(135deg, #FFD700, #FFA500);
    }

.news-card__image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

    .news-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

.news-card:hover .news-card__image img {
    transform: scale(1.1);
}

.news-card__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card__meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.news-card__date,
.news-card__category {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.news-card__category {
    color: #efc1a9;
    font-weight: var(--font-medium);
}

.news-card__title {
    font-size: var(--h3-font-size);
    color: var(--title-color);
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-card:hover .news-card__title {
    color: #efc1a9;
}

.news-card__description {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.news-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #efc1a9;
    font-weight: var(--font-semi-bold);
    transition: gap 0.3s ease;
}

    .news-card__link:hover {
        gap: 1rem;
    }

    .news-card__link i {
        font-size: 1.25rem;
    }

/*=============== LOAD MORE ===============*/
.news-grid__load-more {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

    .news-grid__load-more .button {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 2rem;
    }

/*=============== RESPONSIVE ===============*/
@media screen and (max-width: 1023px) {
    .news-hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .news-hero__image {
        order: -1;
    }

    .news-card.featured {
        grid-column: span 1;
        grid-row: span 1;
    }

        .news-card.featured .news-card__image {
            height: 250px;
        }

    .newsletter__container {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .newsletter__form {
        flex-direction: column;
    }
}

@media screen and (max-width: 768px) {
    .news-hero {
        padding: 6rem 0 3rem;
    }

    .news-hero__title {
        font-size: var(--h1-font-size);
    }

    .news-grid__container {
        grid-template-columns: 1fr;
    }

    .news-filter__tabs {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }

    .news-filter__tab {
        flex-shrink: 0;
    }
}

/*=============== DARK THEME ===============*/
body.dark-theme .news-hero {
    background: linear-gradient(135deg, var(--first-color-alt) 0%, var(--body-color) 100%);
}

body.dark-theme .news-card {
    background: var(--container-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-theme .news-filter {
    background: var(--body-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

body.dark-theme .newsletter__container {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

/*=============== RTL SUPPORT ===============*/
body.rtl .news-card__badge {
    right: auto;
    left: 1rem;
}

body.rtl .news-card__link {
    flex-direction: row-reverse;
}

body.rtl .news-filter__tab {
    flex-direction: row-reverse;
}

/*=============== ENHANCED ARABIC MOBILE NEWS STYLES ===============*/
@media screen and (max-width: 1023px) {
    body.rtl .news-hero,
    body[dir="rtl"] .news-hero {
        direction: rtl;
        text-align: center;
    }

    body.rtl .news-hero__container,
    body[dir="rtl"] .news-hero__container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    body.rtl .news-hero__content,
    body[dir="rtl"] .news-hero__content {
        text-align: center;
    }

    body.rtl .news-hero__title,
    body[dir="rtl"] .news-hero__title {
        font-size: 2rem;
        text-align: center;
        line-height: 1.4;
    }

    body.rtl .news-hero__description,
    body[dir="rtl"] .news-hero__description {
        text-align: center;
        font-size: 1rem;
        line-height: 1.7;
    }

    /* بطاقات الأخبار */
    body.rtl .news-grid__container,
    body[dir="rtl"] .news-grid__container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    body.rtl .news-card,
    body[dir="rtl"] .news-card {
        direction: rtl;
        text-align: right;
    }

    body.rtl .news-card__content,
    body[dir="rtl"] .news-card__content {
        padding: 1.5rem;
        text-align: right;
    }

    body.rtl .news-card__meta,
    body[dir="rtl"] .news-card__meta {
        display: flex;
        flex-direction: row-reverse;
        justify-content: flex-start;
        gap: 1.5rem;
    }

    body.rtl .news-card__date,
    body.rtl .news-card__category,
    body[dir="rtl"] .news-card__date,
    body[dir="rtl"] .news-card__category {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        gap: 0.25rem;
    }

    body.rtl .news-card__title,
    body[dir="rtl"] .news-card__title {
        text-align: right;
        font-size: 1.25rem;
        line-height: 1.5;
    }

    body.rtl .news-card__description,
    body[dir="rtl"] .news-card__description {
        text-align: right;
        line-height: 1.7;
    }

    body.rtl .news-card__link,
    body[dir="rtl"] .news-card__link {
        flex-direction: row-reverse;
        justify-content: flex-start;
    }

    body.rtl .news-card__link i,
    body[dir="rtl"] .news-card__link i {
        transform: scaleX(-1);
    }

    /* فلتر الأخبار */
    body.rtl .news-filter__tabs,
    body[dir="rtl"] .news-filter__tabs {
        direction: rtl;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    body.rtl .news-filter__tab,
    body[dir="rtl"] .news-filter__tab {
        flex-direction: row-reverse;
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .news-hero,
    body[dir="rtl"] .news-hero {
        padding: 5rem 0 2.5rem;
    }

    body.rtl .news-hero__title,
    body[dir="rtl"] .news-hero__title {
        font-size: 1.75rem;
    }

    body.rtl .news-hero__description,
    body[dir="rtl"] .news-hero__description {
        font-size: 0.938rem;
    }

    body.rtl .news-card__content,
    body[dir="rtl"] .news-card__content {
        padding: 1.25rem;
    }

    body.rtl .news-card__title,
    body[dir="rtl"] .news-card__title {
        font-size: 1.125rem;
    }

    body.rtl .news-card__description,
    body[dir="rtl"] .news-card__description {
        font-size: 0.875rem;
    }

    body.rtl .news-filter__tab,
    body[dir="rtl"] .news-filter__tab {
        padding: 0.5rem 1rem;
        font-size: 0.813rem;
    }
}

@media screen and (max-width: 400px) {
    body.rtl .news-hero__title,
    body[dir="rtl"] .news-hero__title {
        font-size: 1.5rem;
    }

    body.rtl .news-hero__description,
    body[dir="rtl"] .news-hero__description {
        font-size: 0.875rem;
    }

    body.rtl .news-card__content,
    body[dir="rtl"] .news-card__content {
        padding: 1rem;
    }

    body.rtl .news-card__title,
    body[dir="rtl"] .news-card__title {
        font-size: 1rem;
    }

    body.rtl .news-card__description,
    body[dir="rtl"] .news-card__description {
        font-size: 0.813rem;
    }

    body.rtl .news-card__meta,
    body[dir="rtl"] .news-card__meta {
        gap: 1rem;
    }

    body.rtl .news-filter__tab,
    body[dir="rtl"] .news-filter__tab {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
}

/*=============== NEWS SLIDER MOBILE RTL (HOME PAGE) ===============*/
@media screen and (max-width: 1023px) {
    body.rtl .news-slider,
    body[dir="rtl"] .news-slider {
        direction: rtl;
    }

    body.rtl .news-slide,
    body[dir="rtl"] .news-slide {
        display: flex;
        flex-direction: column;
    }

    body.rtl .news-slide__image,
    body[dir="rtl"] .news-slide__image {
        order: 1;
        width: 100%;
        height: 220px;
        border-radius: 1rem 1rem 0 0;
        overflow: hidden;
    }

    body.rtl .news-slide__image img,
    body[dir="rtl"] .news-slide__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    body.rtl .news-slide__content,
    body[dir="rtl"] .news-slide__content {
        order: 2;
        padding: 1.5rem;
        text-align: right;
    }

    body.rtl .news-slide__meta,
    body[dir="rtl"] .news-slide__meta {
        display: flex;
        flex-direction: row-reverse;
        justify-content: flex-start;
        gap: 1.5rem;
        margin-bottom: 1rem;
    }

    body.rtl .news-slide__date,
    body.rtl .news-slide__category,
    body[dir="rtl"] .news-slide__date,
    body[dir="rtl"] .news-slide__category {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.875rem;
    }

    body.rtl .news-slide__title,
    body[dir="rtl"] .news-slide__title {
        font-size: 1.25rem;
        text-align: right;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    body.rtl .news-slide__description,
    body[dir="rtl"] .news-slide__description {
        font-size: 0.938rem;
        text-align: right;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }

    body.rtl .news-slider__view-all,
    body[dir="rtl"] .news-slider__view-all {
        display: flex;
        justify-content: flex-start;
    }

    body.rtl .news-slider__view-all .button,
    body[dir="rtl"] .news-slider__view-all .button {
        flex-direction: row-reverse;
    }

    body.rtl .news-slide__badge,
    body[dir="rtl"] .news-slide__badge {
        left: auto;
        right: 1rem;
    }

    /* أسهم السلايدر - إظهار كلا السهمين */
    body.rtl .news-slider__arrow,
    body.rtl .news-slider__arrow--left,
    body.rtl .news-slider__arrow--right,
    body[dir="rtl"] .news-slider__arrow,
    body[dir="rtl"] .news-slider__arrow--left,
    body[dir="rtl"] .news-slider__arrow--right {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 44px;
        height: 44px;
    }

    body.rtl .news-slider__arrow--left,
    body[dir="rtl"] .news-slider__arrow--left {
        left: auto !important;
        right: 10px !important;
    }

    body.rtl .news-slider__arrow--right,
    body[dir="rtl"] .news-slider__arrow--right {
        right: auto !important;
        left: 10px !important;
    }
}

@media screen and (max-width: 576px) {
    body.rtl .news-slide__image,
    body[dir="rtl"] .news-slide__image {
        height: 180px;
    }

    body.rtl .news-slide__content,
    body[dir="rtl"] .news-slide__content {
        padding: 1.25rem;
    }

    body.rtl .news-slide__title,
    body[dir="rtl"] .news-slide__title {
        font-size: 1.125rem;
    }

    body.rtl .news-slide__description,
    body[dir="rtl"] .news-slide__description {
        font-size: 0.875rem;
    }

    body.rtl .news-slider__arrow,
    body.rtl .news-slider__arrow--left,
    body.rtl .news-slider__arrow--right,
    body[dir="rtl"] .news-slider__arrow,
    body[dir="rtl"] .news-slider__arrow--left,
    body[dir="rtl"] .news-slider__arrow--right {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 40px;
        height: 40px;
    }

    body.rtl .news-slider__arrow--left,
    body[dir="rtl"] .news-slider__arrow--left {
        left: auto !important;
        right: 8px !important;
    }

    body.rtl .news-slider__arrow--right,
    body[dir="rtl"] .news-slider__arrow--right {
        right: auto !important;
        left: 8px !important;
    }
}

@media screen and (max-width: 400px) {
    body.rtl .news-slide__image,
    body[dir="rtl"] .news-slide__image {
        height: 160px;
    }

    body.rtl .news-slide__title,
    body[dir="rtl"] .news-slide__title {
        font-size: 1rem;
    }

    body.rtl .news-slide__description,
    body[dir="rtl"] .news-slide__description {
        font-size: 0.813rem;
    }

    body.rtl .news-slider__arrow,
    body.rtl .news-slider__arrow--left,
    body.rtl .news-slider__arrow--right,
    body[dir="rtl"] .news-slider__arrow,
    body[dir="rtl"] .news-slider__arrow--left,
    body[dir="rtl"] .news-slider__arrow--right {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 36px;
        height: 36px;
    }

    body.rtl .news-slider__arrow--left,
    body[dir="rtl"] .news-slider__arrow--left {
        left: auto !important;
        right: 5px !important;
    }

    body.rtl .news-slider__arrow--right,
    body[dir="rtl"] .news-slider__arrow--right {
        right: auto !important;
        left: 5px !important;
    }
}
