/*
Theme Name: WorldCup Pro
Theme URI: https://yoursite.com
Author: Your Name
Description: قالب احترافي لمدونة كأس العالم - سريع، نظيف، متوافق مع SEO — Bilingual AR/EN
Version: 1.1.0
Text Domain: worldcup-pro
Tags: rtl-language, sports, blog, fast, seo, bilingual
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
    --color-primary:    #1a6b3c;   /* أخضر رياضي */
    --color-secondary:  #1a3a6b;   /* أزرق ملكي */
    --color-accent:     #f0b429;   /* ذهبي كأس العالم */
    --color-bg:         #f7f8fa;
    --color-surface:    #ffffff;
    --color-border:     #e2e8f0;
    --color-text:       #1a202c;
    --color-muted:      #718096;
    --font-main:        'Cairo', 'Segoe UI', sans-serif;  /* default: Arabic */
    --radius:           10px;
    --shadow:           0 2px 12px rgba(0,0,0,.07);
    --max-width:        1200px;
    --transition:       .2s ease;
}

/* ── Bilingual font switching ───────────────────────────── */
html[dir="ltr"] { --font-main: 'Inter', 'Segoe UI', sans-serif; }
html[dir="rtl"] { --font-main: 'Cairo', 'Segoe UI', sans-serif; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    /* direction inherited from <html dir="rtl|ltr"> — do not hardcode */
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a  { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-secondary); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main {
    flex: 1;
    min-height: 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 28px 0;
}

@media (min-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr 320px;
    }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--color-surface);
    border-bottom: 3px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 8px;
}

/* Logo at flex-start (right in RTL, left in LTR), actions at flex-end */
.site-branding { flex-shrink: 0; margin-inline-end: auto; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.site-logo img {
    height: 44px;
    width: auto;
}

.site-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -.5px;
}

.site-description {
    font-size: .78rem;
    color: var(--color-muted);
    margin-top: 2px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: nowrap;
}

.main-nav a {
    display: block;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: .9rem;
    color: var(--color-text);
    transition: background var(--transition), color var(--transition);
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    background: var(--color-primary);
    color: #fff;
}

/* Hamburger – hidden on desktop */
.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--color-primary);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

@media (max-width: 767px) {
    /* Mobile: show hamburger, hide nav (opens as overlay) */
    .nav-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        right: 0;
        left: 0;
        background: var(--color-surface);
        border-bottom: 2px solid var(--color-border);
        padding: 12px 16px;
        z-index: 99;
    }

    .main-nav.open { display: block; }

    .main-nav ul { flex-direction: column; gap: 4px; }
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider {
    position: relative;
    overflow: hidden;
    height: clamp(380px, 52vw, 600px);
    background: var(--color-secondary);
    user-select: none;
}

/* ── Slides ── */
.hero-slider__track { position: relative; width: 100%; height: 100%; }

.hero-slider__slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-color: var(--color-secondary);
    opacity: 0;
    visibility: hidden;
    transition: opacity .7s ease, visibility .7s ease;
    will-change: opacity;
}

.hero-slider__slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slider__slide.leaving {
    opacity: 0;
    visibility: visible;
    z-index: 2;
    transition: opacity .7s ease;
}

/* ── Overlay gradient ── */
.hero-slider__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, .88) 0%,
        rgba(0, 0, 0, .45) 45%,
        rgba(0, 0, 0, .08) 100%
    );
}

/* ── Content ── */
.hero-slider__content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: clamp(48px, 7vw, 80px);
    z-index: 3;
}

.hero-slider__inner { max-width: 680px; color: #fff; }

.hero-slider__cat {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: .4px;
    transition: background var(--transition);
}

.hero-slider__cat:hover { background: var(--color-accent); color: #1a202c; }

.hero-slider__title {
    font-size: clamp(1.25rem, 3.2vw, 2.1rem);
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.hero-slider__title a {
    color: #fff;
    transition: color var(--transition);
}

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

.hero-slider__excerpt {
    font-size: clamp(.83rem, 1.4vw, .98rem);
    line-height: 1.75;
    opacity: .88;
    margin-bottom: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .35);
    max-width: 560px;
}

.hero-slider__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-primary);
    color: #fff;
    padding: 11px 26px;
    border-radius: 8px;
    font-weight: 700;
    font-size: .93rem;
    letter-spacing: .2px;
    box-shadow: 0 4px 18px rgba(26, 107, 60, .45);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition);
}

.hero-slider__btn:hover {
    background: #fff;
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

/* ── Navigation Arrows ── */
.hero-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .4);
    background: rgba(0, 0, 0, .25);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-slider__arrow:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.hero-slider__arrow--prev { left: 20px; }
.hero-slider__arrow--next { right: 20px; }
[dir="rtl"] .hero-slider__arrow--prev { left: auto; right: 20px; }
[dir="rtl"] .hero-slider__arrow--next { right: auto; left: 20px; }

/* ── Dots ── */
.hero-slider__dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-slider__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition), transform var(--transition), width var(--transition);
}

.hero-slider__dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

.hero-slider__dot:hover:not(.active) { background: rgba(255, 255, 255, .75); }

/* ── Counter (top-left) ── */
.hero-slider__counter {
    position: absolute;
    top: 16px;
    left: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, .4);
    color: rgba(255, 255, 255, .9);
    font-size: .78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: .5px;
    direction: ltr;
}

/* ── Progress bar inside slider ── */
.hero-slider__progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    background: var(--color-accent);
    width: 0%;
    z-index: 10;
    transition: width linear;
}

/* ── Mobile ── */
@media (max-width: 767px) {
    .hero-slider { height: clamp(300px, 70vw, 420px); }
    .hero-slider__arrow { display: none; }
    .hero-slider__excerpt { -webkit-line-clamp: 1; }
    .hero-slider__counter { display: none; }
    .hero-slider__content { padding-bottom: 48px; }
}

@media (max-width: 480px) {
    .hero-slider__excerpt { display: none; }
    .hero-slider__inner { padding: 0 4px; }
}

/* ============================================================
   CARDS - قائمة المقالات
   ============================================================ */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.post-card__thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
}

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

.post-card:hover .post-card__thumb img { transform: scale(1.04); }

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

.post-card__cat {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 30px;
    margin-bottom: 8px;
    letter-spacing: .3px;
}

.post-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.post-card__excerpt {
    font-size: .87rem;
    color: var(--color-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: .78rem;
    color: var(--color-muted);
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-post {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.single-post__hero {
    width: 100%;
    aspect-ratio: 16/7;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    display: block;
}

.single-post__content {
    padding: clamp(20px, 4vw, 40px);
}

.single-post__header { margin-bottom: 24px; }

.single-post__cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.single-post__title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    line-height: 1.4;
    color: var(--color-text);
}

.single-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 14px;
    font-size: .83rem;
    color: var(--color-muted);
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-border);
}

.single-post__body {
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--color-text);
}

.single-post__body h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 32px 0 12px;
    color: var(--color-secondary);
    padding-inline-start: 14px;
    border-inline-start: 4px solid var(--color-primary);
}

.single-post__body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 24px 0 10px;
    color: var(--color-text);
}

.single-post__body p { margin-bottom: 18px; }

.single-post__body ul,
.single-post__body ol {
    margin: 0 24px 18px 0;
}

.single-post__body li { margin-bottom: 6px; }

.single-post__body blockquote {
    border-right: 4px solid var(--color-accent);
    background: #fffbea;
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: #744210;
}

.single-post__body img {
    border-radius: var(--radius);
    margin: 20px auto;
    box-shadow: var(--shadow);
}

/* ============================================================
   ADSENSE ZONES
   ============================================================ */
.ad-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius);
    padding: 8px;
    min-height: 90px;
    overflow: hidden;
}

.ad-zone--leaderboard { min-height: 90px; }       /* 728×90 */
.ad-zone--rectangle   { min-height: 250px; }      /* 300×250 sidebar */
.ad-zone--in-article  {
    margin: 28px 0;
    min-height: 280px;
}

/* ============================================================
   SIDEBAR – BASE
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.widget {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

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

.widget-title__icon {
    color: var(--color-primary);
    flex-shrink: 0;
}

/* ============================================================
   SIDEBAR – DEFAULT WORDPRESS WIDGETS OVERRIDE
   Styles the HTML output from WP core widgets to match our theme
   ============================================================ */

/* ── Search widget ─────────────────────────────── */
.widget_search .search-form,
.widget_search form {
    display: flex;
    position: relative;
}

.widget_search .search-field,
.widget_search input[type="search"],
.widget_search input[type="text"] {
    flex: 1;
    width: 100%;
    padding: 11px 16px;
    padding-inline-end: 52px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: .9rem;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition), background var(--transition);
    -webkit-appearance: none;
}

.widget_search .search-field:focus,
.widget_search input[type="search"]:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
}

.widget_search .search-field::placeholder { color: var(--color-muted); }

.widget_search .search-submit,
.widget_search input[type="submit"] {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    width: 46px;
    background: var(--color-primary);
    border: none;
    border-start-end-radius: 8px;
    border-end-end-radius: 8px;
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
    font-family: var(--font-main);
    /* Hide text, show icon via background */
    text-indent: -9999px;
    overflow: hidden;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.widget_search .search-submit:hover,
.widget_search input[type="submit"]:hover {
    background-color: var(--color-secondary);
}

/* screen-reader label – hide visually */
.widget_search label { display: block; position: relative; flex: 1; }
.widget_search .screen-reader-text {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0,0,0,0);
}

/* ── Recent Posts widget ───────────────────────── */
.widget_recent_entries ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.widget_recent_entries ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.widget_recent_entries ul li:first-child { padding-top: 0; }
.widget_recent_entries ul li:last-child  { padding-bottom: 0; border-bottom: none; }

.widget_recent_entries ul li a {
    font-size: .9rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition);
}

.widget_recent_entries ul li a:hover { color: var(--color-primary); }

.widget_recent_entries ul li .post-date {
    font-size: .75rem;
    color: var(--color-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.widget_recent_entries ul li .post-date::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .7;
}

/* ── Recent Comments widget ────────────────────── */
.widget_recent_comments ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.widget_recent_comments ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: .85rem;
    line-height: 1.5;
    color: var(--color-text);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.widget_recent_comments ul li:first-child { padding-top: 0; }
.widget_recent_comments ul li:last-child  { padding-bottom: 0; border-bottom: none; }

/* Comment icon bullet */
.widget_recent_comments ul li::before {
    content: '';
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231a6b3c' stroke-width='2'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .8;
}

.widget_recent_comments ul li a {
    color: var(--color-primary);
    font-weight: 600;
    transition: color var(--transition);
}

.widget_recent_comments ul li a:hover { color: var(--color-secondary); }

/* ── Archive widget ─────────────────────────────── */
.widget_archive ul,
.widget_archive ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.widget_archive ul li a,
.widget_archive ol li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: .9rem;
    color: var(--color-text);
    transition: background var(--transition), color var(--transition),
                padding-inline-start var(--transition);
}

.widget_archive ul li a::before,
.widget_archive ol li a::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
    opacity: .6;
    transition: opacity var(--transition), transform var(--transition);
}

.widget_archive ul li a:hover,
.widget_archive ol li a:hover {
    background: rgba(26, 107, 60, .07);
    color: var(--color-primary);
    padding-inline-start: 16px;
}

.widget_archive ul li a:hover::before,
.widget_archive ol li a:hover::before {
    opacity: 1;
    transform: scale(1.3);
}

/* ── Categories widget ──────────────────────────── */
.widget_categories ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.widget_categories ul li {
    display: flex;
}

.widget_categories ul li a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: var(--color-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: .88rem;
    font-weight: 600;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), transform var(--transition);
    gap: 8px;
}

.widget_categories ul li a:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

html[dir="rtl"] .widget_categories ul li a:hover { transform: translateX(3px); }
html[dir="ltr"] .widget_categories ul li a:hover { transform: translateX(-3px); }

/* Post count badge (WordPress outputs it as text "(N)" — we style the whole link) */
.widget_categories ul li a::after {
    content: attr(data-count);
    font-size: .7rem;
}

/* Native WP count in parentheses — hide and rebuild with pseudo */
.widget_categories .count {
    font-size: .72rem;
    font-weight: 700;
    background: rgba(26, 107, 60, .12);
    color: var(--color-primary);
    padding: 2px 9px;
    border-radius: 20px;
    margin-inline-start: auto;
    transition: background var(--transition), color var(--transition);
}

.widget_categories ul li a:hover .count {
    background: rgba(255,255,255,.22);
    color: #fff;
}

/* Remove default WP bullet on li when inside widget */
.widget ul li { list-style: none; }

/* ── Dark mode for WP default widgets ──────────── */
@media (prefers-color-scheme: dark) {
    .widget_search .search-field,
    .widget_search input[type="search"] {
        background: #0f1117;
        border-color: #2d3748;
        color: #e2e8f0;
    }
    .widget_search .search-field:focus { border-color: var(--color-primary); }
    .widget_categories ul li a { background: #0f1117; }
    .widget_archive ul li a:hover,
    .widget_archive ol li a:hover { background: rgba(26,107,60,.12); }
}

/* ── Search widget ─────────────────────────────── */
.sb-search__wrap {
    position: relative;
    display: flex;
}

.sb-search__input {
    flex: 1;
    width: 100%;
    padding: 11px 16px;
    padding-inline-end: 48px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: .9rem;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition);
}

.sb-search__input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
}

.sb-search__input::placeholder { color: var(--color-muted); }

.sb-search__btn {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    background: var(--color-primary);
    border: none;
    border-start-end-radius: 8px;
    border-end-end-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.sb-search__btn:hover { background: var(--color-secondary); }

/* ── Recent posts list ────────────────────────── */
.rp-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rp-list__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.rp-list__item:first-child { padding-top: 0; }
.rp-list__item:last-child  { padding-bottom: 0; border-bottom: none; }

.rp-list__thumb {
    flex-shrink: 0;
    width: 76px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    transition: opacity var(--transition);
}

.rp-list__thumb:hover { opacity: .85; }

.rp-list__thumb img,
.rp-list__thumb .wcp-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: unset;
    border-radius: 8px;
}

.rp-list__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rp-list__cat {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--color-primary);
    background: rgba(26, 107, 60, .1);
    padding: 2px 8px;
    border-radius: 20px;
    align-self: flex-start;
    transition: background var(--transition), color var(--transition);
}

.rp-list__cat:hover {
    background: var(--color-primary);
    color: #fff;
}

.rp-list__title {
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rp-list__title a { color: var(--color-text); }
.rp-list__title a:hover { color: var(--color-primary); }

.rp-list__date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .74rem;
    color: var(--color-muted);
}

/* ── Recent comments list ─────────────────────── */
.rc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rc-list__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.rc-list__item:first-child { padding-top: 0; }
.rc-list__item:last-child  { padding-bottom: 0; border-bottom: none; }

.rc-list__avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    border: 2px solid var(--color-border);
}

.rc-list__body { flex: 1; min-width: 0; }

.rc-list__author {
    font-size: .82rem;
    color: var(--color-text);
    margin-bottom: 2px;
}

.rc-list__post {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .78rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.rc-list__post:hover { color: var(--color-secondary); }

.rc-list__text {
    font-size: .78rem;
    color: var(--color-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ── Categories list ──────────────────────────── */
.cats-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cats-list__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    background: var(--color-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: .88rem;
    font-weight: 600;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), transform var(--transition);
}

.cats-list__link:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

html[dir="rtl"] .cats-list__link:hover { transform: translateX(3px); }
html[dir="ltr"] .cats-list__link:hover { transform: translateX(-3px); }

.cats-list__count {
    background: rgba(26, 107, 60, .12);
    color: var(--color-primary);
    font-size: .72rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    min-width: 26px;
    text-align: center;
    transition: background var(--transition), color var(--transition);
}

.cats-list__link:hover .cats-list__count {
    background: rgba(255,255,255,.22);
    color: #fff;
}

/* ── Archive list ─────────────────────────────── */
.archive-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.archive-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: .88rem;
    color: var(--color-text);
    transition: background var(--transition), color var(--transition),
                padding-inline-start var(--transition);
}

.archive-list li a::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
    opacity: .6;
    transition: opacity var(--transition), transform var(--transition);
}

.archive-list li a:hover {
    background: rgba(26, 107, 60, .07);
    color: var(--color-primary);
    padding-inline-start: 16px;
}

.archive-list li a:hover::before { opacity: 1; transform: scale(1.3); }

/* ── Sidebar image banner ─────────────────────── */
.widget-sb-banner { padding: 0; overflow: hidden; }

.sb-image-banner {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
}

.sb-image-banner img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .4s ease;
}

.sb-image-banner:not(.sb-image-banner--static):hover img {
    transform: scale(1.04);
}

.sb-image-banner--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 28px 20px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    color: var(--color-muted);
    text-align: center;
    font-size: .8rem;
    line-height: 1.5;
    min-height: 130px;
}

/* ── Sidebar empty state ──────────────────────── */
.sidebar-empty {
    font-size: .87rem;
    color: var(--color-muted);
    text-align: center;
    padding: 8px 0;
}

/* ============================================================
   HOMEPAGE IMAGE BANNERS
   ============================================================ */
.hp-banner {
    padding: 14px 0;
}

.hp-banner--1 { padding: 20px 0 8px; }
.hp-banner--2 { padding: 8px 0 20px; }

.hp-banner__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hp-banner__link {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.hp-banner__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(0,0,0,.14);
}

.hp-banner__link img { display: block; width: 100%; height: auto; }

.hp-banner--empty .hp-banner__placeholder,
.hp-banner__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    color: var(--color-muted);
    font-size: .82rem;
    background: var(--color-bg);
    min-height: 80px;
}

@media (prefers-color-scheme: dark) {
    .hp-banner__placeholder,
    .sb-image-banner--empty { border-color: #3d4a5c; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-secondary);
    color: rgba(255,255,255,.85);
    padding: 32px 0 16px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (min-width: 600px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer-widget-title {
    font-size: .95rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.footer-bottom {
    text-align: center;
    font-size: .8rem;
    opacity: .7;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.15);
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
    font-size: .82rem;
    color: var(--color-muted);
    padding: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.breadcrumbs span { display: flex; align-items: center; gap: 6px; }
.breadcrumbs a { color: var(--color-primary); }

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
.reading-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--color-accent);
    width: 0%;
    z-index: 9999;
    transition: width .1s linear;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary { color: var(--color-primary); }
.text-accent  { color: var(--color-accent); }
.font-bold    { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* ============================================================
   DARK MODE (تلقائي حسب إعدادات الجهاز)
   ============================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg:      #0f1117;
        --color-surface: #1a1d27;
        --color-border:  #2d3748;
        --color-text:    #e2e8f0;
        --color-muted:   #a0aec0;
    }
    /* Slider stays dark by design — no overrides needed */
    .hero-slider__title a,
    .hero-slider__btn   { color: #fff; }

    /* Sidebar widgets in dark mode */
    .sb-search__input {
        background: #0f1117;
        border-color: #2d3748;
        color: #e2e8f0;
    }
    .sb-search__input:focus { border-color: var(--color-primary); }

    .cats-list__link { background: #0f1117; }
    .rp-list__cat    { background: rgba(26,107,60,.18); }

    /* Homepage banners placeholder */
    .hp-banner__placeholder,
    .sb-image-banner--empty {
        border-color: #2d3748;
        background: #0f1117;
    }
}

/* ============================================================
   PLACEHOLDER IMAGE
   ============================================================ */
.wcp-placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.wcp-placeholder span {
    color: rgba(255, 255, 255, .75);
    font-size: .9rem;
    font-weight: 700;
    text-align: center;
    padding: 0 16px;
    line-height: 1.5;
}

.wcp-placeholder--hero {
    min-height: 320px;
    font-size: 1.1rem;
    border-radius: var(--radius) var(--radius) 0 0;
}

.wcp-placeholder--page {
    min-height: 180px;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.related-posts {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--color-border);
}

.related-posts__title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-posts__title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.2em;
    background: var(--color-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .related-posts__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   POST NAVIGATION
   ============================================================ */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    min-width: 0;
}

.post-navigation .nav-next { text-align: left; }

.post-navigation a {
    display: block;
    padding: 12px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 600;
    color: var(--color-text);
    transition: border-color var(--transition), background var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-navigation a:hover {
    border-color: var(--color-primary);
    background: #f0faf4;
    color: var(--color-primary);
}

/* ============================================================
   PAGE LAYOUT
   ============================================================ */
.content-area--page {
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .content-area--page {
        grid-template-columns: 1fr 320px;
    }
}

.page-article .single-post__meta.page-meta {
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 16px;
}

.page-body {
    min-height: 200px;
}

.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: .95rem;
}

.page-body th,
.page-body td {
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    text-align: right;
}

.page-body th {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

.page-body tr:nth-child(even) td {
    background: #f7fafc;
}

.page-links {
    margin: 24px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: .9rem;
}

.page-links a,
.page-links span {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.page-links a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(20px, 4vw, 36px);
    margin-top: 28px;
}

.comments-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    background: var(--color-bg);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.comment-author .fn { font-weight: 700; font-size: .95rem; }
.comment-metadata { font-size: .78rem; color: var(--color-muted); margin-top: 4px; }
.comment-content { margin-top: 10px; font-size: .93rem; line-height: 1.7; }

.comment-form label {
    display: block;
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: .93rem;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition);
    margin-bottom: 14px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.comment-form input[type="submit"],
.comment-form .submit {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
}

.comment-form input[type="submit"]:hover { background: var(--color-secondary); }

/* ============================================================
   PAGINATION
   ============================================================ */
.posts-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.posts-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-surface);
    transition: all var(--transition);
}

.posts-pagination .page-numbers:hover,
.posts-pagination .page-numbers.current {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.posts-pagination .prev,
.posts-pagination .next {
    width: auto;
    padding: 0 16px;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.error-404-wrap {
    text-align: center;
    padding: clamp(40px, 8vw, 80px) 20px;
    max-width: 720px;
    margin: 0 auto;
}

.error-404__icon {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 16px;
}

.error-404__code {
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.error-404__title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 12px;
}

.error-404__desc {
    font-size: 1rem;
    color: var(--color-muted);
    margin-bottom: 28px;
    line-height: 1.8;
}

.error-404__search {
    max-width: 480px;
    margin: 0 auto 28px;
}

.error-404__search-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-muted);
    font-size: .9rem;
}

.error-404__actions {
    margin-bottom: 48px;
}

.error-404__recent {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--color-border);
    text-align: right;
}

.error-404__recent-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 20px;
}

/* ============================================================
   SEARCH FORM (global)
   ============================================================ */
.search-form {
    display: flex;
    gap: 8px;
}

.search-form label { flex: 1; }

.search-form .search-field {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: .95rem;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition);
    /* direction inherited from html[dir] */
}

.search-form .search-field:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-form .search-submit {
    padding: 10px 20px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition);
}

.search-form .search-submit:hover { background: var(--color-secondary); }

/* ============================================================
   ARCHIVE HEADER
   ============================================================ */
.archive-header {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 28px;
    margin-bottom: 24px;
    border-right: 4px solid var(--color-primary);
}

.archive-header__title {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 900;
    color: var(--color-text);
    margin: 8px 0 6px;
}

.archive-header__desc {
    font-size: .93rem;
    color: var(--color-muted);
    line-height: 1.7;
    margin-top: 6px;
}

.archive-header__count {
    display: inline-block;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2px 12px;
    font-size: .78rem;
    color: var(--color-muted);
    margin-top: 10px;
}

.archive-header__cat-badge { margin-bottom: 4px; }

.archive-header__author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.archive-header__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    flex-shrink: 0;
}

/* ============================================================
   CATEGORY BANNER
   ============================================================ */
.category-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #fff;
    padding: 40px 16px;
    margin-bottom: 8px;
}

.category-banner__label {
    display: inline-block;
    background: rgba(255, 255, 255, .2);
    border-radius: 20px;
    padding: 2px 14px;
    font-size: .8rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: .5px;
}

.category-banner__title {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    font-weight: 900;
    margin-bottom: 8px;
}

.category-banner__desc {
    font-size: .95rem;
    opacity: .85;
    max-width: 560px;
    line-height: 1.7;
}

.category-banner__count {
    display: inline-block;
    background: rgba(255, 255, 255, .2);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: .82rem;
    margin-top: 12px;
}

/* ============================================================
   NO RESULTS
   ============================================================ */
.no-results {
    text-align: center;
    padding: 60px 24px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.no-results__icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.no-results__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 10px;
}

.no-results__desc {
    font-size: .95rem;
    color: var(--color-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* ============================================================
   BUTTON PRIMARY (shared)
   ============================================================ */
.btn-primary {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .95rem;
    transition: background var(--transition), transform var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--color-secondary);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================================
   COMMENTS — TEMPLATE STYLES
   ============================================================ */
.comment-item {
    list-style: none;
    margin-bottom: 16px;
}

.comment-item .children {
    padding-right: 32px;
    list-style: none;
    margin-top: 12px;
}

.comment-author-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.comment-avatar__img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    flex-shrink: 0;
}

.comment-author-info {
    flex: 1;
    min-width: 0;
}

.comment-author-name {
    display: block;
    font-weight: 700;
    font-size: .95rem;
    color: var(--color-text);
}

.comment-time {
    display: block;
    font-size: .78rem;
    color: var(--color-muted);
    margin-top: 2px;
}

.comment-reply {
    margin-right: auto;
}

.comment-reply-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--color-primary);
    padding: 4px 12px;
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    transition: all var(--transition);
    white-space: nowrap;
}

.comment-reply-link:hover {
    background: var(--color-primary);
    color: #fff;
}

.comment-awaiting-moderation {
    font-size: .82rem;
    color: var(--color-accent);
    background: #fffbea;
    padding: 6px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.comment-reply-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-secondary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
}

.comment-notes {
    font-size: .83rem;
    color: var(--color-muted);
    margin-bottom: 16px;
}

.comment-password-notice {
    padding: 16px 20px;
    background: #fffbea;
    border-right: 4px solid var(--color-accent);
    border-radius: var(--radius);
    font-size: .93rem;
}

.comments-pagination {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.comments-pagination .page-numbers {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .88rem;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-surface);
    transition: all var(--transition);
}

.comments-pagination .page-numbers.current,
.comments-pagination .page-numbers:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.comment-submit-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition);
}

.comment-submit-btn:hover { background: var(--color-secondary); }

.posts-grid--sm .post-card__title { font-size: .92rem; }

/* ============================================================
   FOOTER LEGAL NAV
   ============================================================ */
.footer-legal-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin-bottom: 14px;
}

.footer-legal-nav a {
    color: rgba(255, 255, 255, .75);
    font-size: .82rem;
    font-weight: 600;
    transition: color var(--transition);
    position: relative;
}

.footer-legal-nav a:hover { color: #fff; }

.footer-legal-nav a + a::before {
    content: '·';
    position: absolute;
    right: -13px;
    color: rgba(255, 255, 255, .3);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-intro {
    color: var(--color-muted);
    font-size: .97rem;
    line-height: 1.8;
    margin-top: 8px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-border);
}

.contact-notice {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: .93rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-notice--success {
    background: #f0faf4;
    border: 1px solid #68d391;
    color: #276749;
}

.contact-notice--success::before { content: '✅'; }

.contact-notice--error {
    background: #fff5f5;
    border: 1px solid #fc8181;
    color: #c53030;
}

.contact-notice--error::before { content: '⚠️'; }

.contact-form {
    margin-top: 24px;
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .contact-form__row { grid-template-columns: 1fr 1fr; }
}

.contact-form__group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.contact-form__label {
    font-weight: 700;
    font-size: .88rem;
    color: var(--color-text);
}

.contact-form__label .required { color: var(--color-primary); margin-right: 2px; }

.contact-form__input {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: .95rem;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    /* direction inherited from html[dir] */
}

.contact-form__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 107, 60, .12);
}

.contact-form__textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.7;
}

.contact-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.contact-form__privacy {
    font-size: .8rem;
    color: var(--color-muted);
    flex: 1;
    min-width: 200px;
}

.contact-form__privacy a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.contact-form__submit {
    flex-shrink: 0;
}

.contact-success-block {
    text-align: center;
    padding: 48px 24px;
}

.contact-success-block__icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
}

.contact-success-block h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 10px;
}

.contact-success-block p {
    color: var(--color-muted);
    margin-bottom: 24px;
}

.contact-info-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 2px solid var(--color-border);
}

@media (min-width: 600px) {
    .contact-info-row { grid-template-columns: repeat(3, 1fr); }
}

.contact-info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 16px;
}

.contact-info-card__icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.contact-info-card strong {
    display: block;
    font-size: .82rem;
    color: var(--color-muted);
    margin-bottom: 2px;
}

.contact-info-card span {
    display: block;
    font-size: .93rem;
    font-weight: 700;
    color: var(--color-text);
}

/* ============================================================
   PRIVACY POLICY PAGE STYLING
   ============================================================ */
.page-article .single-post__body {
    max-width: 820px;
}

.page-article .single-post__body h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
    font-weight: 800;
    color: var(--color-secondary);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-right: 12px;
    border-right: 4px solid var(--color-primary);
}

.page-article .single-post__body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 20px;
    margin-bottom: 10px;
}

.page-article .single-post__body p {
    font-size: .95rem;
    line-height: 1.85;
    margin-bottom: 14px;
    color: #2d3748;
}

.page-article .single-post__body ul,
.page-article .single-post__body ol {
    margin: 16px 0 16px 32px;
    padding: 0;
}

.page-article .single-post__body li {
    margin-bottom: 8px;
    line-height: 1.75;
    font-size: .94rem;
    color: #2d3748;
}

.page-article .single-post__body a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-article .single-post__body a:hover {
    color: var(--color-accent);
}

.page-article .single-post__body strong {
    font-weight: 700;
    color: var(--color-text);
}

.privacy-notice {
    background: linear-gradient(135deg, #f0faf4 0%, #e8f5f0 100%);
    border-right: 4px solid var(--color-primary);
    padding: 20px 24px;
    border-radius: var(--radius);
    margin: 24px 0 32px;
    font-size: .93rem;
    line-height: 1.8;
}

.privacy-notice h3 {
    margin: 0 0 12px;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.privacy-notice p {
    margin: 0;
    color: var(--color-text);
}

/* ============================================================
   BILINGUAL SUPPORT — Language Switcher (single toggle button)
   Desktop: far end of nav bar  |  Mobile: beside hamburger
   ============================================================ */
.lang-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 6px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .5px;
    border: none;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity var(--transition);
}
.lang-btn:hover { opacity: .7; }

/* ============================================================
   BILINGUAL SUPPORT — LTR Overrides
   All RTL-specific physical properties get swapped for LTR.
   ============================================================ */

/* Search field direction */
html[dir="ltr"] .search-form .search-field {
    direction: ltr;
}

/* Contact form inputs direction */
html[dir="ltr"] .contact-form__input {
    direction: ltr;
}

/* Required asterisk spacing */
html[dir="ltr"] .contact-form__label .required {
    margin-right: 0;
    margin-left: 2px;
}

/* Nested comment indentation */
html[dir="ltr"] .comment-item .children {
    padding-right: 0;
    padding-left: 32px;
}

/* Comment reply button alignment */
html[dir="ltr"] .comment-reply {
    margin-right: 0;
    margin-left: auto;
}

/* Comment password notice border side */
html[dir="ltr"] .comment-password-notice {
    border-right: none;
    border-left: 4px solid var(--color-accent);
}

/* Archive header accent border */
html[dir="ltr"] .archive-header {
    border-right: none;
    border-left: 4px solid var(--color-primary);
}

/* Privacy notice accent border */
html[dir="ltr"] .privacy-notice {
    border-right: none;
    border-left: 4px solid var(--color-primary);
}

/* Page article h2 accent border */
html[dir="ltr"] .page-article .single-post__body h2 {
    padding-right: 0;
    padding-left: 12px;
    border-right: none;
    border-left: 4px solid var(--color-primary);
}

/* Footer legal nav bullet separator */
html[dir="ltr"] .footer-legal-nav a + a::before {
    right: auto;
    left: -13px;
}

/* 404 recent posts text alignment */
html[dir="ltr"] .error-404__recent {
    text-align: left;
}

/* Breadcrumbs separator */
html[dir="ltr"] .breadcrumbs .sep {
    transform: scaleX(-1);
}

/* Post navigation arrows */
html[dir="ltr"] .post-navigation .nav-previous a::before { content: '\2190\00a0'; }
html[dir="ltr"] .post-navigation .nav-next    a::after  { content: '\00a0\2192'; }

/* Sidebar widget border accent (if any use border-right) */
html[dir="ltr"] .widget-title {
    border-right: none;
}

/* Reading progress bar — stays at top regardless of direction */
html[dir="ltr"] .reading-progress {
    left: 0;
    right: auto;
}

/* ============================================================
   LTR — Typography adjustments for Inter font
   ============================================================ */
html[dir="ltr"] body {
    letter-spacing: -.01em;
    line-height: 1.7;
}

html[dir="ltr"] .site-title,
html[dir="ltr"] .post-card__title,
html[dir="ltr"] .single-post__title {
    letter-spacing: -.02em;
}

/* ============================================================
   DARK MODE — bilingual compatible (no changes needed;
   dark mode uses CSS variables which already switch correctly)
   ============================================================ */

/* ╔══════════════════════════════════════════════════════════╗
   ║          REDESIGN v2 — ANIMATIONS + FULL SIDEBAR         ║
   ╚══════════════════════════════════════════════════════════╝ */

/* ── Keyframes ─────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

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

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .55; transform: scale(1.4); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(18px); }
    to   { opacity: 1; transform: translateX(0); }
}

html[dir="rtl"] @keyframes slideInRight {
    from { transform: translateX(-18px); }
    to   { transform: translateX(0); }
}

/* ─────────────────────────────────────────────────────────
   BREAKING NEWS TICKER
   ───────────────────────────────────────────────────────── */
.news-ticker {
    background: linear-gradient(90deg, var(--color-secondary) 0%, #0f2850 100%);
    color: #fff;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    height: 42px;
    border-bottom: 2px solid var(--color-primary);
}

.news-ticker__badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    background: var(--color-primary);
    padding: 0 18px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
    padding-inline-end: 26px;
}

html[dir="rtl"] .news-ticker__badge {
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
    padding-inline-end: 18px;
    padding-inline-start: 26px;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    animation: pulse-dot 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

.news-ticker__wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.news-ticker__track {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.news-ticker__track span {
    display: inline-block;
    animation: ticker-move 35s linear infinite;
    font-size: .85rem;
    white-space: nowrap;
}

.news-ticker__track a {
    color: rgba(255,255,255,.92);
    font-weight: 600;
    transition: color var(--transition);
    margin: 0 4px;
}

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

.ticker-ball { color: var(--color-accent); }

html[dir="rtl"] .news-ticker__track span {
    animation-direction: reverse;
}

/* ─────────────────────────────────────────────────────────
   SECTION HEADER
   ───────────────────────────────────────────────────────── */
.section-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.section-hdr--posts { margin-top: 24px; }

.section-hdr__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--color-text);
    letter-spacing: -.02em;
}

.section-hdr__bar {
    display: inline-block;
    width: 4px;
    height: 22px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-accent));
    border-radius: 4px;
    flex-shrink: 0;
}

.section-hdr__more {
    font-size: .82rem;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
    padding: 6px 14px;
    border: 1.5px solid var(--color-primary);
    border-radius: 20px;
    transition: background var(--transition), color var(--transition);
}

.section-hdr__more:hover {
    background: var(--color-primary);
    color: #fff;
}

/* ─────────────────────────────────────────────────────────
   FEATURED SECTION
   ───────────────────────────────────────────────────────── */
.featured-section {
    margin-top: 24px;
    margin-bottom: 28px;
    animation: fadeInUp .6s ease both;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .featured-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 220px 220px;
    }
    .featured-card--big {
        grid-row: 1 / span 2;
    }
}

@media (min-width: 900px) {
    .featured-grid {
        grid-template-columns: 7fr 5fr;
        grid-template-rows: 210px 210px;
    }
}

.featured-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--color-secondary);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    min-height: 200px;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeIn .7s ease both;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,.25);
}

.featured-card:nth-child(2) { animation-delay: .1s; }
.featured-card:nth-child(3) { animation-delay: .2s; }

.featured-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.9)   0%,
        rgba(0,0,0,.5)  45%,
        rgba(0,0,0,.08) 100%
    );
    transition: opacity var(--transition);
}

.featured-card:hover .featured-card__overlay {
    opacity: .85;
}

.featured-card__body {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    padding: 18px 20px;
    z-index: 2;
    color: #fff;
}

.featured-card--big .featured-card__body { padding: 24px 28px; }

.featured-card__cat {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    transition: background var(--transition);
}

.featured-card__cat:hover { background: var(--color-accent); color: #1a202c; }

.featured-card__title {
    font-size: .95rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 6px;
}

.featured-card--big .featured-card__title {
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
}

.featured-card__title a { color: #fff; transition: color var(--transition); }
.featured-card__title a:hover { color: var(--color-accent); }

.featured-card__excerpt {
    font-size: .85rem;
    opacity: .82;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card__date {
    font-size: .74rem;
    opacity: .7;
    display: flex;
    align-items: center;
    gap: 4px;
}

.featured-card__date::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-accent);
}

/* No-image fallback: show gradient */
.featured-card:not([style*="background-image"]) {
    background: linear-gradient(135deg, var(--color-secondary) 0%, #0a2040 100%);
}

/* ─────────────────────────────────────────────────────────
   ARCHIVE HEADER (category/tag/search pages)
   ───────────────────────────────────────────────────────── */
.archive-header {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-inline-start: 4px solid var(--color-primary);
}

.archive-header__title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-secondary);
}

.archive-header__desc {
    color: var(--color-muted);
    margin-top: 6px;
    font-size: .9rem;
}

/* ─────────────────────────────────────────────────────────
   NO POSTS STATE
   ───────────────────────────────────────────────────────── */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.no-posts__icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

.no-posts p { color: var(--color-muted); font-size: 1rem; }

/* ─────────────────────────────────────────────────────────
   SIDEBAR WIDGETS — sw- prefix (always rendered, no WP dep)
   ───────────────────────────────────────────────────────── */

/* Search */
.sw-search__form {
    position: relative;
    display: flex;
}

.sw-search__input {
    flex: 1;
    width: 100%;
    padding: 11px 16px;
    padding-inline-end: 50px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: .9rem;
    background: var(--color-bg);
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
}

.sw-search__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26,107,60,.12);
    background: var(--color-surface);
}

.sw-search__input::placeholder { color: var(--color-muted); }

.sw-search__btn {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
    bottom: 0;
    width: 46px;
    background: var(--color-primary);
    border: none;
    border-start-end-radius: 8px;
    border-end-end-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition), transform var(--transition);
}

.sw-search__btn:hover {
    background: var(--color-secondary);
    transform: scale(1.05);
}

/* Recent posts */
.sw-recent__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sw-recent__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    animation: fadeInUp .5s ease both;
}

.sw-recent__item:first-child { padding-top: 2px; }
.sw-recent__item:last-child  { padding-bottom: 2px; border-bottom: none; }

.sw-recent__num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: var(--color-primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.sw-recent__item:nth-child(1) .sw-recent__num { background: #f0b429; color: #1a202c; }
.sw-recent__item:nth-child(2) .sw-recent__num { background: #a0aec0; color: #1a202c; }
.sw-recent__item:nth-child(3) .sw-recent__num { background: #c05621; }

.sw-recent__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 58px;
    border-radius: 7px;
    overflow: hidden;
    display: block;
    transition: opacity var(--transition), transform var(--transition);
}

.sw-recent__thumb:hover { opacity: .85; transform: scale(1.03); }

.sw-recent__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 7px;
    display: block;
}

.sw-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.sw-recent__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sw-recent__cat {
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--color-primary);
    background: rgba(26,107,60,.1);
    padding: 2px 7px;
    border-radius: 20px;
    align-self: flex-start;
    transition: all var(--transition);
}

.sw-recent__cat:hover {
    background: var(--color-primary);
    color: #fff;
}

.sw-recent__title {
    font-size: .87rem;
    font-weight: 700;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sw-recent__title a { color: var(--color-text); transition: color var(--transition); }
.sw-recent__title a:hover { color: var(--color-primary); }

.sw-recent__date {
    font-size: .73rem;
    color: var(--color-muted);
}

/* Recent comments */
.sw-comments__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sw-comments__item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 11px 0;
    border-bottom: 1px solid var(--color-border);
    animation: fadeInUp .5s ease both;
}

.sw-comments__item:first-child { padding-top: 2px; }
.sw-comments__item:last-child  { padding-bottom: 2px; border-bottom: none; }

.sw-comments__avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    flex-shrink: 0;
    border: 2px solid var(--color-border);
    transition: border-color var(--transition);
}

.sw-comments__item:hover .sw-comments__avatar { border-color: var(--color-primary); }

.sw-comments__body { flex: 1; min-width: 0; }

.sw-comments__author {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 2px;
}

.sw-comments__post {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .77rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 3px;
    transition: color var(--transition);
}

.sw-comments__post:hover { color: var(--color-secondary); }

.sw-comments__text {
    font-size: .77rem;
    color: var(--color-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.45;
}

/* Categories */
.sw-cats__list { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.sw-cats__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--color-bg);
    border-radius: 8px;
    border: 1.5px solid var(--color-border);
    color: var(--color-text);
    font-size: .88rem;
    font-weight: 600;
    transition: background var(--transition), color var(--transition),
                border-color var(--transition), transform var(--transition),
                box-shadow var(--transition);
    gap: 8px;
}

.sw-cats__link:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 14px rgba(26,107,60,.3);
}

html[dir="rtl"] .sw-cats__link:hover { transform: translateX(4px); }
html[dir="ltr"] .sw-cats__link:hover { transform: translateX(-4px); }

.sw-cats__count {
    background: rgba(26,107,60,.13);
    color: var(--color-primary);
    font-size: .7rem;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 20px;
    min-width: 26px;
    text-align: center;
    transition: background var(--transition), color var(--transition);
}

.sw-cats__link:hover .sw-cats__count { background: rgba(255,255,255,.22); color: #fff; }

/* Archive */
.sw-archive__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.sw-archive__list li a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: .88rem;
    color: var(--color-text);
    transition: background var(--transition), color var(--transition),
                padding-inline-start var(--transition);
}

.sw-archive__list li a::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
    opacity: .55;
    transition: opacity var(--transition), transform var(--transition);
}

.sw-archive__list li a:hover {
    background: rgba(26,107,60,.07);
    color: var(--color-primary);
    padding-inline-start: 16px;
}

.sw-archive__list li a:hover::before { opacity: 1; transform: scale(1.4); }

/* Sidebar banner */
.sw-banner { padding: 0; overflow: hidden; }

.sw-banner__link {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
}

.sw-banner__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    transition: transform .4s ease;
}

.sw-banner__link:hover .sw-banner__img { transform: scale(1.04); }
.sw-banner__img--static { border-radius: var(--radius); }

.sw-banner__empty {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 140px;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    border: 2px dashed var(--color-border);
    background: var(--color-bg);
}

.sw-banner__shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,.06) 50%,
        transparent 100%
    );
    background-size: 400px 100%;
    animation: shimmer 2.2s linear infinite;
}

.sw-banner__empty-label {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    color: var(--color-muted);
    line-height: 1.4;
}

/* Empty state */
.sw-empty {
    font-size: .87rem;
    color: var(--color-muted);
    text-align: center;
    padding: 6px 0;
}

/* ─────────────────────────────────────────────────────────
   HOMEPAGE BANNERS (hp-banner)
   ───────────────────────────────────────────────────────── */
.hp-banner { padding: 12px 0; }
.hp-banner--1 { padding: 16px 0 8px; }
.hp-banner--2 { padding: 8px 0 16px; }

.hp-banner__img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hp-banner__link {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.hp-banner__link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
}

.hp-banner__link img { display: block; width: 100%; height: auto; }

.hp-banner__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 20px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    color: var(--color-muted);
    font-size: .8rem;
    background: var(--color-bg);
    min-height: 72px;
}

/* ─────────────────────────────────────────────────────────
   DARK MODE — new components
   ───────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    .sw-search__input {
        background: #0f1117;
        border-color: #2d3748;
        color: #e2e8f0;
    }
    .sw-search__input:focus {
        border-color: var(--color-primary);
        background: #1a1d27;
        box-shadow: 0 0 0 3px rgba(26,107,60,.2);
    }
    .sw-cats__link { background: #0f1117; }
    .sw-archive__list li a:hover { background: rgba(26,107,60,.12); }
    .sw-banner__empty { border-color: #2d3748; background: #0f1117; }
    .hp-banner__placeholder { border-color: #2d3748; background: #0f1117; }
    .featured-card:not([style*="background-image"]) {
        background: linear-gradient(135deg, #1a1d27 0%, #0a1628 100%);
    }
    .sw-recent__cat { background: rgba(26,107,60,.2); }
    .news-ticker { border-bottom-color: var(--color-primary); }
    .section-hdr { border-bottom-color: #2d3748; }
    .archive-header { background: #1a1d27; }
}
