/* ============================================
   SORULARLA İSLAMİYET — Design System
   ============================================ */

/* ── CSS Custom Properties ──────────────────── */
:root {
    /* Primary palette — deep emerald green (Islamic theme) */
    --primary-50: #ecfdf5;
    --primary-100: #d1fae5;
    --primary-200: #a7f3d0;
    --primary-300: #6ee7b7;
    --primary-400: #34d399;
    --primary-500: #10b981;
    --primary-600: #047857;
    --primary-700: #065f46;
    --primary-800: #064e3b;
    --primary-900: #022c22;

    /* Gold accents */
    --gold-50: #fffbeb;
    --gold-100: #fef3c7;
    --gold-200: #fde68a;
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;

    /* Neutrals */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic */
    --bg-primary: #ffffff;
    --bg-secondary: var(--gray-50);
    --bg-card: #ffffff;
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-muted: var(--gray-400);
    --border-color: var(--gray-200);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transition */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ───────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

/* ── Typography ─────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

/* ── Layout ─────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-wrapper {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* ── Header ─────────────────────────────────── */
.site-header {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 50%, var(--primary-600) 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.site-logo h1 {
    color: white;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-logo .tagline {
    font-size: 0.75rem;
    color: var(--primary-200);
    font-weight: 400;
    display: block;
    margin-top: -2px;
}

/* ── Search Bar ─────────────────────────────── */
.search-form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition);
    width: 400px;
    backdrop-filter: blur(10px);
}

.search-form:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1.25rem;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-form button {
    background: var(--gold-500);
    border: none;
    color: var(--primary-900);
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--gold-400);
}

/* ── Navigation ─────────────────────────────── */
.nav-bar {
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
}

.nav-bar ul {
    list-style: none;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-bar ul::-webkit-scrollbar {
    display: none;
}

.nav-bar a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-bar a:hover,
.nav-bar a.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--gold-400);
}

.nav-icon {
    font-size: 1rem;
}

/* ── Hero / Featured Section ────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 100%);
    padding: 3rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.08) 0%, transparent 60%);
    border-radius: 50%;
}

.hero-section::after {
    content: '☪';
    position: absolute;
    bottom: -30px;
    right: 5%;
    font-size: 200px;
    opacity: 0.03;
    transform: rotate(-15deg);
}

.hero-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.hero-subtitle {
    color: var(--primary-300);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ── Featured Cards Grid ────────────────────── */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* ── Article Card ───────────────────────────── */
.article-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    position: relative; /* Stretched link için kritik */
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-300);
}

/* 💠 Stretched Link: Linkin tüm kartı kaplamasını sağlar */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

.article-card .card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.article-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card .card-title {
    font-size: 1.1rem;
    margin: 0.75rem 0 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .card-title a:hover {
    color: var(--primary-600);
}

.article-card .card-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.article-card .card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.view-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ── Featured Card (hero variant) ───────────── */
.featured-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.featured-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.featured-card .card-badge {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--primary-900);
}

.featured-card .card-title {
    color: white;
    font-size: 1.05rem;
    margin: 0.75rem 0 0.5rem;
}

.featured-card .card-title a:hover {
    color: var(--gold-300);
}

.featured-card .card-excerpt {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.featured-card .card-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
}

/* ── Section Headings ───────────────────────── */
.section-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-100);
}

.section-heading h2 {
    font-size: 1.375rem;
    color: var(--primary-800);
}

.section-heading .icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* ── Article List (compact) ─────────────────── */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.article-list-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.article-list-item:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-md);
}

.article-list-item .item-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-200);
    min-width: 2rem;
    text-align: center;
    line-height: 1;
    padding-top: 0.25rem;
}

.article-list-item .item-content {
    flex: 1;
}

.article-list-item .item-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.article-list-item .item-title a:hover {
    color: var(--primary-600);
}

.article-list-item .item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

/* ── Sidebar Widgets ────────────────────────── */
.widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.widget-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    border-bottom: 1px solid var(--primary-200);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-body {
    padding: 1rem 1.25rem;
}

/* ── Category List (sidebar) ────────────────── */
.category-list {
    list-style: none;
}

.category-list li {
    border-bottom: 1px solid var(--gray-100);
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.category-list a:hover {
    color: var(--primary-600);
}

.category-list .count {
    background: var(--gray-100);
    color: var(--text-muted);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Popular Articles (sidebar) ─────────────── */
.popular-list {
    list-style: none;
    counter-reset: popular;
}

.popular-list li {
    counter-increment: popular;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.popular-list li:last-child {
    border-bottom: none;
}

.popular-list a {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    align-items: flex-start;
}

.popular-list a::before {
    content: counter(popular);
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.popular-list a:hover {
    color: var(--primary-600);
}

/* ── Ad Slot ────────────────────────────────── */
.ad-slot {
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

/* ── Breadcrumbs ────────────────────────────── */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 1rem 0;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--primary-600);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    color: var(--gray-300);
}

/* ── Article Detail Page ────────────────────── */
.article-detail {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.article-header {
    background: linear-gradient(135deg, var(--primary-800), var(--primary-700));
    color: white;
    padding: 2rem 2rem 1.5rem;
}

.article-header .article-category {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
}

.article-header h1 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--primary-200);
    font-size: 0.85rem;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.question-block {
    background: linear-gradient(135deg, var(--gold-50), var(--gold-100));
    border-left: 4px solid var(--gold-500);
    padding: 1.5rem 2rem;
    font-size: 1.05rem;
    color: var(--gray-700);
    font-style: italic;
    line-height: 1.7;
    position: relative;
    z-index: 5;
    pointer-events: auto;
    cursor: default;
}

.article-body {
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.85;
    color: var(--gray-700);
    position: relative;
    z-index: 5;
}

/* 🛡️ Hatalı (Develasa) Link Koruması */
.article-body a[href*=" "], 
.article-body a[href*="%20"] {
    pointer-events: none !important;
    text-decoration: none !important;
    color: inherit !important;
    cursor: default !important;
}

.article-body a {
    color: var(--primary-color);
    text-decoration: underline;
    pointer-events: auto;
}

.article-body h2 {
    margin: 2rem 0 1rem;
    color: var(--primary-800);
    font-size: 1.5rem;
}

.article-body h3 {
    margin: 1.5rem 0 0.75rem;
    color: var(--primary-700);
    font-size: 1.2rem;
}

.article-body ul, .article-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.article-body th {
    background: var(--primary-700);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
}

.article-body td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.article-body tr:nth-child(even) {
    background: var(--gray-50);
}

.article-body strong {
    color: var(--primary-700);
}

.article-body em {
    color: var(--gray-600);
}

.article-body p {
    margin-bottom: 1rem;
}

/* ── Tags ───────────────────────────────────── */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.35rem 0.85rem;
    background: var(--primary-50);
    color: var(--primary-700);
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid var(--primary-100);
}

.tag:hover {
    background: var(--primary-100);
    color: var(--primary-800);
}

/* ── Related Articles ───────────────────────── */
.related-articles {
    margin-top: 2rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

/* ── Search Page ────────────────────────────── */
.search-page-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.search-page-form input {
    flex: 1;
    padding: 0.85rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-page-form input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-page-form button {
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-page-form button:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    transform: translateY(-1px);
}

.search-results-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.search-results-count strong {
    color: var(--primary-600);
}

.no-results {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.no-results .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ── Category Page ──────────────────────────── */
.category-header {
    background: linear-gradient(135deg, var(--primary-800), var(--primary-700));
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.category-header::after {
    content: '';
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1), transparent 60%);
    border-radius: 50%;
}

.category-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.category-header p {
    color: var(--primary-200);
    font-size: 0.95rem;
}

.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.subcategory-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.subcategory-chip:hover {
    border-color: var(--primary-400);
    color: var(--primary-700);
    background: var(--primary-50);
}

.subcategory-chip .chip-count {
    background: var(--gray-100);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

/* ── Pagination ─────────────────────────────── */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    gap: 0.35rem;
    list-style: none;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination li a:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-700);
}

.pagination li.active span {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

.pagination li.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Footer ─────────────────────────────────── */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    margin-top: 3rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 0;
}

.footer-brand h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-links h4 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    display: block;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: var(--gray-400);
}

.footer-links a:hover {
    color: var(--gold-400);
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ── Admin Styles ───────────────────────────── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--gray-900);
    color: white;
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.admin-sidebar .brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--gray-800);
    margin-bottom: 1rem;
}

.admin-sidebar .brand h2 {
    color: white;
    font-size: 1.1rem;
}

.admin-sidebar .brand small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.admin-nav {
    list-style: none;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: var(--transition);
}

.admin-nav a:hover, .admin-nav a.active {
    background: var(--gray-800);
    color: white;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    background: var(--bg-secondary);
}

/* ── Stats Cards ────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-600);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ── Admin Table ────────────────────────────── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--gray-50);
    padding: 0.85rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--text-secondary);
}

.admin-table tr:hover td {
    background: var(--gray-50);
}

/* ── Status Badge ───────────────────────────── */
.status-badge {
    display: inline-flex;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-published {
    background: #d1fae5;
    color: #065f46;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.status-archived {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* ── Buttons ────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
}

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
}

.btn-danger:hover {
    background: #fecaca;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary-400);
    color: var(--primary-600);
    background: var(--primary-50);
}

/* ── Form Elements ──────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--bg-card);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-600);
}

/* ── Alert / Flash ──────────────────────────── */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }

    .header-top {
        flex-direction: column;
        gap: 1rem;
    }

    .search-form {
        width: 100%;
    }

    .nav-bar ul {
        padding: 0 0.5rem;
    }

    .hero-section {
        padding: 2rem 0;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .page-wrapper {
        padding: 1rem 0;
    }

    .article-header {
        padding: 1.5rem;
    }

    .article-header h1 {
        font-size: 1.35rem;
    }

    .article-body {
        padding: 1.25rem;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .admin-sidebar {
        display: none;
    }

    .category-header {
        padding: 1.5rem;
    }

    .search-page-form {
        flex-direction: column;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Mobile menu ────────────────────────────── */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        color: var(--primary-color, #1e293b);
        position: absolute;
        right: 15px;
        top: 25px;
    }

    .header-top {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        position: relative;
    }

    .header-actions {
        width: 100%;
        margin-top: 1rem;
        justify-content: space-between;
    }

    .header-actions .search-form {
        flex: 1;
        min-width: 100%;
        margin-bottom: 0.5rem;
    }

    .header-actions a {
        flex: 1;
        text-align: center;
        justify-content: center;
    }

    .site-logo img {
        height: 50px !important;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .nav-bar {
        display: none;
        width: 100%;
        background: white;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        position: absolute;
        left: 0;
        top: 100%;
        z-index: 50;
    }
    
    .nav-bar.open {
        display: block;
    }

    .nav-bar ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    .nav-bar ul li {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        margin: 0;
    }

    .nav-bar ul li a {
        display: flex;
        padding: 12px 20px;
        width: 100%;
        color: #1e293b !important;
        font-weight: 500;
    }

    /* Admin Panel Mobile Optimizations */
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        display: block !important;
        width: 100%;
        padding: 1rem;
        height: auto;
    }

    .admin-sidebar .brand {
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
    }

    .admin-nav {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .admin-nav::-webkit-scrollbar {
        height: 6px;
    }

    .admin-nav::-webkit-scrollbar-thumb {
        background-color: var(--gray-600);
        border-radius: 4px;
    }

    .admin-nav li {
        margin-top: 0 !important;
        padding-top: 0 !important;
        flex-shrink: 0;
    }

    .admin-nav a, .admin-nav button {
        padding: 0.5rem 1rem !important;
        border-radius: 8px !important;
        white-space: nowrap;
    }

    .admin-content {
        padding: 1rem;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ── Animations ─────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease-out;
}

/* ── Loading shimmer ────────────────────────── */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ── Pagination SVG Fix ─────────────────────── */
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
nav[role="navigation"] svg {
    width: 1.25rem;
    height: 1.25rem;
}

