/* Local YekanBakh Font Face Setup */
@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekan-bakh/woff2/YekanBakh-Thin.woff2') format('woff2'),
         url('../fonts/yekan-bakh/woff/YekanBakh-Thin.woff') format('woff');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekan-bakh/woff2/YekanBakh-Light.woff2') format('woff2'),
         url('../fonts/yekan-bakh/woff/YekanBakh-Light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekan-bakh/woff2/YekanBakh-Regular.woff2') format('woff2'),
         url('../fonts/yekan-bakh/woff/YekanBakh-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekan-bakh/woff2/YekanBakh-SemiBold.woff2') format('woff2'),
         url('../fonts/yekan-bakh/woff/YekanBakh-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekan-bakh/woff2/YekanBakh-Bold.woff2') format('woff2'),
         url('../fonts/yekan-bakh/woff/YekanBakh-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekan-bakh/woff2/YekanBakh-ExtraBold.woff2') format('woff2'),
         url('../fonts/yekan-bakh/woff/YekanBakh-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekan-bakh/woff2/YekanBakh-Black.woff2') format('woff2'),
         url('../fonts/yekan-bakh/woff/YekanBakh-Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'YekanBakh';
    src: url('../fonts/yekan-bakh/woff2/YekanBakh-ExtraBlack.woff2') format('woff2'),
         url('../fonts/yekan-bakh/woff/YekanBakh-ExtraBlack.woff') format('woff');
    font-weight: 950;
    font-style: normal;
    font-display: swap;
}

/* Global Font Settings */
* {
    font-family: 'YekanBakh', Tahoma, sans-serif !important;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    direction: rtl;
    background-color: #f8fafc;
    color: #0f172a;
}

/* Ambient glow animations */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(20px) scale(0.95); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.animate-float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}

.animate-float-reverse {
    animation: floatReverse 10s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulseGlow 4s ease-in-out infinite;
}

/* نوارهای اکولایزر تزئینی ویجت «صدای امروز» — هنگام پخش با جاوااسکریپت فعال می‌شوند */
@keyframes audioEqBounce {
    0% { height: 20%; }
    100% { height: 90%; }
}

/* Glassmorphism utility classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-card-light {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.dark .glass-card-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* SlimSelect Custom Theme Integration */
.ss-main {
    padding: 0.5rem 0.85rem !important;
    border-radius: 1rem !important;
    border-color: #cbd5e1 !important;
    background-color: #f8fafc !important;
    font-size: 0.75rem !important;
    font-family: 'YekanBakh', sans-serif !important;
    transition: all 0.2s ease !important;
    min-height: 42px !important;
}

.ss-main:focus, .ss-main.ss-open-below, .ss-main.ss-open-above {
    border-color: #0D45AE !important;
    box-shadow: 0 0 0 4px rgba(13, 69, 174, 0.1) !important;
}

.dark .ss-main {
    background-color: #020617 !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

.ss-content {
    z-index: 999999 !important;
    border-radius: 1rem !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    font-family: 'YekanBakh', sans-serif !important;
    font-size: 0.75rem !important;
}

/* بعد از پورتال‌شدن به document.body، متغیر --ss-content-height به‌تنهایی
   کافی نبود (خودِ کاربر با تست در مرورگر این را تأیید کرد) — این‌جا
   height/max-height صریح روی همان کلاس حالت باز (open-below/open-above)
   ست می‌شود تا مطمئناً اعمال شود. */
.ss-content.ss-open-below,
.ss-content.ss-open-above {
    height: auto !important;
    max-height: 250px !important;
}

/* Ensure CKEditor 5 & SlimSelect dropdowns sit on top of all body/card elements */
.ck.ck-body-wrapper, .ck-body-wrapper {
    z-index: 999999 !important;
}

.ck.ck-dropdown .ck-dropdown__panel {
    z-index: 999999 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
}

.dark .ss-content {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

.ss-search input {
    padding: 0.5rem 0.75rem !important;
    border-radius: 0.75rem !important;
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    font-size: 0.75rem !important;
}

.dark .ss-search input {
    background-color: #020617 !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

.ss-list .ss-option {
    padding: 0.6rem 0.85rem !important;
    font-size: 0.75rem !important;
}

.ss-list .ss-option:hover, .ss-list .ss-option.ss-highlighted {
    background-color: #f0f5ff !important;
    color: #0D45AE !important;
}

.dark .ss-list .ss-option:hover, .dark .ss-list .ss-option.ss-highlighted {
    background-color: rgba(13, 69, 174, 0.2) !important;
    color: #93c5fd !important;
}

.ss-list .ss-option.ss-disabled {
    opacity: 0.4 !important;
}



/* ═══ تایپوگرافی متن خبر ═══
   Tailwind preflight تمام تگ‌های عنوان/لیست/نقل‌قول را بی‌استایل می‌کند و
   پلاگین typography (.prose) هم نصب نیست؛ پس عنوان (H2-H4)، لیست‌ها و ...
   هم داخل ادیتور CKEditor (.ck-content) هم در صفحه‌ی عمومی خبر (.prose)
   اعمال‌شده به‌نظر نمی‌رسیدند. یک بلوک مشترک برای هر دو. */
.ck-content h2, .prose h2 { font-size: 1.5em; font-weight: 800; line-height: 1.6; margin: 1.6em 0 0.6em; color: inherit; }
.ck-content h3, .prose h3 { font-size: 1.25em; font-weight: 800; line-height: 1.6; margin: 1.4em 0 0.5em; color: inherit; }
.ck-content h4, .prose h4 { font-size: 1.1em; font-weight: 700; line-height: 1.6; margin: 1.2em 0 0.4em; color: inherit; }
.ck-content p, .prose p { margin: 0 0 1em; }
.ck-content ul, .prose ul { list-style: disc; padding-inline-start: 1.6em; margin: 0 0 1em; }
.ck-content ol, .prose ol { list-style: decimal; padding-inline-start: 1.6em; margin: 0 0 1em; }
.ck-content blockquote, .prose blockquote { border-inline-start: 4px solid #0D45AE; background: rgba(148, 163, 184, 0.12); padding: 0.8em 1.1em; margin: 1.2em 0; border-radius: 0.5rem; }
.ck-content a, .prose a { color: #0D45AE; text-decoration: underline; text-underline-offset: 2px; }
.dark .ck-content a, .dark .prose a { color: #93c5fd; }
.ck-content table, .prose table { border-collapse: collapse; margin: 1em 0; }
.ck-content td, .ck-content th, .prose td, .prose th { border: 1px solid #cbd5e1; padding: 0.4em 0.7em; }
.prose img, .prose video { max-width: 100%; height: auto; border-radius: 0.75rem; }
.prose figure { margin: 1.2em 0; }
