/* ═══════════════════════════════════════
   Mosaïque News Theme - Main Styles
   ═══════════════════════════════════════ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ═══════════════════════════════════════
   شريط الأخبار العاجلة
   ═══════════════════════════════════════ */
.breaking-news-ticker {
    padding: 10px 0;
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticker-label {
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
}

.ticker-list {
    list-style: none;
    display: flex;
    gap: 40px;
    animation: ticker-scroll 30s linear infinite;
}

.ticker-list li {
    white-space: nowrap;
}

.ticker-list li a:hover {
    opacity: 0.8;
}

@keyframes ticker-scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* ═══════════════════════════════════════
   الهيدر
   ═══════════════════════════════════════ */
.site-header {
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-top {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-branding .site-title a {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-color);
}

.header-search form {
    display: flex;
    gap: 0;
    max-width: 400px;
    width: 100%;
}

.header-search input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 0 8px 8px 0;
    border-left: none;
    font-family: inherit;
}

.header-search button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
}

.header-date {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
}

/* القائمة الرئيسية */
.main-navigation {
    padding: 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: var(--menu-text);
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* ═══════════════════════════════════════
   المحتوى الرئيسي
   ═══════════════════════════════════════ */
.site-main {
    padding: 30px 0;
}

.main-content {
    flex: 1;
}

.main-content + .sidebar,
.sidebar {
    width: 300px;
}

/* تخطيط الشبكة */
.container {
    display: flex;
    gap: 30px;
}

/* ═══════════════════════════════════════
   العناوين
   ═══════════════════════════════════════ */
.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

/* ═══════════════════════════════════════
   بلوك الأخبار المميزة
   ═══════════════════════════════════════ */
.featured-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.featured-main {
    grid-row: span 2;
}

.featured-secondary {
    display: contents;
}

.featured-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--card-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.featured-image {
    position: relative;
    overflow: hidden;
}

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

.featured-item:hover .featured-image img {
    transform: scale(1.05);
}

.featured-content {
    padding: 15px;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 10px;
}

.post-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.4;
    margin-bottom: 10px;
}

.featured-main .post-title {
    font-size: 28px;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

/* ═══════════════════════════════════════
   شبكة الأخبار
   ═══════════════════════════════════════ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.news-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.card-image {
    overflow: hidden;
}

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

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

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.5;
    margin-bottom: 8px;
}

.card-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

/* ═══════════════════════════════════════
   صفحة الخبر
   ═══════════════════════════════════════ */
.single-post {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
}

.breadcrumbs {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--primary-color);
}

.single-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--heading-color);
    line-height: 1.3;
    margin-bottom: 20px;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.single-meta .author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.single-meta .author img {
    border-radius: 50%;
}

.single-thumbnail {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
}

.single-thumbnail img {
    width: 100%;
    height: auto;
}

.single-content-body {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-color);
}

.single-content-body p {
    margin-bottom: 20px;
}

.single-content-body h2,
.single-content-body h3 {
    color: var(--heading-color);
    margin: 30px 0 15px;
}

/* مشاركة */
.post-share {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.post-share a {
    padding: 8px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.share-facebook { background-color: #1877F2; }
.share-twitter { background-color: #1DA1F2; }
.share-whatsapp { background-color: #25D366; }

/* صندوق المؤلف */
.author-box {
    display: flex;
    gap: 20px;
    padding: 25px;
    background-color: var(--bg-color);
    border-radius: 12px;
    margin: 30px 0;
}

.author-box img {
    border-radius: 50%;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

/* أخبار ذات صلة */
.related-posts {
    margin: 40px 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.related-item img {
    border-radius: 8px;
    margin-bottom: 10px;
}

.related-item h4 {
    font-size: 15px;
    font-weight: 600;
}

/* ═══════════════════════════════════════
   ترقيم الصفحات
   ═══════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination a,
.pagination span {
    padding: 10px 18px;
    border-radius: 8px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-weight: 600;
}

.pagination .current {
    background-color: var(--primary-color);
    color: white;
}

/* ═══════════════════════════════════════
   زر تحميل المزيد
   ═══════════════════════════════════════ */
.load-more-wrapper {
    text-align: center;
    margin: 30px 0;
}

.load-more-btn {
    padding: 12px 40px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.load-more-btn:hover {
    background-color: var(--secondary-color);
}

/* ═══════════════════════════════════════
   الفوتر
   ═══════════════════════════════════════ */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

/* ═══════════════════════════════════════
   القائمة المتنقلة
   ═══════════════════════════════════════ */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
}
