/* ===== FONT ===== */
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('/fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

/* ===== ROOT & RESET ===== */
:root {
    --brand-primary: #0A2342;
    --brand-secondary: #C0392B;
    --brand-accent: #2C3E50;
    --brand-light: #F4F5F7;
    --brand-border: #E0E4E8;
    --brand-white: #FFFFFF;
    --brand-text-muted: #6B7280;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --radius: 6px;
    --font-main: 'Vazirmatn', 'Tahoma', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background-color: var(--brand-white);
    color: var(--brand-accent);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
a:hover { color: var(--brand-secondary); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* ===== TOP BAR ===== */
.top-bar { background-color: var(--brand-primary); color: rgba(255,255,255,0.85); padding: 8px 0; font-size: 13px; }
.top-bar__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.top-bar__social { display: flex; gap: 12px; }
.top-bar__social a { color: rgba(255,255,255,0.7); font-size: 14px; transition: color 0.2s; }
.top-bar__social a:hover { color: var(--brand-white); }
.top-bar__datetime { font-size: 13px; color: rgba(255,255,255,0.8); display: flex; align-items: center; gap: 6px; }

/* ===== HEADER MAIN ===== */
.header-main { background-color: var(--brand-white); border-bottom: 1px solid var(--brand-border); padding: 16px 0; }
.header-main__inner { display: flex; justify-content: space-between; align-items: center; }
.header-main__brand { display: flex; align-items: center; gap: 12px; }
.header-main__logo { font-size: 32px; font-weight: 900; color: var(--brand-primary); letter-spacing: -1px; line-height: 1; }
.header-main__tagline { font-size: 12px; color: var(--brand-text-muted); border-right: 2px solid var(--brand-secondary); padding-right: 12px; line-height: 1.4; white-space: pre-line; }
.header-main__ad { background-color: var(--brand-light); border: 1px dashed var(--brand-border); padding: 10px 30px; border-radius: var(--radius); color: var(--brand-text-muted); font-size: 13px; text-align: center; min-width: 200px; }

/* ===== SEARCH BAR ===== */
.search-bar { background-color: var(--brand-light); border-bottom: 1px solid var(--brand-border); padding: 10px 0; }
.search-bar__inner { display: flex; justify-content: center; }
.search-bar__form { display: flex; width: 100%; max-width: 600px; background: var(--brand-white); border: 1px solid var(--brand-border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; }
.search-bar__form:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(10,35,66,0.1); }
.search-bar__input { flex: 1; border: none; outline: none; padding: 10px 16px; font-family: var(--font-main); font-size: 14px; background: transparent; }
.search-bar__button { background-color: var(--brand-primary); color: var(--brand-white); border: none; padding: 0 20px; cursor: pointer; font-size: 16px; transition: background-color 0.2s; }
.search-bar__button:hover { background-color: var(--brand-secondary); }

/* ===== NAVIGATION ===== */
.main-nav { background-color: var(--brand-white); border-bottom: 2px solid var(--brand-primary); position: sticky; top: 0; z-index: 1000; box-shadow: var(--shadow-sm); }
.main-nav__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 0; }
.main-nav__item a { display: block; padding: 14px 20px; font-size: 14px; font-weight: 700; color: var(--brand-accent); text-transform: uppercase; letter-spacing: 0.5px; position: relative; transition: color 0.2s; }
.main-nav__item a::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 3px; background-color: var(--brand-secondary); transition: width 0.3s ease; }
.main-nav__item a:hover { color: var(--brand-primary); }
.main-nav__item a:hover::after { width: 60%; }
.main-nav__item--active a { color: var(--brand-primary); }
.main-nav__item--active a::after { width: 60%; }

/* ===== MAIN CONTENT ===== */
.main-content { padding: 24px 0 40px; }
.content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }

/* ===== NEWS TICKER ===== */
.news-ticker {
    background-color: var(--brand-primary);
    color: var(--brand-white);
    border-radius: var(--radius);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}
.news-ticker__label {
    background-color: var(--brand-secondary);
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 2;
}
.news-ticker__viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.news-ticker__track {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    width: max-content;
}

.news-ticker--rtl .news-ticker__track {
    animation: tickerRTL 40s linear infinite;
}

.news-ticker--ltr .news-ticker__track {
    animation: tickerLTR 40s linear infinite;
}
.news-ticker__item {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    padding-right: 40px;
    flex-shrink: 0;
}
.news-ticker__item::before {
    content: '●';
    color: var(--brand-secondary);
    margin-left: 10px;
    font-size: 8px;
    vertical-align: middle;
}
@keyframes tickerRTL {
    0%   { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

@keyframes tickerLTR {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* ===== HERO SECTION ===== */
.hero-section { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--brand-border); }
.hero-card { position: relative; border-radius: var(--radius); overflow: hidden; background-color: var(--brand-light); min-height: 400px; }
.hero-card__image { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.hero-card__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,35,66,0.95) 0%, rgba(10,35,66,0.4) 50%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; }
.hero-card__tag { display: inline-block; background-color: var(--brand-secondary); color: var(--brand-white); padding: 4px 12px; border-radius: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; align-self: flex-start; }
.hero-card__title { color: var(--brand-white); font-size: 24px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.hero-card__meta { color: rgba(255,255,255,0.7); font-size: 13px; }

/* ===== SIDEBAR HERO ===== */
.hero-sidebar { display: flex; flex-direction: column; gap: 16px; }
.hero-sidebar__item { background: var(--brand-white); border: 1px solid var(--brand-border); border-radius: var(--radius); padding: 16px; transition: box-shadow 0.2s; }
.hero-sidebar__item:hover { box-shadow: var(--shadow-md); }
.hero-sidebar__title { font-size: 15px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; }
.hero-sidebar__meta { font-size: 12px; color: var(--brand-text-muted); }
.hero-sidebar__ad { background-color: var(--brand-light); border: 1px dashed var(--brand-border); border-radius: var(--radius); padding: 20px; text-align: center; color: var(--brand-text-muted); font-size: 13px; min-height: 120px; display: flex; align-items: center; justify-content: center; }

/* ===== SECTION TITLE ===== */
.section-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--brand-primary); }
.section-title__text { font-size: 18px; font-weight: 800; color: var(--brand-primary); }
.section-title__line { flex: 1; height: 2px; background: linear-gradient(to left, var(--brand-primary), transparent); }

/* ===== MINI NEWS BOX ===== */
.mini-news { margin: 0 0 28px; padding-bottom: 28px; border-bottom: 1px solid var(--brand-border); }
.mini-news__card { display: flex; align-items: stretch; gap: 0; background: var(--brand-white); border: 1px solid var(--brand-border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.mini-news__card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.mini-news__image { width: 220px; height: 130px; object-fit: cover; flex-shrink: 0; background-color: var(--brand-light); display: block; }
.mini-news__body { padding: 16px 20px; display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0; }
.mini-news__tag { display: inline-block; align-self: flex-start; background-color: var(--brand-secondary); color: var(--brand-white); padding: 3px 12px; border-radius: 3px; font-size: 11px; font-weight: 700; margin-bottom: 8px; }
.mini-news__title { font-size: 17px; font-weight: 700; line-height: 1.5; color: var(--brand-accent); margin-bottom: 8px; }
.mini-news__meta { font-size: 12px; color: var(--brand-text-muted); display: flex; align-items: center; gap: 6px; }
@media (max-width: 768px) {
    .mini-news__card { flex-direction: column; }
    .mini-news__image { width: 100%; height: 180px; }
    .mini-news__body { padding: 14px 16px; }
    .mini-news__title { font-size: 15px; }
}

/* ===== SECOND HERO ===== */
.second-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--brand-border); }
.second-hero__card { position: relative; border-radius: var(--radius); overflow: hidden; background-color: var(--brand-light); min-height: 320px; transition: transform 0.2s; }
.second-hero__card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.second-hero__image { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.second-hero__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,35,66,0.95) 0%, rgba(10,35,66,0.5) 40%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.second-hero__tag { display: inline-block; background-color: var(--brand-secondary); color: var(--brand-white); padding: 4px 12px; border-radius: 3px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; align-self: flex-start; }
.second-hero__title { color: var(--brand-white); font-size: 20px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.second-hero__excerpt { color: rgba(255,255,255,0.85); font-size: 13px; line-height: 1.6; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.second-hero__meta { color: rgba(255,255,255,0.7); font-size: 12px; }
.second-hero__sidebar { display: flex; flex-direction: column; gap: 16px; }
.second-hero__mini-card { background: var(--brand-white); border: 1px solid var(--brand-border); border-radius: var(--radius); padding: 16px; display: block; transition: box-shadow 0.2s; }
.second-hero__mini-card:hover { box-shadow: var(--shadow-md); }
.second-hero__mini-image { width: 80px; height: 80px; border-radius: var(--radius); object-fit: cover; flex-shrink: 0; background-color: var(--brand-light); }
.second-hero__mini-content { flex: 1; }
.second-hero__mini-tag { display: inline-block; background-color: var(--brand-light); color: var(--brand-primary); padding: 2px 8px; border-radius: 3px; font-size: 10px; font-weight: 700; margin-bottom: 6px; }
.second-hero__mini-title { font-size: 14px; font-weight: 700; line-height: 1.5; margin-bottom: 4px; }
.second-hero__mini-meta { font-size: 11px; color: var(--brand-text-muted); }

/* ===== CATEGORY BOXES ===== */
.category-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 28px 0; }
.category-box { background: var(--brand-white); border: 1px solid var(--brand-border); border-radius: var(--radius); overflow: hidden; text-align: center; transition: box-shadow 0.2s, border-color 0.2s; cursor: pointer; }
.category-box:hover { box-shadow: var(--shadow-md); border-color: var(--brand-primary); }
.category-box__image { width: 100%; height: 120px; object-fit: cover; background-color: var(--brand-light); }
.category-box__label { padding: 12px; font-size: 14px; font-weight: 700; color: var(--brand-primary); text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== NEWS GRID ===== */
.news-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.news-card { background: var(--brand-white); border: 1px solid var(--brand-border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; }
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.news-card__image { width: 100%; height: 180px; object-fit: cover; background-color: var(--brand-light); }
.news-card__body { padding: 16px; }
.news-card__tag { display: inline-block; background-color: var(--brand-light); color: var(--brand-primary); padding: 3px 10px; border-radius: 3px; font-size: 11px; font-weight: 700; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.3px; }
.news-card__tag--red { background-color: var(--brand-secondary); color: var(--brand-white); }
.news-card__title { font-size: 16px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; color: var(--brand-accent); }
.news-card__excerpt { font-size: 13px; color: var(--brand-text-muted); line-height: 1.6; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__meta { font-size: 12px; color: var(--brand-text-muted); display: flex; align-items: center; gap: 6px; }
.news-card--featured .news-card__image { height: 280px; }
.news-card--featured .news-card__title { font-size: 20px; }

/* ===== MAGAZINE COVER ===== */
.magazine-section { margin: 28px 0; padding: 24px; background-color: var(--brand-light); border-radius: var(--radius); display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; }
.magazine-section__cover { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.magazine-section__cover img { width: 100%; height: auto; }
.magazine-section__content h3 { font-size: 20px; font-weight: 800; color: var(--brand-primary); margin-bottom: 8px; }
.magazine-section__content p { color: var(--brand-text-muted); font-size: 14px; line-height: 1.7; }

/* ===== OPINION ===== */
.opinion-section { margin: 28px 0; padding: 24px; border: 2px solid var(--brand-primary); border-radius: var(--radius); position: relative; }
.opinion-section::before { content: 'یادداشت روز'; position: absolute; top: -12px; right: 20px; background-color: var(--brand-primary); color: var(--brand-white); padding: 2px 14px; border-radius: 3px; font-size: 12px; font-weight: 700; }
.opinion-section__title { font-size: 18px; font-weight: 800; margin-bottom: 10px; color: var(--brand-accent); }
.opinion-section__excerpt { font-size: 14px; color: var(--brand-text-muted); line-height: 1.8; }
.opinion-section__author { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--brand-primary); }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar__widget { background: var(--brand-white); border: 1px solid var(--brand-border); border-radius: var(--radius); padding: 16px; }
.sidebar__widget-title { font-size: 14px; font-weight: 800; color: var(--brand-primary); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--brand-secondary); }
.sidebar__ad { background-color: var(--brand-light); border: 1px dashed var(--brand-border); border-radius: var(--radius); padding: 30px 16px; text-align: center; color: var(--brand-text-muted); font-size: 13px; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.sidebar__info-list { display: flex; flex-direction: column; gap: 10px; }
.sidebar__info-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--brand-border); font-size: 13px; }
.sidebar__info-item:last-child { border-bottom: none; }
.sidebar__info-label { color: var(--brand-text-muted); }
.sidebar__info-value { font-weight: 700; color: var(--brand-primary); }

/* ===== FOOTER ===== */
.footer { background-color: var(--brand-primary); color: rgba(255,255,255,0.8); padding: 40px 0 20px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer__title { color: var(--brand-white); font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a { color: rgba(255,255,255,0.7); font-size: 13px; transition: color 0.2s; }
.footer__links a:hover { color: var(--brand-white); }
.footer__about p { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.7); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.5); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; }
    .hero-section { grid-template-columns: 1fr; }
    .second-hero { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr 1fr; }
    .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .header-main__inner { flex-direction: column; gap: 16px; text-align: center; }
    .header-main__brand { flex-direction: column; gap: 6px; }
    .header-main__tagline { border-right: none; border-top: 2px solid var(--brand-secondary); padding-right: 0; padding-top: 6px; }
    .news-grid { grid-template-columns: 1fr; }
    .category-boxes { grid-template-columns: 1fr 1fr; }
    .magazine-section { grid-template-columns: 1fr; text-align: center; }
    .footer__grid { grid-template-columns: 1fr; }
    .main-nav__list { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
    .main-nav__item a { padding: 12px 14px; font-size: 13px; white-space: nowrap; }
}
@media (max-width: 480px) {
    .category-boxes { grid-template-columns: 1fr; }
    .hero-card { min-height: 280px; }
    .hero-card__title { font-size: 18px; }
}
/* ===== ADMIN PANEL ===== */
.admin-login {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background: var(--brand-white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.admin-login h2 {
    margin-bottom: 20px;
    color: var(--brand-primary);
}
.admin-login label,
.admin-form label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 700;
    font-size: 13px;
    color: var(--brand-accent);
}
.admin-login input,
.admin-form input,
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 14px;
    background: var(--brand-white);
}
.admin-login button,
.admin-form button {
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 700;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-primary);
}
.admin-header h2 {
    color: var(--brand-primary);
    font-size: 20px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--brand-white);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
}
.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid var(--brand-border);
    font-size: 13px;
}
.admin-table th {
    background: var(--brand-light);
    font-weight: 700;
    color: var(--brand-primary);
}
.admin-form {
    max-width: 700px;
    background: var(--brand-white);
    padding: 24px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
}
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--brand-light);
    color: var(--brand-accent);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 13px;
    margin-right: 6px;
}
.btn-primary {
    background: var(--brand-primary);
    color: white;
}
.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}
.alert {
    padding: 10px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
}
.alert-error {
    background: #fdecea;
    color: #C0392B;
    border: 1px solid #f5c6cb;
}
.alert-success {
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #c3e6cb;
}
/* ===== MAGAZINE (سایدبار) ===== */
.magazine-cover {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
}
.magazine-cover img {
    width: 100%;
    height: auto;
    display: block;
}
.magazine-btn {
    display: block;
    text-align: center;
    background: var(--brand-primary);
    color: var(--brand-white);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 99px;
    transition: background 0.2s;
}
.magazine-btn:hover {
    background: var(--brand-secondary);
    color: var(--brand-white);
}
/* ===== ARTICLE PAGE ===== */
.article-page {
    max-width: 820px;
    margin: 40px auto;
    padding: 0 20px;
}
.article-page__header {
    margin-bottom: 24px;
}
.article-page__tag {
    display: inline-block;
    background: var(--brand-secondary);
    color: var(--brand-white);
    padding: 3px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}
.article-page__title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.4;
    color: var(--brand-primary);
    margin-bottom: 12px;
}
.article-page__meta {
    font-size: 13px;
    color: var(--brand-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.article-page__cover {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}
.article-page__cover img {
    width: 100%;
    height: auto;
    display: block;
}
.article-page__excerpt {
    font-size: 17px;
    line-height: 1.9;
    color: var(--brand-accent);
    font-weight: 700;
    padding: 16px 20px;
    border-right: 4px solid var(--brand-secondary);
    background: var(--brand-light);
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.article-page__content {
    font-size: 16px;
    line-height: 2;
    color: var(--brand-accent);
    margin-bottom: 40px;
    white-space: pre-wrap;
}
.article-page__back {
    display: inline-block;
    padding: 10px 20px;
    background: var(--brand-primary);
    color: var(--brand-white);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 14px;
}
.article-page__back:hover {
    background: var(--brand-secondary);
    color: var(--brand-white);
}
/* ===== ADMIN ARTICLE FORM ===== */
.admin-form-wrap {
    max-width: 900px;
    margin: 20px auto;
}
.admin-form-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-primary);
}
.admin-form-head h2 {
    color: var(--brand-primary);
    font-size: 20px;
}
.form-section {
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    background: var(--brand-white);
}
.form-section legend {
    font-weight: 800;
    color: var(--brand-primary);
    font-size: 14px;
    padding: 0 8px;
}
.form-row {
    margin-bottom: 16px;
}
.form-row label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--brand-accent);
}
.form-row input,
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 14px;
    background: var(--brand-white);
}
.form-row textarea {
    resize: vertical;
}
.form-row .req {
    color: var(--brand-secondary);
}
.form-row .hint {
    display: block;
    font-size: 11px;
    color: var(--brand-text-muted);
    margin-top: 4px;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.cover-preview {
    margin-top: 10px;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 300px;
}
.cover-preview img {
    width: 100%;
    height: auto;
    display: block;
}
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}
.slot-option {
    cursor: pointer;
}
.slot-option input {
    display: none;
}
.slot-card {
    display: block;
    padding: 12px;
    border: 2px solid var(--brand-border);
    border-radius: var(--radius);
    background: var(--brand-white);
    transition: all 0.2s;
}
.slot-card strong {
    display: block;
    font-size: 13px;
    color: var(--brand-accent);
    margin-bottom: 4px;
}
.slot-card small {
    font-size: 11px;
    color: var(--brand-text-muted);
}
.slot-option input:checked + .slot-card {
    border-color: var(--brand-primary);
    background: var(--brand-light);
    box-shadow: 0 0 0 3px rgba(10,35,66,0.1);
}
.slot-option:hover .slot-card {
    border-color: var(--brand-primary);
}
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 10px;
}
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
}
.badge-draft { background: #e5e7eb; color: #374151; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-published { background: #d1fae5; color: #065f46; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 35, 66, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.modal-overlay.open {
    display: flex;
}
.modal-box {
    background: var(--brand-white);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-box h3 {
    color: var(--brand-primary);
    font-size: 18px;
    margin-bottom: 8px;
}
.modal-subtitle {
    color: var(--brand-text-muted);
    font-size: 13px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--brand-border);
}
.modal-box label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--brand-accent);
}
.modal-box textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 14px;
    resize: vertical;
}
.modal-box textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(10,35,66,0.1);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}
.modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--brand-text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
}
.modal-close:hover {
    background: var(--brand-light);
    color: var(--brand-secondary);
}
.btn-danger {
    background: var(--brand-secondary);
    color: var(--brand-white);
}
.btn-danger:hover {
    background: #a02f22;
}
.btn-reject {
    background: #fdecea;
    color: var(--brand-secondary);
    border: 1px solid #f5c6cb;
}
.btn-reject:hover {
    background: var(--brand-secondary);
    color: var(--brand-white);
}
.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--brand-border);
}
.admin-tab {
    padding: 10px 20px;
    font-weight: 700;
    font-size: 14px;
    color: var(--brand-text-muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.admin-tab:hover {
    color: var(--brand-primary);
}
.admin-tab--active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-secondary);
}
/* ===== HERO SIDEBAR SCROLL ===== */
.hero-sidebar__scroll,
.second-hero__scroll {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 420px;       /* ارتفاع ثابت با اسکرول */
    overflow-y: auto;
    padding-left: 4px;       /* برای اسکرول‌بار */
}
.hero-sidebar__scroll::-webkit-scrollbar,
.second-hero__scroll::-webkit-scrollbar {
    width: 6px;
}
.hero-sidebar__scroll::-webkit-scrollbar-thumb,
.second-hero__scroll::-webkit-scrollbar-thumb {
    background: var(--brand-border);
    border-radius: 3px;
}
.hero-sidebar__scroll::-webkit-scrollbar-thumb:hover,
.second-hero__scroll::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

/* ===== TICKER LINK ===== */
a.news-ticker__item {
    color: rgba(255,255,255,0.9);
}
a.news-ticker__item:hover {
    color: var(--brand-white);
    text-decoration: underline;
}
/* خلاصه در سایدبار تیتر یک */
.hero-sidebar__excerpt {
    font-size: 12px;
    color: var(--brand-text-muted);
    line-height: 1.6;
    margin: 4px 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* خلاصه در سایدبار تیتر دو */
.second-hero__mini-excerpt {
    font-size: 12px;
    color: var(--brand-text-muted);
    line-height: 1.6;
    margin: 4px 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* ===== ARTICLE PAGE ===== */
.article-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

/* ---- هدر رنگی ---- */
.article-page__hero {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #163a63 100%);
    color: var(--brand-white);
    padding: 50px 20px 40px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}
.article-page__hero::before {
    content: '';
    position: absolute;
    top: -50px; left: -50px;
    width: 200px; height: 200px;
    background: rgba(192, 57, 43, 0.15);
    border-radius: 50%;
}
.article-page__hero::after {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 280px; height: 280px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}
.article-page__hero-inner {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.article-page__tag {
    display: inline-block;
    background: var(--brand-secondary);
    color: var(--brand-white);
    padding: 5px 16px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
}
.article-page__title {
    font-size: 34px;
    font-weight: 900;
    line-height: 1.45;
    margin: 0 0 16px;
    color: var(--brand-white);
}
.article-page__meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    flex-wrap: wrap;
}
.article-page__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---- بدنه دو ستونه ---- */
.article-page__body {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

/* ---- ستون اصلی ---- */
.article-page__cover {
    border-radius: 12px;
    overflow: hidden;
    margin: 0 0 30px;
    box-shadow: 0 10px 30px rgba(10,35,66,0.15);
}
.article-page__cover img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.article-page__lead {
    background: var(--brand-light);
    border-right: 4px solid var(--brand-secondary);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 30px;
    position: relative;
}
.article-page__lead i {
    position: absolute;
    top: 12px; left: 16px;
    color: var(--brand-secondary);
    opacity: 0.3;
    font-size: 28px;
}
.article-page__lead p {
    font-size: 17px;
    line-height: 1.95;
    color: var(--brand-accent);
    font-weight: 700;
    margin: 0;
}

.article-page__content {
    font-size: 16.5px;
    line-height: 2.1;
    color: #2c3e50;
    margin-bottom: 40px;
    text-align: justify;
    white-space: normal;
}

.article-page__footer {
    padding-top: 24px;
    border-top: 1px solid var(--brand-border);
}
.article-page__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: var(--brand-primary);
    color: var(--brand-white);
    border-radius: 99px;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
}
.article-page__back:hover {
    background: var(--brand-secondary);
    color: var(--brand-white);
    transform: translateX(-3px);
}

/* ---- سایدبار ---- */
.article-page__sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.article-page__side-card {
    background: var(--brand-white);
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.article-page__side-card h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-secondary);
}
.article-page__side-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.article-page__side-card li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--brand-border);
}
.article-page__side-card li:last-child { border-bottom: none; }
.article-page__side-card li span { color: var(--brand-text-muted); }
.article-page__side-card li strong { color: var(--brand-primary); }

.article-page__side-ad {
    background: var(--brand-light);
    border: 1px dashed var(--brand-border);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    color: var(--brand-text-muted);
    font-size: 13px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.article-page__side-ad i {
    font-size: 24px;
    color: var(--brand-secondary);
}

/* ---- موبایل ---- */
@media (max-width: 900px) {
    .article-page__body {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .article-page__sidebar {
        position: static;
    }
}
@media (max-width: 600px) {
    .article-page__hero { padding: 30px 16px 26px; }
    .article-page__title { font-size: 24px; }
    .article-page__content { font-size: 15px; }
    .article-page__lead p { font-size: 15px; }
}
/* ===== ADMIN LOGIN ===== */
.admin-login {
    max-width: 420px;
    margin: 60px auto;
    padding: 36px 32px;
    background: var(--brand-white);
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(10,35,66,0.12);
}

.admin-login__brand {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--brand-border);
}
.admin-login__logo {
    font-size: 26px;
    font-weight: 900;
    color: var(--brand-primary);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
.admin-login__tagline {
    font-size: 13px;
    color: var(--brand-text-muted);
}

.admin-login__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-login__field label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--brand-accent);
}
.admin-login__field label i {
    color: var(--brand-secondary);
    font-size: 12px;
}
.admin-login__field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 14px;
    background: var(--brand-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-login__field input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(10,35,66,0.1);
}

/* رمز عبور + دکمهٔ چشم */
.admin-login__password-wrap {
    position: relative;
    width: 100%;
}
.admin-login__password-wrap input {
    width: 100%;
    padding: 12px 14px;
    padding-left: 46px;
    border: 1px solid var(--brand-border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 14px;
    background: var(--brand-white);
    line-height: 1.5;
    box-sizing: border-box;
    height: 46px;
}
.admin-login__password-wrap input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(10,35,66,0.1);
}
.admin-login__eye {
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--brand-text-muted);
    font-size: 14px;
}
.admin-login__eye:hover {
    color: var(--brand-primary);
}

/* دکمهٔ ورود */
.admin-login__submit {
    margin-top: 8px;
    padding: 12px 20px;
    background: var(--brand-primary);
    color: var(--brand-white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}
.admin-login__submit:hover {
    background: var(--brand-secondary);
}
.admin-login__submit:active {
    transform: scale(0.98);
}

@media (max-width: 480px) {
    .admin-login {
        margin: 30px 16px;
        padding: 28px 22px;
    }
}
/* متن دلیل رد داخل مودال */
.reject-reason-text {
    background: var(--brand-light);
    border-right: 3px solid var(--brand-secondary);
    border-radius: 6px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--brand-accent);
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}
.news-ticker__item--gap {
    display: inline-block;
    min-width: 1000px;
    height: 1px;
}
.news-ticker__item--gap::before {
    display: none;
}
/* ===== ARTICLE CONTENT ===== */
.article-page__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
}
.article-page__content p {
    margin-bottom: 1.2em;
}
.article-page__content h2,
.article-page__content h3 {
    margin: 1.5em 0 0.6em;
    color: var(--brand-primary);
}
.article-page__content ul,
.article-page__content ol {
    padding-right: 24px;
    margin-bottom: 1.2em;
}
.article-page__content blockquote {
    border-right: 4px solid var(--brand-secondary);
    padding: 8px 16px;
    margin: 1em 0;
    background: var(--brand-light);
    border-radius: var(--radius);
}
.article-page__content a {
    color: var(--brand-secondary);
    text-decoration: underline;
}
/* ===== COVER UPLOAD ===== */
.cover-upload-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cover-preview {
    border: 2px dashed var(--brand-border);
    border-radius: var(--radius);
    padding: 12px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-light);
}
.cover-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius);
    display: block;
}
.cover-preview:empty::before {
    content: 'هنوز عکسی انتخاب نشده';
    color: var(--brand-text-muted);
    font-size: 13px;
}
.cover-actions {
    display: flex;
    gap: 8px;
}
/* ===== CATEGORY PAGE ===== */
.category-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 20px;
}
.category-page__hero {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #163a63 100%);
    color: var(--brand-white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}
.category-page__hero-img {
    max-width: 120px;
    border-radius: 8px;
    margin-bottom: 16px;
}
.category-page__title {
    font-size: 28px;
    font-weight: 900;
    margin: 0;
}
.category-page__count {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin-top: 8px;
}
.category-page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.mini-news__excerpt {
    font-size: 13px;
    color: var(--brand-text-muted);
    line-height: 1.7;
    margin: 6px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* ===== HERO SLIDER ===== */
.hero-slider,
.second-hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}
.hero-slide,
.second-hero-slide {
    position: absolute;
    inset: 0;
    display: block;
}
.hero-slider__dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.hero-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.hero-slider__dot.active {
    background: var(--brand-white);
    transform: scale(1.2);
}
/* خلاصه در تیتر یک */
.hero-card__excerpt {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin: 6px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* ===== NEWS GRID CAROUSEL ===== */
.news-grid-section {
    margin: 0 0 32px;
}
.news-grid-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-primary);
}
.news-grid-section__title {
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-primary);
    margin: 0;
}
.news-grid-section__controls {
    display: flex;
    gap: 8px;
}
.news-grid-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--brand-border);
    background: var(--brand-white);
    color: var(--brand-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
}
.news-grid-btn:hover {
    background: var(--brand-primary);
    color: var(--brand-white);
    border-color: var(--brand-primary);
}

.news-grid-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}
.news-grid-track::-webkit-scrollbar {
    height: 6px;
}
.news-grid-track::-webkit-scrollbar-thumb {
    background: var(--brand-border);
    border-radius: 3px;
}
.news-grid-track::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}
.news-grid-track .news-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}
.news-grid-track .news-card__image {
    height: 170px;
}
/* ===== SEARCH PAGE ===== */
.search-page {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}
.search-page__header {
    margin-bottom: 30px;
}
.search-page__title {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-primary);
    margin-bottom: 16px;
}
.search-page__form {
    display: flex;
    gap: 10px;
    max-width: 600px;
}
.search-page__input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 15px;
}
.search-page__input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(10,35,66,0.1);
}
.search-page__btn {
    padding: 12px 24px;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.search-page__btn:hover {
    background: var(--brand-secondary);
}
.search-page__message {
    color: var(--brand-text-muted);
    font-size: 14px;
}
.search-page__count {
    color: var(--brand-text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}
.search-page__empty {
    color: var(--brand-text-muted);
    text-align: center;
    padding: 40px;
}
.search-page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
mark {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0 2px;
    border-radius: 2px;
}
/* ===== ARTICLE PAGE VIDEO ===== */
.article-page__content video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
    display: block;
    background: #000;
}

/* ===== QUILL VIDEO ===== */
.ql-editor video {
    max-width: 100%;
    height: auto;
    min-height: 200px;
    border-radius: 8px;
    margin: 12px 0;
    display: block;
    background: #000;
}

/* اطمینان از اینکه Quill ویدیو رو به‌عنوان بلاک نشون بده */
.ql-editor .ql-video {
    display: block;
    max-width: 100%;
    min-height: 200px;
    margin: 12px 0;
    background: #000;
    border-radius: 8px;
}
/* ===== SEARCH PAGE ===== */
.search-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* ---- هدر رنگی ---- */
.search-page__hero {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #163a63 100%);
    color: var(--brand-white);
    padding: 50px 20px 44px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.search-page__hero::before {
    content: '';
    position: absolute;
    top: -60px; left: -60px;
    width: 220px; height: 220px;
    background: rgba(192, 57, 43, 0.15);
    border-radius: 50%;
}
.search-page__hero::after {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 300px; height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}
.search-page__hero-inner {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}
.search-page__title {
    font-size: 32px;
    font-weight: 900;
    margin: 0 0 8px;
    color: var(--brand-white);
}
.search-page__subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    margin: 0 0 28px;
}

/* ---- فرم جستجو ---- */
.search-page__form {
    width: 100%;
}
.search-page__form-inner {
    position: relative;
    display: flex;
    background: var(--brand-white);
    border-radius: 99px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.search-page__form-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-text-muted);
    font-size: 16px;
    pointer-events: none;
}
.search-page__input {
    flex: 1;
    border: none;
    outline: none;
    padding: 16px 20px 16px 50px;
    font-family: var(--font-main);
    font-size: 15px;
    background: transparent;
    color: var(--brand-accent);
}
.search-page__btn {
    padding: 0 28px;
    background: var(--brand-secondary);
    color: var(--brand-white);
    border: none;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.search-page__btn:hover {
    background: #a02f22;
}

/* ---- بدنه ---- */
.search-page__body {
    padding: 0 20px 60px;
}

.search-page__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--brand-primary);
}
.search-page__count {
    font-size: 14px;
    color: var(--brand-text-muted);
}
.search-page__count strong {
    color: var(--brand-primary);
    font-size: 16px;
}
.search-page__query {
    color: var(--brand-secondary);
    font-weight: 700;
}

/* ---- گرید ---- */
.search-page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ---- کارت ---- */
.search-card {
    background: var(--brand-white);
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.search-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.search-card a {
    display: block;
}
.search-card__media {
    height: 180px;
    overflow: hidden;
    background: var(--brand-light);
}
.search-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.search-card:hover .search-card__media img {
    transform: scale(1.05);
}
.search-card__body {
    padding: 16px;
}
.search-card__tag {
    display: inline-block;
    background: var(--brand-light);
    color: var(--brand-primary);
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
}
.search-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 8px;
    color: var(--brand-accent);
}
.search-card__excerpt {
    font-size: 13px;
    color: var(--brand-text-muted);
    line-height: 1.7;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-card__meta {
    font-size: 12px;
    color: var(--brand-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--brand-border);
}

/* ---- هایلایت ---- */
.search-card__excerpt mark {
    background-color: #fef3c7;
    color: #92400e;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 700;
}

/* ---- حالت خالی ---- */
.search-page__empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--brand-text-muted);
}
.search-page__empty i {
    font-size: 48px;
    color: var(--brand-border);
    margin-bottom: 16px;
    display: block;
}
.search-page__empty h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-accent);
    margin: 0 0 8px;
}
.search-page__empty p {
    font-size: 14px;
    margin: 0 0 20px;
}
.search-page__back-btn {
    display: inline-block;
    padding: 10px 24px;
    background: var(--brand-primary);
    color: var(--brand-white);
    border-radius: 99px;
    font-weight: 700;
    font-size: 13px;
    transition: background 0.2s;
}
.search-page__back-btn:hover {
    background: var(--brand-secondary);
    color: var(--brand-white);
}

/* ---- ریسپانسیو ---- */
@media (max-width: 768px) {
    .search-page__title { font-size: 24px; }
    .search-page__hero { padding: 36px 16px 32px; }
    .search-page__form-inner { flex-direction: column; border-radius: 12px; }
    .search-page__form-icon { display: none; }
    .search-page__input { padding: 14px 18px; }
    .search-page__btn { padding: 12px 20px; border-radius: 0; }
    .search-page__grid { grid-template-columns: 1fr; }
}
/* ===== AD BOXES ===== */
.ad-box {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--brand-light);
    border: 1px dashed var(--brand-border);
    display: block;
}

/* هر آیتم — پر کردن کامل باکس */
.ad-item {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* چیدمان عکس + متن (افقی) */
.ad-item--image {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px;
    text-align: right;
}

/* چیدمان ویدیو (فقط ویدیو، پر کردن کامل) */
.ad-item--video {
    display: block;
    padding: 0;
}

.ad-item.active {
    animation: adFadeIn 0.4s ease;
}
@keyframes adFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* عکس سمت راست */
.ad-item__media-wrap {
    flex-shrink: 0;
    width: 140px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
}
.ad-item__media {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* متن سمت چپ */
.ad-item__text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--brand-accent);
    font-weight: 700;
    line-height: 1.6;
    text-align: right;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ویدیو — کل باکس رو پر کنه */
.ad-item__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
    border-radius: 0;
}

/* بنر افقی (header, footer) */
.ad-banner-horizontal .ad-box {
    height: 140px;
}
.ad-banner-horizontal .ad-item__media-wrap {
    width: 200px;
}

/* سایدبار — ارتفاع ثابت کمتر */
.sidebar__widget .ad-box {
    height: 100px;
}
.sidebar__widget .ad-item__media-wrap {
    width: 100px;
}
.sidebar__widget .ad-item__text {
    font-size: 13px;
    -webkit-line-clamp: 4;
}

/* داخل مقاله — کمی کوچیک‌تر */
.article-page__main .ad-banner-horizontal .ad-box {
    height: 120px;
}
.article-page__main .ad-banner-horizontal .ad-item__media-wrap {
    width: 160px;
}

/* ارتفاع بیشتر برای باکس ویدیویی (اعداد خودت) */
.ad-box--video {
    height: 2800px;
}
.ad-banner-horizontal .ad-box--video {
    height: 320px;
}
.sidebar__widget .ad-box--video {
    height: 250px;
}
.article-page__main .ad-banner-horizontal .ad-box--video {
    height: 200px;
}
/* ===== باکس تبلیغاتی داخل هدر — کوچیک ===== */
.header-main__ad .ad-box {
    height: 70px;
    min-height: 70px;
    max-height: 70px;
}
.header-main__ad .ad-box--video {
    height: 80px;
    min-height: 80px;
    max-height: 80px;
}
.header-main__ad .ad-item__media-wrap {
    width: 90px;
}
.header-main__ad .ad-item__text {
    font-size: 12px;
    -webkit-line-clamp: 2;
}
.header-main__ad .ad-item__video {
    object-fit: cover;
}
/* ===== Language Switch ===== */
.lang-switch {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-right: auto;
    margin-left: 12px;
}
.lang-switch a {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
}
.lang-switch a:hover {
    color: #fff;
}
.lang-switch a.active {
    background: var(--brand-secondary);
    color: #fff;
}
html[dir="ltr"] .header-main__tagline,
body[dir="ltr"] .header-main__tagline,
[lang="en"] .header-main__tagline {
    border-right: none;
    border-left: 2px solid var(--brand-secondary);
    padding-right: 0;
    padding-left: 12px;
}