/* ==========================================================================
   غنيم نيوز - موقع إخباري مصري احترافي
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&family=Amiri:wght@400;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

/* ==========================================================================
   CSS Variables
   ========================================================================== */
:root {
    --primary:        #c0392b;    /* أحمر داكن - اللون الرئيسي */
    --primary-dark:   #96281b;
    --primary-light:  #e74c3c;
    --accent:         #c8960c;    /* ذهبي */
    --accent-light:   #f39c12;
    --dark:           #1a1a2e;
    --dark-2:         #16213e;
    --dark-3:         #0f3460;
    --white:          #ffffff;
    --off-white:      #f8f9fa;
    --light-gray:     #f0f2f5;
    --mid-gray:       #e0e0e0;
    --text-dark:      #1a1a1a;
    --text-mid:       #444444;
    --text-light:     #777777;
    --text-muted:     #999999;
    --border-color:   #dde1e7;
    --shadow-sm:      0 2px 8px rgba(0,0,0,0.08);
    --shadow-md:      0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg:      0 8px 40px rgba(0,0,0,0.18);
    --radius-sm:      4px;
    --radius-md:      8px;
    --radius-lg:      12px;
    --font-arabic:    'Tajawal', 'Arial', sans-serif;
    --font-headline:  'Amiri', 'Tajawal', serif;
    --transition:     all 0.25s ease;
    --header-h:       60px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-arabic);
    background-color: var(--light-gray);
    color: var(--text-dark);
    direction: rtl;
    line-height: 1.7;
    font-size: 16px;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

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

ul { list-style: none; }

button { cursor: pointer; font-family: var(--font-arabic); }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   Breaking News Ticker
   ========================================================================== */
.breaking-bar {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-dark);
}

.breaking-bar .container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.breaking-label {
    background: var(--white);
    color: var(--primary);
    padding: 3px 12px;
    border-radius: 2px;
    font-weight: 900;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.ticker-wrap {
    flex: 1;
    overflow: hidden;
    height: 22px;
    position: relative;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 35s linear infinite;
    padding-right: 100%;
}

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

.ticker-content span {
    display: inline-block;
    padding: 0 30px;
}

.ticker-content span::after {
    content: '●';
    margin-right: 30px;
    color: var(--accent-light);
}

.ticker-content span:last-child::after { display: none; }

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

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: var(--shadow-md);
}

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

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

/* Logo */
.site-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-name {
    font-family: var(--font-headline);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* Header Date & Search */
.header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.current-date {
    font-size: 0.82rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.current-date i { color: var(--primary); }

.header-search {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    background: var(--off-white);
    transition: var(--transition);
}

.header-search:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.header-search input {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-family: var(--font-arabic);
    font-size: 0.88rem;
    color: var(--text-dark);
    width: 200px;
    outline: none;
}

.header-search button {
    background: var(--primary);
    border: none;
    color: var(--white);
    padding: 7px 14px;
    font-size: 0.82rem;
    transition: var(--transition);
}

.header-search button:hover { background: var(--primary-dark); }

/* ==========================================================================
   Main Navigation
   ========================================================================== */
.main-nav {
    background: var(--dark);
}

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

.nav-list {
    display: flex;
    align-items: stretch;
}

.nav-list > li > a {
    display: block;
    padding: 12px 18px;
    color: var(--white);
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    transition: var(--transition);
}

.nav-list > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.25s ease;
}

.nav-list > li > a:hover,
.nav-list > li.active > a {
    background: rgba(255,255,255,0.08);
    color: var(--accent-light);
}

.nav-list > li > a:hover::after,
.nav-list > li.active > a::after {
    transform: scaleX(1);
}

.nav-list > li:first-child > a {
    color: var(--accent-light);
}

.nav-social {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-social a {
    color: var(--white);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.82rem;
    transition: var(--transition);
    opacity: 0.75;
}

.nav-social a:hover { opacity: 1; background: rgba(255,255,255,0.15); }

/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.3rem;
    padding: 10px;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.site-main {
    padding: 24px 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

/* ==========================================================================
   Hero / Featured Post
   ========================================================================== */
.hero-section {
    margin-bottom: 28px;
}

.hero-post {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/7;
    background: var(--dark);
    box-shadow: var(--shadow-md);
}

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

.hero-post:hover img {
    transform: scale(1.03);
    opacity: 0.65;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 28px 28px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9) 60%);
}

.hero-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 2px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: var(--font-headline);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.4;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero-title a { color: var(--white); }
.hero-title a:hover { color: var(--accent-light); }

.hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: rgba(255,255,255,0.75);
    font-size: 0.82rem;
}

.hero-meta i { color: var(--accent-light); }

/* ==========================================================================
   Section Headings
   ========================================================================== */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 22px;
    background: var(--primary);
    border-radius: 2px;
    display: inline-block;
}

.section-title .see-all {
    margin-right: auto;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 3px 12px;
    border-radius: 20px;
    transition: var(--transition);
}

.section-title .see-all:hover {
    background: var(--primary);
    color: var(--white);
}

/* ==========================================================================
   Post Cards
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

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

.post-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.post-card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--mid-gray);
}

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

.post-card:hover .post-card-img-wrap img {
    transform: scale(1.06);
}

.card-category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 1;
}

.post-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-title a:hover { color: var(--primary); }

.post-card-excerpt {
    font-size: 0.875rem;
    color: var(--text-mid);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 12px;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: auto;
}

.post-card-meta i { color: var(--primary); font-size: 0.72rem; }

/* Horizontal Post Card (list style) */
.post-list-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: flex-start;
}

.post-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.post-list-item:first-child { padding-top: 0; }

.post-list-img {
    width: 100px;
    height: 75px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--mid-gray);
}

.post-list-body { flex: 1; }

.post-list-category {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    display: block;
}

.post-list-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 6px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-list-title a:hover { color: var(--primary); }

.post-list-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.post-list-date i { color: var(--primary); margin-left: 4px; }

/* ==========================================================================
   Sidebar
   ========================================================================== */
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); }

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i { color: var(--primary); }

.numbered-list { counter-reset: items; }

.numbered-post {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    align-items: flex-start;
    counter-increment: items;
}

.numbered-post:last-child { border-bottom: none; padding-bottom: 0; }
.numbered-post:first-child { padding-top: 0; }

.num-badge {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
}

.numbered-post:nth-child(1) .num-badge { background: var(--primary); }
.numbered-post:nth-child(2) .num-badge { background: #e67e22; }
.numbered-post:nth-child(3) .num-badge { background: var(--accent); }
.numbered-post:nth-child(n+4) .num-badge { background: var(--text-light); }

.num-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.num-title a:hover { color: var(--primary); }

.num-date {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Category Tags Widget */
.cat-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-tag {
    background: var(--off-white);
    border: 1px solid var(--border-color);
    color: var(--text-mid);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: var(--transition);
}

.cat-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ==========================================================================
   Category Section Strip
   ========================================================================== */
.category-strip {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination-wrap {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination-wrap nav { width: 100%; }

/* Laravel Pagination Override */
.pagination-wrap .flex {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-wrap svg { display: none; }

.pagination-wrap span[aria-current="page"] > span,
.pagination-wrap a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
}

.pagination-wrap a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination-wrap span[aria-current="page"] > span {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* ==========================================================================
   Single Post Page
   ========================================================================== */
.single-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.single-article {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

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

.article-body-wrap {
    padding: 28px 32px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb i { font-size: 0.65rem; }

/* Article Category Badge */
.article-cat-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 4px 14px;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.article-title {
    font-family: var(--font-headline);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.article-meta i { color: var(--primary); margin-left: 5px; }
.article-meta strong { color: var(--text-dark); }

/* Share Bar */
.share-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.share-bar .share-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-mid);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.share-btn:hover { opacity: 0.85; transform: translateY(-1px); color: var(--white); }
.share-btn.fb  { background: #1877f2; }
.share-btn.tw  { background: #1da1f2; }
.share-btn.wa  { background: #25d366; }
.share-btn.cp  { background: var(--text-light); }

/* Article Content */
.article-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-mid);
}

.article-content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 28px 0 14px;
    padding-right: 14px;
    border-right: 4px solid var(--primary);
}

.article-content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 22px 0 10px;
}

.article-content p { margin-bottom: 18px; }

.article-content img {
    width: 100%;
    border-radius: var(--radius-md);
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.article-content blockquote {
    border-right: 4px solid var(--accent);
    background: var(--off-white);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-mid);
}

.article-content ul, .article-content ol {
    padding-right: 24px;
    margin-bottom: 18px;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 8px; }

/* Tags */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.article-tags strong { color: var(--text-dark); font-size: 0.88rem; }

.tag-pill {
    background: var(--off-white);
    border: 1px solid var(--border-color);
    color: var(--text-mid);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.tag-pill:hover {
    background: var(--dark);
    border-color: var(--dark);
    color: var(--white);
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-section {
    padding: 28px 32px;
    border-top: 3px solid var(--light-gray);
}

.comments-header {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-header i { color: var(--primary); }

.comment-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child { border-bottom: none; }

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.comment-body-wrap { flex: 1; }

.comment-author-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    margin-bottom: 8px;
}

.comment-text {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* Comment Form */
.comment-form-section {
    background: var(--off-white);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 24px;
    border: 1px solid var(--border-color);
}

.comment-form-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 18px;
    color: var(--text-dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-arabic);
    font-size: 0.9rem;
    color: var(--text-dark);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.12);
}

textarea.form-control { resize: vertical; min-height: 110px; }

.btn-submit {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 11px 28px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-arabic);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192,57,43,0.3);
}

/* Alert */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: rgba(39,174,96,0.12);
    color: #27ae60;
    border: 1px solid #27ae60;
}

.alert-error {
    background: rgba(192,57,43,0.12);
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* ==========================================================================
   Category / Tag Page
   ========================================================================== */
.cat-page-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
    border-radius: var(--radius-md);
    padding: 30px 28px;
    margin-bottom: 24px;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 16px;
}

.cat-page-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    flex-shrink: 0;
}

.cat-page-name {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.cat-page-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.8);
    margin-top: 48px;
}

.footer-main {
    padding: 44px 0 32px;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 36px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about .footer-logo {
    font-family: var(--font-headline);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
    display: block;
}

.footer-about p {
    font-size: 0.875rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.6);
    margin-bottom: 18px;
}

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

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.1);
    color: var(--white);
    transition: var(--transition);
}

.footer-social a:hover { background: var(--primary); transform: translateY(-3px); }

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-light);
    padding-right: 5px;
}

.footer-col ul li a i {
    color: var(--primary);
    font-size: 0.7rem;
}

.footer-bottom {
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
}

.footer-bottom a {
    color: var(--accent-light);
}

/* ==========================================================================
   Utilities & Helpers
   ========================================================================== */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-6 { margin-bottom: 24px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    color: var(--mid-gray);
    margin-bottom: 16px;
    display: block;
}

.empty-state p { font-size: 1.05rem; }

/* No-image placeholder */
.no-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--light-gray), var(--mid-gray));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .content-layout,
    .single-layout {
        grid-template-columns: 1fr;
    }

    .sidebar { position: static; }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: 1fr 1fr; }
    .posts-grid-2 { grid-template-columns: 1fr; }

    .hero-title { font-size: 1.3rem; }
    .article-title { font-size: 1.5rem; }

    .header-top .container { flex-direction: column; align-items: flex-start; gap: 10px; }
    .header-meta { align-items: flex-start; }
    .header-search input { width: 140px; }

    .nav-toggle { display: block; }
    .nav-list { display: none; flex-direction: column; width: 100%; }
    .nav-list.open { display: flex; }
    .nav-list > li > a { padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .nav-social { display: none; }

    .form-row { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; gap: 24px; }
    .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }

    .article-body-wrap,
    .comments-section { padding: 20px 16px; }
}

@media (max-width: 480px) {
    .posts-grid { grid-template-columns: 1fr; }
    .cat-page-header { flex-direction: column; text-align: center; }
}
