/**
 * تم روشن/تاریک سراسری سایت
 * darkMode: class روی <html>
 */

html {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

html:not(.dark) body {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

/* کارت‌های شیشه‌ای در حالت روشن */
html:not(.dark) .cyber-glass {
    background-color: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* سکشن‌های هوم با پس‌زمینه تیرهٔ هاردکد */
html:not(.dark) #courses,
html:not(.dark) #differentiation,
html:not(.dark) #cyber-insights,
html:not(.dark) #student-results,
html:not(.dark) #site-footer {
    background: #f8fafc !important;
    background-image: none !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

/* تیترها و متن‌های سفید هاردکد داخل محتوا */
html:not(.dark) main .text-white,
html:not(.dark) section .text-white,
html:not(.dark) footer .text-white,
html:not(.dark) .hero-title {
    color: #0f172a !important;
}

/* CTA گرادیانی: متن سفید باید در حالت روز هم سفید بماند */
html:not(.dark) .karsaz-cta-primary .text-white,
html:not(.dark) .karsaz-cta-primary__label {
    color: #ffffff !important;
}

html:not(.dark) .karsaz-cta-primary {
    box-shadow: 0 10px 28px rgba(6, 182, 212, 0.18);
}

html:not(.dark) main .text-slate-100,
html:not(.dark) section .text-slate-100,
html:not(.dark) footer .text-slate-100 {
    color: #1e293b !important;
}

html:not(.dark) main .text-slate-300,
html:not(.dark) section .text-slate-300,
html:not(.dark) footer .text-slate-300 {
    color: #475569 !important;
}

html:not(.dark) main .text-slate-400,
html:not(.dark) section .text-slate-400,
html:not(.dark) footer .text-slate-400 {
    color: #64748b !important;
}

html:not(.dark) main .text-slate-500,
html:not(.dark) section .text-slate-500,
html:not(.dark) footer .text-slate-500 {
    color: #64748b !important;
}

html:not(.dark) main .border-white\/\[0\.05\],
html:not(.dark) section .border-white\/\[0\.05\],
html:not(.dark) footer .border-white\/\[0\.05\],
html:not(.dark) main .border-white\/10,
html:not(.dark) section .border-white\/10,
html:not(.dark) footer .border-white\/10 {
    border-color: rgba(15, 23, 42, 0.1) !important;
}

/* باکس‌های تیره داخل هیرو */
html:not(.dark) .bg-cyber-dark\/80,
html:not(.dark) .bg-cyber-darkest\/60,
html:not(.dark) .bg-cyber-dark {
    background-color: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}

html:not(.dark) .bg-cyan-950\/40,
html:not(.dark) .bg-indigo-950\/40,
html:not(.dark) .bg-fuchsia-950\/40,
html:not(.dark) .bg-emerald-950\/20,
html:not(.dark) .bg-cyan-950\/20 {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

html:not(.dark) #neuralCanvas {
    opacity: 0.12;
    filter: invert(1) hue-rotate(180deg);
}

/* ورودی‌ها */
html:not(.dark) input[type="email"].bg-cyber-darkest\/60,
html:not(.dark) input.bg-cyber-darkest\/60,
html:not(.dark) textarea.bg-cyber-darkest\/60 {
    background-color: #fff !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
}

html:not(.dark) input::placeholder {
    color: #94a3b8 !important;
}

/* صفحه‌بندی آرشیو مقالات — حالت روز */
.karsaz-pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1.25;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.karsaz-pager__btn:hover {
    background: #06b6d4;
    border-color: #06b6d4;
    color: #020617;
}

.karsaz-pager__btn--active {
    background: #06b6d4;
    border-color: #06b6d4;
    color: #020617;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.28);
}

.karsaz-pager__btn--disabled {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    pointer-events: none;
}

html.dark .karsaz-pager__btn {
    background: #0a0f1d;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

html.dark .karsaz-pager__btn:hover,
html.dark .karsaz-pager__btn--active {
    background: #06b6d4;
    border-color: #06b6d4;
    color: #020617;
}

html.dark .karsaz-pager__btn--disabled {
    background: rgba(10, 15, 29, 0.5);
    border-color: rgba(255, 255, 255, 0.05);
    color: #64748b;
}
