/*
Theme Name: شکوه ایلام
Author: Hamzeh
Description: قالب اختصاصی و حرفه‌ای پورتال خبری شکوه ایلام
Version: 2.0
Text Domain: shokouh-ilam
*/

:root {
    --primary: #2563eb;
    --accent: #ff3366;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --header-bg: #ffffff;
    --nav-bg: #0f172a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --radius: 10px;
}

[data-theme="dark"] {
    --bg-body: #090d16;
    --bg-card: #111827;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #1f2937;
    --header-bg: #111827;
    --nav-bg: #0b0f19;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Tahoma, Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 10px;
}

header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area h1 {
    font-size: 2rem;
    color: var(--text-main);
    line-height: 1.2;
    font-weight: bold;
}

.logo-area p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    display: flex;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    width: 250px;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.85rem;
}

.search-box button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.theme-toggle, .admin-btn {
    background: var(--bg-body);
    border: 1px solid var(--border);
    color: var(--text-main);
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0 10px;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 6px;
}

.category-navbar {
    background: var(--nav-bg);
    border-radius: var(--radius);
    margin-top: 8px;
    padding: 0 10px;
}

.nav-links {
    display: flex;
    gap: 15px;
    overflow-x: auto;
}

.nav-links a {
    color: #94a3b8;
    padding: 10px 15px;
    font-size: 0.85rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    display: block;
}

.nav-links a:hover, .nav-links a.active {
    color: #fff;
    border-bottom-color: var(--primary);
}

.breaking-news-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    margin: 10px 0;
    box-shadow: var(--shadow);
}

.pulse-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 15px;
    flex-shrink: 0;
}

.top-section-grid {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 12px;
    margin-bottom: 12px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.left-mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-news-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.8rem;
}

.mini-news-img {
    width: 70px;
    height: 55px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.main-slider-box {
    position: relative;
    min-height: 340px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: #fff;
}

.main-slider-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 10%, rgba(0,0,0,0.2) 90%);
    border-radius: var(--radius);
    z-index: 1;
}

.slider-content {
    position: relative;
    z-index: 2;
}

.slider-content h2 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.slider-content p {
    font-size: 0.8rem;
    opacity: 0.9;
}

.right-circles-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-box-title {
    font-size: 0.85rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 4px;
    display: inline-block;
}

.circle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 500;
}

.author-circle-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.bottom-section-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 12px;
    margin-bottom: 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.category-img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.category-body {
    padding: 10px;
}

.category-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.category-content {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sidebar-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
}

.sidebar-box h4 {
    font-size: 0.85rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 4px;
    margin-bottom: 8px;
    display: inline-block;
}

@media(max-width: 1024px) {
    .top-section-grid, .bottom-section-grid { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: repeat(2, 1fr); }
}