@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
    /* Main Colors */
    --primary-color: #7b2cbf; /* Purple */
    --topbar-color: #5a189a; /* Darker Purple */
    --bg-color: #f4f6f8;
    --white: #ffffff;
    --text-main: #333333;
    --text-muted: #888888;
    --border-color: #e0e0e0;

    /* Category Colors */
    --cat-economy: #e53935; /* Red */
    --cat-technology: #1e88e5; /* Blue */
    --cat-health: #00897b; /* Teal */
    --cat-news: #3949ab; /* Dark Blue */
    --cat-sports: #8e24aa; /* Purple */
    --cat-videos: #212121; /* Dark */

    /* Typography */
    --font-family: 'Tajawal', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

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

/* Container */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- TOP BAR --- */
.top-bar {
    background-color: var(--topbar-color);
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    padding: 6px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-social {
    display: flex;
    gap: 15px;
}

.top-bar-social a:hover {
    color: var(--white);
}

/* --- MAIN HEADER --- */
.main-header {
    background-color: var(--primary-color);
    color: var(--white);
}

.logo-area {
    padding: 25px 0;
}

.logo {
    font-size: 48px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 1px;
}

.nav-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a {
    font-size: 15px;
    font-weight: 700;
    position: relative;
    padding: 5px 0;
}

.main-nav a:hover {
    color: #e0e0e0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.icon-btn:hover {
    transform: scale(1.1);
}

/* --- TICKER BAR --- */
.ticker-bar {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.ticker-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticker-text {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    flex-grow: 1;
}

.ticker-label {
    color: var(--primary-color);
    font-weight: 800;
}

.ticker-content {
    color: var(--text-muted);
}

.subscribe-form {
    display: flex;
    align-items: center;
}

.subscribe-form input {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-left: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    border-radius: 0 3px 3px 0;
    width: 200px;
}

.subscribe-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 7px 20px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px 0 0 3px;
    transition: background-color 0.3s;
}

.subscribe-form button:hover {
    background-color: var(--topbar-color);
}

/* --- HERO SECTION --- */
.hero-section {
    margin-top: 15px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3px;
}

.hero-post {
    position: relative;
    display: block;
    overflow: hidden;
    height: 100%;
}

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

.hero-post:hover img {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px 20px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
}

.hero-main .hero-post {
    height: 450px;
}

.hero-side {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hero-side .hero-post {
    height: calc((450px - 3px) / 2);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.category-badge {
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--white);
    border-radius: 2px;
}

/* Category Colors Classes */
.cat-health { background-color: var(--cat-health); }
.cat-sports { background-color: var(--cat-sports); }
.cat-economy { background-color: var(--cat-economy); }
.cat-tech { background-color: var(--cat-technology); }
.cat-news { background-color: var(--cat-news); }

.post-date {
    font-size: 11px;
    color: #e0e0e0;
}

.hero-overlay h2 {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    margin-top: 5px;
}

.hero-side .hero-overlay h2 {
    font-size: 16px;
}

/* --- SECTION BLOCKS --- */
.mt-30 {
    margin-top: 30px;
}

.section-block {
    background-color: var(--white);
    padding: 20px;
    border-radius: 2px;
    border-top: 2px solid transparent; /* default */
}

/* Section Colors based on category */
.color-economy.section-header { border-top-color: var(--cat-economy); }
.color-news.section-header { border-top-color: var(--cat-news); }

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    padding-left: 15px;
}

.color-economy .section-title { color: var(--cat-economy); }
.color-news .section-title { color: var(--cat-news); }

.section-line {
    flex-grow: 1;
    height: 1px;
    background-color: var(--border-color);
}

.section-more {
    color: var(--text-muted);
    font-size: 14px;
    padding-right: 15px;
}

.section-content {
    display: flex;
    gap: 20px;
}

.layout-right-main .main-post,
.layout-left-main .main-post {
    width: 50%;
}

.economy-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1.3fr;
}

.eco-large {
    padding-left: 15px;
    border-left: 1px solid #eaeaea;
}

.eco-large .post-card-large img {
    height: 300px;
    margin-bottom: 15px;
    border-radius: 3px;
}

.eco-col {
    display: flex;
    flex-direction: column;
    padding: 0 15px;
    border-left: 1px solid #eaeaea;
    justify-content: flex-start;
}

.eco-list {
    padding-right: 15px;
}

.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }

.list-item-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed #eaeaea;
    flex-direction: row-reverse;
}

.list-item-card.border-0 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.list-item-card img {
    width: 75px;
    height: 55px;
    object-fit: cover;
    border-radius: 3px;
}

.list-item-card .post-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-main);
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
}

.news-col {
    display: flex;
    flex-direction: column;
}

.post-card-large {
    display: block;
}

.post-card-large img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    margin-bottom: 15px;
}

.post-card-large .post-title {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--text-main);
    line-height: 1.4;
}

.post-card-large .post-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.8;
}

.post-card-small {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex-direction: row-reverse;
    margin-bottom: 20px;
}

.post-card-small img {
    width: 85px;
    height: 65px;
    object-fit: cover;
    border-radius: 3px;
}

.post-card-small .post-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--text-main);
}

/* For News Section (Image Top) */
.post-card-small.image-top {
    flex-direction: column;
}

.post-card-small.image-top img {
    width: 100%;
    height: 130px;
    margin-bottom: 5px;
}

.post-card-small.image-top .post-title {
    font-size: 14px;
    text-align: right;
}

.post-card-large.no-margin img {
    height: 200px;
}

.post-card-large:hover .post-title,
.post-card-small:hover .post-title,
.list-item-card:hover .post-title {
    color: var(--primary-color);
}

/* --- 4 CATS SECTION --- */
.four-cats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
}
.cat-col {
    background-color: var(--white);
}
.cat-col .section-header {
    padding: 10px 15px;
    margin-bottom: 0;
    justify-content: space-between;
}
.cat-col .section-title {
    color: var(--white) !important;
    padding-left: 0;
    font-size: 16px;
}
.cat-col .section-line {
    display: none;
}
.cat-col .section-more {
    color: rgba(255,255,255,0.7);
    padding-right: 0;
}
.cat-col .color-economy { background-color: var(--cat-economy); }
.cat-col .color-tech { background-color: var(--cat-technology); }
.cat-col .color-health { background-color: var(--cat-health); }
.cat-col .color-news { background-color: var(--cat-news); }

.cat-col-content {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-top: none;
}
.cat-col-content .post-card-large img {
    height: 140px;
    margin-bottom: 10px;
}
.cat-col-content .post-title {
    font-size: 14px;
    line-height: 1.5;
}

.cat-col-list {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}
.cat-col-list li {
    margin-bottom: 8px;
    position: relative;
    padding-right: 12px;
}
.cat-col-list li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background-color: var(--border-color);
    border-radius: 50%;
}
.cat-col-list a {
    font-size: 13px;
    color: var(--text-muted);
}
.cat-col-list a:hover {
    color: var(--primary-color);
}

/* --- VIDEOS SECTION --- */
.videos-section {
    background-color: var(--cat-videos);
    padding-bottom: 30px;
    color: var(--white);
}
.videos-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
}
.main-video {
    position: relative;
}
.main-video img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}
.video-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    align-items: flex-end;
    gap: 15px;
}
.video-overlay h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 5px;
}
.play-icon-large {
    font-size: 32px;
    color: var(--white);
    opacity: 0.9;
}
.video-playlist {
    background-color: #2a2a2a;
    display: flex;
    flex-direction: column;
}
.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #333;
    color: var(--white);
    flex: 1;
}
.playlist-item:hover {
    background-color: #333;
}
.playlist-thumb {
    position: relative;
    width: 100px;
    height: 70px;
}
.playlist-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.play-icon-small {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: var(--white);
    opacity: 0.8;
}
.playlist-item h4 {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    flex: 1;
}

/* --- FOOTER --- */
.main-footer {
    background-color: #1f2024;
    color: #b0b0b0;
    margin-top: 40px;
    font-size: 13px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    padding: 40px 0;
}

.footer-widget .widget-title {
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

/* Posts Widget */
.widget-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget-post-item {
    display: flex;
    gap: 15px;
    align-items: center;
    color: #b0b0b0;
}

.widget-post-item:hover {
    color: var(--white);
}

.widget-post-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
}

.widget-post-item h4 {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

/* About Widget */
.footer-logo {
    font-size: 32px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.footer-desc {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: var(--white);
    font-size: 16px;
    transition: opacity 0.3s;
}

.social-icon:hover {
    opacity: 0.8;
    color: var(--white);
}

.social-icon.pinterest { background-color: #cb2027; }
.social-icon.tumblr { background-color: #32506d; }
.social-icon.apple { background-color: #999999; }
.social-icon.android { background-color: #a4c639; }

/* Bottom Footer */
.bottom-footer {
    background-color: #17181b;
    padding: 15px 0;
    position: relative;
}

.bottom-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #777;
    font-size: 13px;
}

.scroll-to-top {
    position: absolute;
    left: 15px;
    bottom: 0;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    font-size: 18px;
    cursor: pointer;
    border-radius: 3px 3px 0 0;
    transition: background-color 0.3s;
}
.scroll-to-top:hover {
    background-color: var(--topbar-color);
}

/* --- SINGLE POST PAGE --- */
.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
}
.breadcrumbs a {
    color: var(--text-main);
}
.breadcrumbs a:hover {
    color: var(--primary-color);
}
.breadcrumbs .current {
    color: var(--primary-color);
}

.content-sidebar-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 30px;
}

.single-header {
    margin-bottom: 20px;
}
.single-title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.4;
    color: var(--text-main);
    margin-bottom: 15px;
}
.single-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}
.single-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.single-body p {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.custom-quote {
    background-color: #fcfcfc;
    border-right: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 30px 0;
    position: relative;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.custom-quote p {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
    line-height: 1.6;
}
.quote-icon {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 30px;
    color: rgba(142, 68, 173, 0.1);
}

.single-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.tags-label {
    font-weight: 700;
    font-size: 14px;
}
.single-tags a {
    background-color: #f5f5f5;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 13px;
    color: #555;
    transition: all 0.3s;
}
.single-tags a:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.single-share {
    display: flex;
    gap: 10px;
    border-top: 1px solid #eaeaea;
    padding-top: 20px;
}
.share-btn {
    padding: 8px 15px;
    border-radius: 3px;
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}
.share-btn:hover {
    color: var(--white);
    opacity: 0.9;
}
.share-btn.fb { background-color: #3b5998; }
.share-btn.tw { background-color: #1da1f2; }
.share-btn.pin { background-color: #cb2027; }

/* Related Posts */
.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Sidebar Widgets */
.mb-30 { margin-bottom: 30px; }
