/*
Theme Name: SWERIA News
Theme URI: https://sweria.online
Author: SWERIA
Description: Arabic RTL news theme for SWERIA - القصة أعمق من الخبر
Version: 1.0.0
Text Domain: sweria-news
*/

:root {
    --sweria-deep: #073f32;
    --sweria-dark: #052f27;
    --sweria-green: #0b684f;
    --sweria-mid: #278263;
    --sweria-light: #dcebe3;
    --sweria-pale: #f2f7f3;
    --sweria-bg: #fafaf7;
    --sweria-white: #ffffff;
    --sweria-text: #151a18;
    --sweria-muted: #6c746f;
    --sweria-border: #e2e7e3;
    --sweria-red: #b52a2a;

    --container: 1240px;
    --radius: 5px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    direction: rtl;
    background: var(--sweria-bg);
    color: var(--sweria-text);
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sweria-container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

/* ===========================
   TOP BAR
=========================== */

.topbar {
    background: #f4f7f4;
    border-bottom: 1px solid var(--sweria-border);
    font-size: 13px;
    color: #4f5b55;
}

.topbar-inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-date {
    direction: rtl;
}

/* ===========================
   BRAND HEADER
=========================== */

.site-branding-area {
    background:
        radial-gradient(circle at 15% 50%, rgba(39,130,99,.08), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f5faf6 100%);
}

.branding-inner {
    min-height: 145px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
}

.brand-about {
    justify-self: start;
    max-width: 330px;
    font-size: 14px;
    color: var(--sweria-muted);
    line-height: 1.9;
}

.brand {
    text-align: center;
}

.brand-name {
    display: block;
    color: var(--sweria-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(45px, 5vw, 70px);
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
}

.brand-arabic {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    font-weight: 800;
    color: var(--sweria-deep);
}

.brand-tagline {
    display: block;
    margin-top: 4px;
    font-size: 17px;
    color: #1b3f34;
}

.brand-side {
    justify-self: end;
    text-align: left;
    font-size: 13px;
    color: var(--sweria-muted);
}

/* ===========================
   NAVIGATION
=========================== */

.main-nav {
    background: linear-gradient(90deg, var(--sweria-dark), var(--sweria-green));
    color: white;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-menu li {
    margin: 0;
}

.main-menu a {
    display: block;
    color: white;
    padding: 15px 22px;
    font-size: 15px;
    transition: background .2s ease;
}

.main-menu a:hover,
.main-menu .current-menu-item > a {
    background: rgba(255,255,255,.12);
}

.mobile-menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: white;
    font-size: 28px;
    cursor: pointer;
}

/* ===========================
   MAIN LAYOUT
=========================== */

.home-main {
    padding: 14px 0 50px;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr);
    gap: 24px;
    direction: ltr;
}

.hero-layout > * {
    direction: rtl;
}

/* ===========================
   HERO
=========================== */

.hero-story {
    min-height: 470px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--sweria-dark);
}

.hero-story img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.25) 65%, rgba(0,0,0,.05) 100%);
}

.hero-content {
    position: absolute;
    right: 0;
    left: 0;
    bottom: 0;
    padding: 42px;
    color: white;
    max-width: 850px;
}

.category-badge {
    display: inline-block;
    background: var(--sweria-green);
    color: white;
    padding: 4px 14px;
    border-radius: 3px;
    font-size: 13px;
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(29px, 3.2vw, 47px);
    line-height: 1.35;
    margin: 0 0 12px;
    font-weight: 800;
}

.hero-excerpt {
    font-size: 16px;
    line-height: 1.9;
    margin: 0 0 20px;
    max-width: 700px;
    color: rgba(255,255,255,.92);
}

.read-more {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.8);
    color: white;
    padding: 8px 22px;
    border-radius: 3px;
    transition: .2s ease;
}

.read-more:hover {
    background: white;
    color: var(--sweria-deep);
}

/* ===========================
   LATEST SIDEBAR
=========================== */

.latest-panel {
    background: white;
    border: 1px solid var(--sweria-border);
    border-radius: var(--radius);
    padding: 20px;
}

.panel-title {
    margin: 0 0 15px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--sweria-green);
    font-size: 23px;
}

.latest-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--sweria-border);
}

.latest-item:last-child {
    border-bottom: 0;
}

.latest-thumb {
    width: 70px;
    height: 55px;
    object-fit: cover;
    border-radius: 3px;
    background: var(--sweria-light);
}

.latest-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 700;
}

.latest-time {
    color: var(--sweria-muted);
    font-size: 11px;
    margin-top: 4px;
}

/* ===========================
   SECTION TITLES
=========================== */

.news-section {
    margin-top: 42px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0;
    font-size: 27px;
    line-height: 1.3;
    padding-right: 13px;
    border-right: 4px solid var(--sweria-green);
}

.section-link {
    color: var(--sweria-green);
    font-size: 14px;
    font-weight: 700;
}

/* ===========================
   NEWS GRID
=========================== */

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

.news-card {
    background: white;
    border: 1px solid var(--sweria-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
}

.card-image-wrap {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--sweria-light);
    overflow: hidden;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

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

.card-category {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: var(--sweria-green);
    color: white;
    padding: 3px 10px;
    font-size: 12px;
}

.card-content {
    padding: 16px;
}

.card-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.6;
}

.card-meta {
    font-size: 12px;
    color: var(--sweria-muted);
}

/* ===========================
   TWO CATEGORY COLUMNS
=========================== */

.category-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-top: 42px;
}

.category-feature {
    background: white;
    border: 1px solid var(--sweria-border);
}

.category-feature img {
    width: 100%;
    aspect-ratio: 16/8;
    object-fit: cover;
}

.category-feature-content {
    padding: 18px;
}

.category-feature h3 {
    margin: 0;
    font-size: 21px;
    line-height: 1.55;
}

/* ===========================
   STORY CTA
=========================== */

.story-cta {
    margin-top: 48px;
    background:
        radial-gradient(circle at 10% 50%, rgba(255,255,255,.10), transparent 30%),
        linear-gradient(120deg, #0a392e, #17694f);
    color: white;
    border-radius: var(--radius);
    overflow: hidden;
}

.story-cta-inner {
    padding: 55px 60px;
    max-width: 800px;
}

.story-cta h2 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 49px);
}

.story-cta p {
    margin: 0;
    font-size: 18px;
    color: rgba(255,255,255,.88);
}

/* ===========================
   ARTICLE
=========================== */

.article-wrap {
    max-width: 850px;
    margin: 45px auto;
    background: white;
    padding: 40px;
}

.article-title {
    font-size: clamp(32px, 5vw, 50px);
    line-height: 1.35;
}

.article-content {
    font-size: 18px;
    line-height: 2;
}

.article-content img {
    margin: 25px auto;
}

/* ===========================
   ARCHIVE
=========================== */

.archive-header {
    padding: 45px 0 20px;
}

.archive-title {
    font-size: 38px;
}

/* ===========================
   FOOTER
=========================== */

.site-footer {
    margin-top: 40px;
    background: linear-gradient(100deg, #032d24, #07503e);
    color: white;
}

.footer-inner {
    padding: 45px 0;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
}

.footer-brand {
    font-family: Georgia, serif;
    font-size: 36px;
    font-weight: 700;
}

.footer-tagline {
    color: rgba(255,255,255,.75);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-content: center;
}

.footer-links a {
    color: rgba(255,255,255,.88);
}

.copyright {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 17px 0;
    font-size: 13px;
    color: rgba(255,255,255,.65);
}

/* ===========================
   PLACEHOLDER
=========================== */

.no-image {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, #dfece5, #b9d2c5);
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 1000px) {

    .branding-inner {
        grid-template-columns: 1fr;
        padding: 25px 0;
    }

    .brand-about,
    .brand-side {
        display: none;
    }

    .hero-layout {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-menu a {
        padding: 14px 11px;
        font-size: 13px;
    }
}

@media (max-width: 700px) {

    .sweria-container {
        width: min(calc(100% - 24px), var(--container));
    }

    .topbar {
        display: none;
    }

    .branding-inner {
        min-height: auto;
    }

    .brand-name {
        font-size: 43px;
    }

    .brand-arabic {
        font-size: 21px;
    }

    .brand-tagline {
        font-size: 14px;
    }

    .nav-inner {
        min-height: 52px;
        justify-content: space-between;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-menu {
        display: none;
        position: absolute;
        top: 52px;
        right: 0;
        left: 0;
        background: var(--sweria-deep);
        flex-direction: column;
        align-items: stretch;
    }

    .main-menu.open {
        display: flex;
    }

    .main-menu a {
        padding: 13px 20px;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .hero-story {
        min-height: 430px;
    }

    .hero-content {
        padding: 25px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-excerpt {
        font-size: 14px;
    }

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

    .story-cta-inner {
        padding: 38px 25px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .article-wrap {
        padding: 20px;
        margin: 20px auto;
    }
}


/* =====================================================
   SWERIA NEWS TICKER
===================================================== */

.news-ticker {
    background: #ffffff;
    border-bottom: 1px solid var(--sweria-border);
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}

.ticker-inner {
    height: 48px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.ticker-label {
    position: relative;
    z-index: 5;

    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 0 20px;

    background: var(--sweria-deep);
    color: #fff;

    font-size: 14px;
    font-weight: 700;

    white-space: nowrap;
}

.ticker-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;

    animation: tickerPulse 1.4s infinite;
}

.ticker-window {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

/*
 * RTL ticker:
 * content moves continuously from left to right.
 */

.ticker-track {
    display: flex;
    align-items: center;

    width: max-content;
    white-space: nowrap;

    animation: sweriaTicker 35s linear infinite;
}

.ticker-window:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 0 20px;

    color: var(--sweria-text);
    font-size: 14px;
    font-weight: 600;
}

.ticker-item:hover .ticker-title {
    color: var(--sweria-green);
}

.ticker-time {
    color: var(--sweria-green);
    font-size: 12px;
    font-weight: 700;
}

.ticker-separator {
    color: var(--sweria-green);
    opacity: .55;
}


/* حركة الشريط */

@keyframes sweriaTicker {

    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }

}


/* النبضة بجانب آخر الأخبار */

@keyframes tickerPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .3;
    }

}


/* Mobile */

@media (max-width: 700px) {

    .ticker-inner {
        width: 100%;
        height: 44px;
    }

    .ticker-label {
        padding: 0 12px;
        font-size: 12px;
    }

    .ticker-item {
        font-size: 13px;
        padding: 0 14px;
    }

    .ticker-time {
        font-size: 11px;
    }

}
/* =====================================================
   SWERIA NEWS TICKER - FINAL DESIGN
===================================================== */

.news-ticker {
    background: linear-gradient(
        90deg,
        #073f32 0%,
        #0b684f 55%,
        #073f32 100%
    );
    border-top: 3px solid #ffffff;
    border-bottom: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    color: #ffffff;
}

.ticker-inner {
    height: 54px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

/* آخر الأخبار */

.ticker-label {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 0 28px;

    background: #073f32;
    color: #ffffff;

    font-size: 18px;
    font-weight: 800;

    white-space: nowrap;

    border-left: 3px solid rgba(255,255,255,.9);

    position: relative;
    z-index: 10;
}

/* النقطة بجانب آخر الأخبار */

.ticker-dot {
    width: 9px;
    height: 9px;

    background: #ffffff;
    border-radius: 50%;

    box-shadow: 0 0 0 4px rgba(255,255,255,.12);

    animation: tickerPulse 1.3s infinite;
}

/* المنطقة المتحركة */

.ticker-window {
    flex: 1;
    overflow: hidden;
    position: relative;

    display: flex;
    align-items: center;
}

/* النص المتحرك */

.ticker-track {
    display: flex;
    align-items: center;

    width: max-content;
    white-space: nowrap;

    color: #ffffff;

    animation: sweriaTicker 35s linear infinite;
}

/* كل خبر */

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 0 18px;

    color: #ffffff !important;

    font-size: 15px;
    font-weight: 700;

    transition: opacity .2s ease;
}

.ticker-item:hover {
    color: #ffffff !important;
    opacity: .75;
}

/* عنوان الخبر */

.ticker-title {
    color: #ffffff !important;
}

/* الوقت */

.ticker-time {
    display: inline-flex;
    align-items: center;

    background: #278263;
    color: #ffffff;

    padding: 2px 8px;

    border-radius: 4px;

    font-size: 12px;
    font-weight: 800;

    line-height: 1.6;
}

/* الفاصل بين الأخبار */

.ticker-separator {
    color: rgba(255,255,255,.85);

    font-size: 18px;
    font-weight: 300;
}

/* وقف الحركة عند وضع الماوس */

.ticker-window:hover .ticker-track {
    animation-play-state: paused;
}

/* الحركة */

@keyframes sweriaTicker {

    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(100%);
    }
}

/* نبضة النقطة */

@keyframes tickerPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .45;
        transform: scale(.75);
    }
}


/* ==========================
   MOBILE
========================== */

@media (max-width: 700px) {

    .ticker-inner {
        height: 46px;
    }

    .ticker-label {
        padding: 0 13px;
        font-size: 13px;
        border-left-width: 2px;
    }

    .ticker-dot {
        width: 7px;
        height: 7px;
    }

    .ticker-item {
        font-size: 13px;
        padding: 0 12px;
        gap: 7px;
    }

    .ticker-time {
        font-size: 10px;
        padding: 1px 5px;
    }

    .ticker-separator {
        font-size: 14px;
    }
}
