/* ============================================================
   صوت الأحرار — Custom Stylesheet (RTL Arabic News Portal)
   ============================================================ */

:root {
    --primary:    #c0392b;
    --primary-dk: #96281b;
    --dark:       #1a1a2e;
    --dark-2:     #16213e;
    --text:       #2c2c2c;
    --muted:      #6c757d;
    --border:     #e9ecef;
    --light-bg:   #f8f9fa;
    --font-main:  'Cairo', 'Tajawal', sans-serif;
}

/* ---- Base ---- */
*       { box-sizing: border-box; }
body    { font-family: var(--font-main); color: var(--text); background: #fff; direction: rtl; }
a       { text-decoration: none; color: inherit; }
a:hover { color: var(--primary); }
img     { max-width: 100%; height: auto; display: block; }

/* ---- Breaking Ticker ---- */
.breaking-bar {
    background: var(--primary);
    color: #fff;
    font-size: .85rem;
    overflow: hidden;
}
.breaking-label {
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 3px;
    white-space: nowrap;
    font-size: .8rem;
    letter-spacing: .5px;
}
.ticker-wrap { overflow: hidden; position: relative; }
.ticker-items {
    display: flex;
    gap: 2rem;
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}
.ticker-item  { white-space: nowrap; }
.ticker-sep   { opacity: .5; }
@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
/* Duplicate content for seamless loop */
.ticker-items::after {
    content: attr(data-content);
}

/* ---- Topbar ---- */
.topbar { background: #fff; border-bottom: 1px solid var(--border); font-size: .82rem; }
.social-icons a { color: var(--muted); transition: color .2s; }
.social-icons a:hover { color: var(--primary); }

/* ---- Navbar ---- */
.main-navbar {
    background: var(--dark) !important;
    padding: .6rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.main-navbar .navbar-brand { padding: 0; }
.logo-text {
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -.5px;
}
.logo-sub {
    font-size: .65rem;
    color: var(--primary);
    font-weight: 400;
    letter-spacing: 1px;
}
.main-navbar .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-size: .9rem;
    font-weight: 600;
    padding: .4rem .8rem !important;
    border-radius: 4px;
    transition: all .2s;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: #fff !important;
    background: var(--primary);
}

/* ---- Hero Section ---- */
.hero-card-main { color: inherit; }
.hero-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 380px;
}
.hero-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.hero-card-main:hover .hero-img-wrap img { transform: scale(1.04); }
.hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 70%, transparent 100%);
    padding: 1.5rem 1rem 1rem;
    color: #fff;
}
.hero-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.5;
    margin: .5rem 0 .3rem;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.category-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
}

/* Sub Hero */
.sub-hero-card { color: inherit; }
.sub-hero-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    height: 182px;
}
.sub-hero-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.sub-hero-card:hover .sub-hero-img-wrap img { transform: scale(1.06); }
.sub-hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
    padding: .6rem;
}
.sub-hero-title {
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

/* ---- Section Header ---- */
.section-header { border-bottom: 2px solid var(--border); padding-bottom: .5rem; }
.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    display: inline-block;
}
.section-title span {
    background: var(--primary);
    color: #fff;
    padding: 4px 16px;
    border-radius: 4px;
}

/* ---- Article Card ---- */
.article-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .25s, transform .25s;
}
.article-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.12);
    transform: translateY(-3px);
}
.article-img-link { display: block; }
.article-img-wrap {
    position: relative;
    height: 180px;
    overflow: hidden;
}
.article-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.article-card:hover .article-img-wrap img { transform: scale(1.05); }
.article-cat-badge {
    position: absolute; top: 8px; right: 8px;
    font-size: .7rem;
    font-weight: 700;
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
}
.breaking-badge {
    position: absolute; top: 8px; left: 8px;
    background: var(--primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: .6; }
}
.article-body { padding: .9rem; }
.article-title {
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.55;
    margin-bottom: .4rem;
}
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--primary); }
.article-excerpt { font-size: .8rem; color: var(--muted); line-height: 1.6; margin-bottom: .5rem; }
.article-meta {
    font-size: .72rem;
    color: var(--muted);
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

/* ---- Sidebar ---- */
.sidebar-widget {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.widget-header { background: var(--dark); padding: .7rem 1rem; }
.widget-title { color: #fff; font-size: .95rem; font-weight: 700; margin: 0; }

/* Most Viewed */
.most-viewed-list { list-style: none; padding: .5rem; margin: 0; }
.most-viewed-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .5rem;
    border-bottom: 1px solid var(--border);
}
.most-viewed-item:last-child { border-bottom: none; }
.mv-number {
    background: var(--primary);
    color: #fff;
    width: 24px; height: 24px;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.mv-content { flex-grow: 1; }
.mv-content a { font-size: .8rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.mv-content a:hover { color: var(--primary); }
.mv-content small { color: var(--muted); font-size: .72rem; }
.mv-thumb {
    width: 56px; height: 40px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Categories Grid */
.categories-grid { padding: .8rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.cat-pill {
    background: color-mix(in srgb, var(--cat-color) 12%, white);
    color: var(--cat-color);
    border: 1px solid color-mix(in srgb, var(--cat-color) 30%, white);
    padding: .3rem .8rem;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    transition: all .2s;
    display: flex; align-items: center; gap: .3rem;
}
.cat-pill:hover, .cat-pill.active {
    background: var(--cat-color);
    color: #fff;
    border-color: var(--cat-color);
}

/* Ad Placeholder */
.ad-placeholder { padding: 1rem; }
.ad-box {
    border: 2px dashed var(--border);
    color: var(--muted);
    padding: 2rem 1rem;
    border-radius: 4px;
    font-size: .8rem;
}

/* Sidebar news list */
.sidebar-news-item {
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-news-item:last-child { border-bottom: none; }
.sidebar-news-item a { font-size: .82rem; font-weight: 600; color: var(--text); line-height: 1.5; }
.sidebar-news-item a:hover { color: var(--primary); }

/* ---- Article Full ---- */
.article-full-title {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.5;
    color: var(--dark);
    margin-bottom: .5rem;
}
.article-full-excerpt {
    font-size: 1.05rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.8;
    border-right: 4px solid var(--primary);
    padding-right: 1rem;
}
.article-full-meta {
    font-size: .85rem;
    color: var(--muted);
    padding: .8rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.article-figure img { border-radius: 8px; }
.article-content {
    font-size: 1.05rem;
    line-height: 2;
    color: #333;
}
.article-content p { margin-bottom: 1.2rem; }

/* Share Buttons */
.btn-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.btn-facebook:hover { background: #145dbf; color: #fff; }
.btn-twitter { background: #1da1f2; color: #fff; border-color: #1da1f2; }
.btn-twitter:hover { background: #0d8fd9; color: #fff; }
.btn-whatsapp { background: #25d366; color: #fff; border-color: #25d366; }
.btn-whatsapp:hover { background: #1ebe57; color: #fff; }

/* Tags */
.article-tags { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.tag-pill {
    background: var(--light-bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: .25rem .75rem;
    border-radius: 20px;
    font-size: .78rem;
    transition: all .2s;
}
.tag-pill:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Related / Mini Card */
.article-card-mini { padding: .7rem 0; border-bottom: 1px solid var(--border); }
.mini-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.mini-title { font-size: .82rem; font-weight: 700; color: var(--text); line-height: 1.5; }
.mini-title:hover { color: var(--primary); }

/* ---- Category Page ---- */
.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-right: 1rem;
    margin-right: 0;
}
.category-icon-lg { font-size: 2rem; }
.category-page-title { font-size: 1.5rem; font-weight: 900; margin: 0; }

/* ---- Search Page ---- */
.search-thumb { width: 100px; height: 70px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }

/* ---- Footer ---- */
.site-footer { background: var(--dark-2); color: rgba(255,255,255,.75); }
.footer-title {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: .5rem;
    margin-bottom: 1rem;
    display: inline-block;
}
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .85rem; transition: color .2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    background: rgba(0,0,0,.3);
    border-top: 1px solid rgba(255,255,255,.05);
}

/* ---- Breadcrumb ---- */
.breadcrumb { background: var(--light-bg); padding: .6rem 1rem; border-radius: 6px; font-size: .82rem; }
.breadcrumb-item a { color: var(--primary); }

/* ---- Pagination ---- */
.pagination .page-link { color: var(--text); border-color: var(--border); font-family: var(--font-main); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
.pagination .page-link:hover { background: var(--light-bg); color: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hero-img-wrap { height: 250px; }
    .hero-title { font-size: 1rem; }
    .article-full-title { font-size: 1.3rem; }
    .logo-text { font-size: 1.3rem; }
    .article-full-excerpt { font-size: .95rem; }
    .article-content { font-size: .95rem; }
}
@media (max-width: 576px) {
    .hero-img-wrap { height: 200px; }
    .article-img-wrap { height: 160px; }
    .ticker-items { animation-duration: 20s; }
}

/* ---- Smooth scroll & transitions ---- */
html { scroll-behavior: smooth; }
.main-content { min-height: 60vh; }

/* ---- Utility ---- */
.fw-900 { font-weight: 900; }
.text-start { text-align: start !important; }
