/* ===== BLOG CSS — الرواد المتكاملون ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    --navy-dark: #0a1628;
    --navy: #112244;
    --gold: #c9a227;
    --gold-light: #e0b840;
    --white: #ffffff;
    --gray-100: #f5f7fa;
    --gray-200: #e8ecf2;
    --gray-400: #9aa3b5;
    --gray-600: #5a6478;
    --text: #1a2340;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background: var(--gray-100);
    color: var(--text);
    direction: rtl;
    line-height: 1.8;
    font-size: 16px;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== NAVBAR ===== */
.blog-navbar {
    background: linear-gradient(135deg, #0a1628 0%, #112244 60%, #0d1e3a 100%);
    border-bottom: 2px solid rgba(201, 162, 39, 0.3);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.blog-navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.blog-navbar-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.blog-navbar-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.blog-navbar-links a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.blog-navbar-links a:hover,
.blog-navbar-links a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.breadcrumbs ol {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    color: var(--gray-400);
}

.breadcrumbs a {
    color: var(--navy);
    font-weight: 600;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    color: var(--gold);
}

.breadcrumbs span {
    color: var(--gray-600);
}

/* ===== BLOG HERO (archive) ===== */
.blog-hero {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: var(--white);
    padding: 60px 0 50px;
    text-align: center;
}

.blog-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.blog-hero p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 28px;
}

.blog-tag-pill {
    display: inline-block;
    background: var(--gold);
    color: var(--navy-dark);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* ===== SEARCH BAR ===== */
.blog-search-wrap {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.blog-search-wrap input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    border-radius: 50px;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    outline: none;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-search-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.blog-search-wrap i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
}

/* ===== SORT BAR ===== */
.blog-sort-bar {
    padding: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.blog-sort-bar span {
    font-size: 0.9rem;
    color: var(--gray-600);
    font-weight: 600;
}

.sort-btn {
    padding: 6px 16px;
    border-radius: 50px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
}

.sort-btn.active,
.sort-btn:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ===== POSTS GRID ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding: 20px 0 60px;
}

/* ===== POST CARD ===== */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.post-card-img {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--navy), var(--navy-dark));
    position: relative;
    overflow: hidden;
}

.post-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(201, 162, 39, 0.4);
}

.post-card-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #ffd700;
    color: #1a2340;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-img img {
    transform: scale(1.05);
}

.post-card-cat {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gold);
    color: var(--navy-dark);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
}

.post-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-400);
    font-size: 0.8rem;
    margin-bottom: 10px;
}

.post-card-meta i {
    color: var(--gold);
}

.post-card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 10px;
    line-height: 1.5;
}

.post-card h2 a:hover {
    color: var(--gold);
}

.post-card p {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.7;
    flex: 1;
}

.post-card-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-more {
    color: var(--navy);
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--gold);
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray-400);
    font-size: 0.8rem;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-400);
    grid-column: 1/-1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--gray-200);
}

/* ===== ARTICLE PAGE ===== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding: 40px 0 80px;
    align-items: start;
}

/* Article Header */
.article-header {
    margin-bottom: 32px;
}

.article-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.cat-badge {
    background: var(--gold);
    color: var(--navy-dark);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.article-title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: var(--navy-dark);
    line-height: 1.4;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--gray-400);
    font-size: 0.85rem;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 24px;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-meta i {
    color: var(--gold);
}

/* Featured Image */
.featured-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--navy), var(--navy-dark));
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Article Content */
.article-content {
    font-size: 1rem;
    line-height: 1.9;
    color: #2a3550;
}

.article-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin: 36px 0 14px;
    padding-right: 14px;
    border-right: 4px solid var(--gold);
}

.article-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin: 28px 0 12px;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content ul,
.article-content ol {
    margin: 16px 0 20px 0;
    padding-right: 24px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content strong {
    color: var(--navy-dark);
    font-weight: 700;
}

.article-content a {
    color: var(--navy);
    font-weight: 600;
    border-bottom: 1px solid var(--gold);
}

.article-content a:hover {
    color: var(--gold);
}

.article-content blockquote {
    background: var(--gray-100);
    border-right: 4px solid var(--gold);
    padding: 16px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--gray-600);
}

/* CTA Box */
.article-cta {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: var(--white);
    border-radius: var(--radius);
    padding: 28px 24px;
    margin: 36px 0;
    text-align: center;
}

.article-cta h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.article-cta p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.article-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: var(--navy-dark);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
}

.article-cta a:hover {
    background: var(--gold-light);
    transform: scale(1.04);
}

/* Tags */
.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 28px 0;
}

.tag-pill {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--gray-600);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.tag-pill:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* Share Buttons */
.share-section {
    margin: 32px 0;
}

.share-section h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-whatsapp {
    background: #25d366;
    color: #fff;
}

.share-twitter {
    background: #1da1f2;
    color: #fff;
}

.share-facebook {
    background: #1877f2;
    color: #fff;
}

.share-linkedin {
    background: #0077b5;
    color: #fff;
}

.share-copy {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* ===== SIDEBAR ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
}

.related-post {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-200);
}

.related-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-post-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--navy), var(--navy-dark));
    flex-shrink: 0;
    overflow: hidden;
}

.related-post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy-dark);
    line-height: 1.4;
    margin-bottom: 4px;
}

.related-post-info h4 a:hover {
    color: var(--gold);
}

.related-post-info span {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cat-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--navy);
    transition: var(--transition);
}

.cat-list li a:hover {
    background: var(--navy);
    color: var(--white);
}

.cat-count {
    background: var(--gold);
    color: var(--navy-dark);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.sidebar-cta {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: var(--white);
    text-align: center;
}

.sidebar-cta h3 {
    border-color: rgba(201, 162, 39, 0.5);
    color: var(--white);
}

.sidebar-cta p {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 16px;
}

.sidebar-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: var(--navy-dark);
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.sidebar-cta a:hover {
    background: var(--gold-light);
}

/* ===== FOOTER ===== */
.blog-footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 24px;
    font-size: 0.85rem;
}

.blog-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.blog-footer-links {
    display: flex;
    gap: 16px;
}

.blog-footer a {
    color: var(--gold);
    font-weight: 600;
}

.blog-footer a:hover {
    text-decoration: underline;
}

/* ===== CATEGORY FILTER BAR ===== */
.category-filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-filter-bar .container {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    padding-bottom: 2px;
}

.cat-filter-btn {
    white-space: nowrap;
    padding: 7px 16px;
    border-radius: 50px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    font-family: 'Cairo', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.cat-filter-btn.active,
.cat-filter-btn:hover {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ===== CATEGORY PAGE ===== */
.cat-hero {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: var(--white);
    padding: 50px 0;
    text-align: center;
}

.cat-hero h1 {
    font-size: 2rem;
    font-weight: 800;
}

.cat-hero p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 10px;
}

/* ===== 404 ===== */
.page-404 {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
}

.page-404 .num {
    font-size: 8rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
}

.page-404 h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy-dark);
    margin: 16px 0 12px;
}

.page-404 p {
    color: var(--gray-600);
    max-width: 400px;
    margin-bottom: 28px;
}

.page-404 a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--navy);
    color: var(--white);
    padding: 13px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
}

.page-404 a:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

/* ===== BACK TO TOP ===== */
#backToTop {
    display: none;
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    z-index: 50;
    transition: var(--transition);
}

#backToTop:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: -1;
    }

    .blog-footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .blog-navbar-links a {
        font-size: 0.82rem;
    }

    .article-meta {
        gap: 12px;
    }

    .share-buttons {
        gap: 8px;
    }

    .share-btn {
        padding: 8px 13px;
        font-size: 0.8rem;
    }

    .blog-hero {
        padding: 40px 0;
    }

    .category-filter-bar .container {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
}