/*
Theme Name: Ailaren AI
Theme URI: https://ailaren.com
Description: قالب ووردبريس عربي احترافي بتصميم داكن عصري، متخصص في مدونات مراجعات أدوات الذكاء الاصطناعي. خفيف جداً، محسّن للـ SEO، ومتوافق مع Google AdSense. يدعم RTL بالكامل.
Version: 2.0
Author: Ailaren AI
Author URI: https://ailaren.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ailaren-ai
Tags: dark, blog, rtl-language-support, custom-menu, featured-images, two-columns
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ============================================
   المتغيرات الأساسية (CSS Variables)
   ============================================ */
:root {
    --bg-primary: #0a0e14;
    --bg-secondary: #111722;
    --bg-card: #161d2b;
    --bg-elevated: #1c2434;
    --accent: #22d3ee;
    --accent-hover: #06b6d4;
    --accent-glow: rgba(34, 211, 238, 0.15);
    --text-primary: #e8eaf0;
    --text-secondary: #9aa3b2;
    --text-muted: #6b7280;
    --border: #232d40;
    --border-light: #2d3a52;
    --gradient-hero: linear-gradient(135deg, #0e1420 0%, #16203a 50%, #0f1a2e 100%);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px var(--accent-glow);
    --font-main: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   إعادة الضبط والأساسيات
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 16px;
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--accent-hover);
}

ul, ol {
    list-style-position: inside;
}

/* ============================================
   الحاوية العامة
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-content {
    min-height: 60vh;
    padding: 2.5rem 0;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2.5rem;
    align-items: start;
}

.content-layout.no-sidebar {
    grid-template-columns: minmax(0, 1fr);
    max-width: 820px;
    margin: 0 auto;
}

/* ============================================
   الهيدر (Header)
   ============================================ */
.site-header {
    background-color: rgba(17, 23, 34, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1.5rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.site-logo-text .logo-accent {
    color: var(--accent);
}

.site-logo-text a {
    color: inherit;
}

.custom-logo {
    max-height: 48px;
    width: auto;
}

/* القائمة الرئيسية */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--accent);
    background-color: var(--accent-glow);
}

/* القوائم الفرعية */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    min-width: 200px;
    flex-direction: column;
    display: none;
    padding: 0.5rem;
    box-shadow: var(--shadow-card);
}

.main-navigation li:hover > ul {
    display: flex;
}

/* زر قائمة الموبايل */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

/* ============================================
   قسم البطل (Hero Section)
   ============================================ */
.hero-section {
    background: var(--gradient-hero);
    padding: 4.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section h1 {
    font-size: clamp(1.9rem, 5vw, 3.2rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--text-primary) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.hero-section .hero-tagline {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2rem;
    position: relative;
}

.hero-cta {
    display: inline-block;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #04121a;
    padding: 0.85rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-glow);
    position: relative;
}

.hero-cta:hover {
    transform: translateY(-2px);
    color: #04121a;
    box-shadow: 0 0 60px rgba(34, 211, 238, 0.3);
}

/* ============================================
   المقال المميز (Featured Post)
   ============================================ */
.featured-post {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2.5rem;
    transition: var(--transition);
}

.featured-post:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.featured-post-image {
    min-height: 300px;
    background-color: var(--bg-elevated);
}

.featured-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-post-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
}

.featured-post-content h2 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.featured-post-content h2 a {
    color: var(--text-primary);
}

.featured-post-content h2 a:hover {
    color: var(--accent);
}

/* ============================================
   شبكة المقالات (Posts Grid)
   ============================================ */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-light), transparent);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}

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

.post-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.post-thumbnail {
    height: 190px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-secondary));
    position: relative;
}

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

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

.post-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--border-light);
    font-weight: 800;
}

.post-card-body {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    display: inline-block;
    background-color: var(--accent-glow);
    color: var(--accent);
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

a.post-category:hover {
    background-color: var(--accent);
    color: #04121a;
}

.post-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

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

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

.post-excerpt {
    color: var(--text-secondary);
    font-size: 0.92rem;
    margin-bottom: 1rem;
    flex: 1;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    padding-top: 0.9rem;
    border-top: 1px solid var(--border);
}

.read-more {
    font-weight: 700;
    color: var(--accent);
}

/* ============================================
   صفحة المقالة الفردية (Single Post)
   ============================================ */
.single-article {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
}

.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.article-header h1 {
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    line-height: 1.4;
    margin: 0.75rem 0 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    align-items: center;
}

.article-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.article-featured-image {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
}

/* محتوى المقالة */
.article-content {
    font-size: 1.08rem;
    line-height: 2;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 1.65rem;
    color: var(--accent);
    margin: 2.25rem 0 1rem;
}

.article-content h3 {
    font-size: 1.3rem;
    margin: 1.75rem 0 0.85rem;
}

.article-content p {
    margin-bottom: 1.4rem;
}

.article-content img {
    border-radius: var(--radius);
    margin: 1.5rem auto;
}

.article-content ul,
.article-content ol {
    margin: 0 1.25rem 1.4rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-right: 4px solid var(--accent);
    background-color: var(--bg-elevated);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    color: var(--text-secondary);
    font-style: italic;
}

.article-content code {
    background-color: var(--bg-elevated);
    color: var(--accent);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
    direction: ltr;
    unicode-bidi: embed;
}

.article-content pre {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin-bottom: 1.4rem;
    direction: ltr;
    text-align: left;
}

.article-content pre code {
    background: none;
    padding: 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.4rem;
}

.article-content th,
.article-content td {
    border: 1px solid var(--border-light);
    padding: 0.7rem 1rem;
    text-align: right;
}

.article-content th {
    background-color: var(--bg-elevated);
    color: var(--accent);
}

/* وسوم المقالة */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* التنقل بين المقالات */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
}

.nav-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
}

.nav-card:hover {
    border-color: var(--accent);
}

.nav-card .nav-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    display: block;
}

.nav-card a {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.nav-card a:hover {
    color: var(--accent);
}

/* صندوق الكاتب */
.author-box {
    display: flex;
    gap: 1.25rem;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 2rem;
    align-items: center;
}

.author-box img {
    border-radius: 50%;
    width: 72px;
    height: 72px;
}

.author-box .author-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.author-box .author-bio {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   الشريط الجانبي (Sidebar)
   ============================================ */
.sidebar .widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar .widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.sidebar li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.sidebar a:hover {
    color: var(--accent);
}

/* مقالات شائعة في الشريط الجانبي */
.popular-post-item {
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.popular-post-item .popular-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--bg-elevated);
}

.popular-post-item .popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-item .popular-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
}

/* ============================================
   نموذج الاتصال وصفحة اتصل بنا
   ============================================ */
.contact-intro {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.contact-intro h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.contact-intro p {
    color: var(--text-secondary);
}

.contact-wrapper {
    max-width: 680px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
}

.contact-form .form-group,
.wpcf7 .form-group,
.wpcf7 p {
    margin-bottom: 1.4rem;
}

.contact-form label,
.wpcf7 label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="url"],
.contact-form textarea,
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="url"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
input.search-field,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus,
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.contact-form textarea,
.wpcf7 textarea,
.comment-form textarea {
    min-height: 160px;
    resize: vertical;
}

.btn-primary,
.contact-form button[type="submit"],
.wpcf7 input[type="submit"],
.comment-form input[type="submit"],
.search-submit {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: #04121a;
    padding: 0.85rem 2.2rem;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover,
.wpcf7 input[type="submit"]:hover,
.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* معلومات الاتصال */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.contact-info-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.contact-info-card .info-icon {
    font-size: 1.75rem;
    margin-bottom: 0.6rem;
}

.contact-info-card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.contact-info-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   الصفحات العامة
   ============================================ */
.page-content-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
}

/* رأس الأرشيف */
.archive-header {
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--gradient-hero);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.archive-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.archive-header p {
    color: var(--text-secondary);
}

/* ============================================
   التصفح بين الصفحات (Pagination)
   ============================================ */
.pagination,
.navigation.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.pagination .page-numbers,
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
}

.pagination .page-numbers.current,
.nav-links .page-numbers.current {
    background-color: var(--accent);
    color: #04121a;
    border-color: var(--accent);
}

.pagination .page-numbers:hover,
.nav-links .page-numbers:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   التعليقات
   ============================================ */
.comments-area {
    margin-top: 2.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}

.comments-title,
.comment-reply-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}

.comment-list .comment {
    padding: 1.25rem;
    background-color: var(--bg-elevated);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

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

.comment-metadata {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.comment-content {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.reply a {
    font-size: 0.85rem;
    font-weight: 700;
}

/* ============================================
   الفوتر (Footer)
   ============================================ */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    margin-top: 3.5rem;
    padding: 3rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.footer-col h3 {
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.6rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 2px;
    background-color: var(--accent);
    border-radius: 2px;
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.6rem;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.footer-col a:hover {
    color: var(--accent);
    padding-right: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.footer-bottom a {
    color: var(--text-secondary);
}

/* ============================================
   عناصر مساعدة
   ============================================ */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.no-results-box {
    text-align: center;
    padding: 3.5rem 2rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.no-results-box h2 {
    margin-bottom: 0.75rem;
}

.no-results-box p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* صفحة 404 */
.error-404-box {
    text-align: center;
    padding: 4.5rem 2rem;
}

.error-404-box .error-code {
    font-size: 6rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 1rem;
}

/* نموذج البحث */
.search-form {
    display: flex;
    gap: 0.6rem;
}

.search-form .search-field {
    flex: 1;
}

.search-submit {
    padding: 0.85rem 1.5rem;
    white-space: nowrap;
}

/* شارة "جديد" */
.badge-new {
    background-color: #f59e0b;
    color: #1a1203;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    right: 1rem;
    background-color: var(--accent);
    color: #04121a;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    z-index: 2000;
    font-weight: 700;
}

.skip-link:focus {
    top: 1rem;
}

/* ============================================
   التجاوب (Responsive)
   ============================================ */
@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }

    .featured-post {
        grid-template-columns: 1fr;
    }

    .featured-post-image {
        min-height: 220px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: var(--bg-elevated);
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.5rem;
        box-shadow: var(--shadow-card);
    }

    .main-navigation.toggled {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .main-navigation ul ul {
        position: static;
        display: block;
        border: none;
        box-shadow: none;
        background: none;
        padding-right: 1.25rem;
    }

    .hero-section {
        padding: 3rem 0;
    }

    .single-article,
    .page-content-wrapper,
    .contact-wrapper {
        padding: 1.5rem;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   تحسينات الطباعة
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .post-navigation,
    .comments-area {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }
}
