[dir="rtl"].prose,
[dir="rtl"] .prose {
    text-align: right;
}

    [dir="rtl"].prose h1,
    [dir="rtl"].prose h2,
    [dir="rtl"].prose h3,
    [dir="rtl"].prose h4,
    [dir="rtl"] .prose h1,
    [dir="rtl"] .prose h2,
    [dir="rtl"] .prose h3,
    [dir="rtl"] .prose h4 {
        text-align: right;
    }

    [dir="rtl"].prose ul,
    [dir="rtl"].prose ol,
    [dir="rtl"] .prose ul,
    [dir="rtl"] .prose ol {
        padding-right: 1.625rem;
        padding-left: 0;
    }

    [dir="rtl"].prose blockquote,
    [dir="rtl"] .prose blockquote {
        border-right: 4px solid #0d9488;
        border-left: none;
        padding-right: 1rem;
        padding-left: 0;
        font-style: normal;
    }

body:has(#page-loader:not(.fade-out)) {
    overflow: hidden;
}

#page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(248,250,252,0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

html.dark #page-loader {
    background: rgba(15,23,42,0.08);
}

#page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.pl-spinner {
    width: 52px;
    height: 52px;
}

    .pl-spinner svg {
        width: 100%;
        height: 100%;
        animation: pl-rotate 1.4s linear infinite;
    }

    .pl-spinner circle {
        fill: none;
        stroke-width: 3;
        stroke-linecap: round;
        stroke-dasharray: 100;
        animation: pl-dash 1.4s ease-in-out infinite;
    }

    .pl-spinner .c1 {
        stroke: #0d9488;
    }

    .pl-spinner .c2 {
        stroke: #2dd4bf;
        animation-delay: -.7s;
        opacity: .5;
    }

@keyframes pl-rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pl-dash {
    0% {
        stroke-dashoffset: 95;
    }

    50% {
        stroke-dashoffset: 20;
    }

    100% {
        stroke-dashoffset: 95;
    }
}

.choices__list--dropdown,
.choices__list[aria-expanded] {
    z-index: 9999 !important;
    border: 1.5px solid rgba(13,148,136,.4) !important;
    border-radius: .75rem !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.12) !important;
    margin-top: 4px !important;
    font-family: inherit !important;
}

.dark .choices__list--dropdown,
.dark .choices__list[aria-expanded] {
    border-color: rgba(45,212,191,.3) !important;
}

.choices__list--dropdown .choices__item--selectable,
.choices__list[aria-expanded] .choices__item--selectable {
    border-radius: .5rem !important;
    padding: .5rem .875rem !important;
    font-size: .875rem !important;
    cursor: pointer !important;
}

    .choices__list--dropdown .choices__item--selectable.is-highlighted,
    .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
        background: rgba(13,148,136,.1) !important;
        color: #0d9488 !important;
    }

.filament-form-builder [data-validation-error],
.filament-form-builder p[class*="fi-fo-field-wrp-error"],
.filament-form-builder .fi-fo-field-wrp-error-message,
.filament-form-builder p.text-danger-600,
.filament-form-builder .text-danger-600,
.filament-form-builder .text-red-600 {
    color: #dc2626 !important;
}

.glass-hero {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.20);
}

    .glass-hero:hover {
        background: rgba(255, 255, 255, 0.20);
    }

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .slider-dot.active {
        background: #0d9488;
        border-color: #0d9488;
        width: 28px;
        box-shadow: 0 0 8px rgba(13,148,136,0.6);
    }

.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to left, #0d9488, #2dd4bf);
}

.bg-secondary {
    background-color: #D4AF37;
}

.text-secondary {
    color: #D4AF37;
}

.border-secondary {
    border-color: #D4AF37;
}

.shadow-secondary {
    box-shadow: 0 0 20px rgba(212,175,55,0.4);
}

.news-side-swiper .swiper-wrapper,
.events-side-swiper .swiper-wrapper,
.announcements-side-swiper .swiper-wrapper {
    display: flex !important;
    flex-direction: column !important;
    transform: none !important;
    height: auto !important;
}

.news-side-swiper .swiper-slide,
.events-side-swiper .swiper-slide,
.announcements-side-swiper .swiper-slide {
    width: 100% !important;
    margin-bottom: 12px;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #e2e8f0;
}

::-webkit-scrollbar-thumb {
    background: #0d9488;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #0f766e;
    }

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.dark .glass {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-light {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.dark .glass-light {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.filament-form-builder .fi-input-wrp {
    border-radius: 0.75rem !important;
    box-shadow: 0 0 0 1.5px rgba(13, 148, 136, 0.3) !important;
    transition: box-shadow 0.15s ease !important;
    overflow: hidden !important;
}

    .filament-form-builder .fi-input-wrp:focus-within {
        box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.6) !important;
    }

.dark .filament-form-builder .fi-input-wrp {
    box-shadow: 0 0 0 1.5px rgba(45, 212, 191, 0.25) !important;
}

    .dark .filament-form-builder .fi-input-wrp:focus-within {
        box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.5) !important;
    }

.filament-form-builder .fi-select-input {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.filament-form-builder .ts-wrapper .ts-control {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0.75rem !important;
    background: transparent !important;
    cursor: pointer !important;
    padding: 0.5rem 0.875rem !important;
    min-height: 2.75rem !important;
    align-items: center !important;
}

.filament-form-builder .ts-wrapper.focus .ts-control {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.ts-dropdown {
    border: 1.5px solid rgba(13, 148, 136, 0.4) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12) !important;
    overflow: hidden !important;
    margin-top: 4px !important;
    background: #fff !important;
    font-family: inherit !important;
}

.dark .ts-dropdown {
    background: #1e293b !important;
    border-color: rgba(45, 212, 191, 0.3) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4) !important;
}

.ts-dropdown .ts-dropdown-content {
    padding: 6px !important;
    max-height: 220px !important;
}

.ts-dropdown .ts-option {
    border-radius: 0.5rem !important;
    padding: 0.5rem 0.875rem !important;
    font-size: 0.875rem !important;
    color: #334155 !important;
    cursor: pointer !important;
    transition: background 0.1s ease, color 0.1s ease !important;
}

.dark .ts-dropdown .ts-option {
    color: #cbd5e1 !important;
}

.ts-dropdown .ts-option:hover,
.ts-dropdown .ts-option.active {
    background: rgba(13, 148, 136, 0.1) !important;
    color: #0d9488 !important;
}

.dark .ts-dropdown .ts-option:hover,
.dark .ts-dropdown .ts-option.active {
    background: rgba(45, 212, 191, 0.15) !important;
    color: #2dd4bf !important;
}

.ts-dropdown .ts-option.selected {
    background: rgba(13, 148, 136, 0.12) !important;
    color: #0d9488 !important;
    font-weight: 600 !important;
}

.dark .ts-dropdown .ts-option.selected {
    background: rgba(45, 212, 191, 0.18) !important;
    color: #2dd4bf !important;
}

.filament-form-builder .fi-btn[type="submit"] {
    background-color: #0d9488 !important;
    border-radius: 0.75rem !important;
    padding: 0.625rem 1.75rem !important;
    font-weight: 600 !important;
    transition: background-color 0.2s ease !important;
}

    .filament-form-builder .fi-btn[type="submit"]:hover {
        background-color: #0f766e !important;
    }

.filament-form-builder .fb-form-container {
    border-radius: 1rem !important;
    border-color: rgba(13, 148, 136, 0.2) !important;
    padding: 1.5rem !important;
}

/* ===================== Electronic Services ===================== */
.electronic-services-section {
    transition: background-color .3s ease;
}

.electronic-services-panel {
    transition: background-color .3s ease, border-color .3s ease;
}

.electronic-service-item {
    transition: background-color .3s ease, border-color .3s ease, color .3s ease, transform .3s ease, box-shadow .3s ease;
}

html.dark .electronic-services-section {
    background: #141d2e;
}

html.dark .electronic-services-panel {
    background: #202b3d !important;
    border-color: #334155 !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

    html.dark .electronic-services-panel > .flex {
        border-color: #334155 !important;
    }

html.dark .electronic-service-item {
    background: #273246 !important;
    border-color: #3a465a !important;
    color: #f1f5f9 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

    html.dark .electronic-service-item:hover {
        background: #0d9488 !important;
        border-color: #14b8a6 !important;
        color: #ffffff !important;
    }

        html.dark .electronic-service-item:hover .material-icons-round {
            color: #ffffff !important;
        }

/* ===================== Footer RTL / Alignment Fix ===================== */
.site-footer-rtl,
.site-footer-rtl * {
    direction: rtl;
}

.site-footer-rtl {
    margin-top: 0 !important;
    text-align: right;
}

    .site-footer-rtl .grid {
        text-align: right;
    }

    .site-footer-rtl ul {
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .site-footer-rtl .grid > div > .flex.items-center {
        justify-content: flex-start;
        text-align: right;
    }

    .site-footer-rtl h6 {
        text-align: right;
        margin: 0;
    }

    .site-footer-rtl .footer-quick-link {
        width: fit-content;
        justify-content: flex-start;
        text-align: right;
    }

        .site-footer-rtl .footer-quick-link > span {
            flex: 0 0 auto;
        }

    .site-footer-rtl .footer-socials a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
    }

    .site-footer-rtl .footer-socials .material-icons-round {
        display: block;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .site-footer-rtl li.flex.items-start,
    .site-footer-rtl li.flex.items-center {
        justify-content: flex-start;
        text-align: right;
    }

    .site-footer-rtl li.flex > .material-icons-round {
        flex: 0 0 auto;
    }

    .site-footer-rtl .flex-col-reverse {
        text-align: right;
    }

@media (max-width: 640px) {
    .site-footer-rtl .flex-col-reverse {
        align-items: flex-start;
        width: 100%;
    }
}

/* ===================== اصلاحات پردیس‌های فناوری و دوره‌ها ===================== */

/* ۱) بخش پردیس‌های فناوری استان در حالت دارک */
html.dark #campuses,
html.dark .campuses-section,
.dark #campuses,
.dark .campuses-section {
    background-color: #0f172a !important;
}

    /* سفید شدن تمام متن‌ها، تیترها و آیتم‌ها در حالت دارک به جز رنگ‌های سبز/زمردی */
    html.dark #campuses *:not(.text-primary):not(.text-emerald-500):not(.text-emerald-400):not(.text-emerald-600):not(.text-green-500):not(.text-green-600):not(.text-teal-500):not(.text-teal-400):not(.bg-primary):not(.bg-emerald-500),
    .dark #campuses *:not(.text-primary):not(.text-emerald-500):not(.text-emerald-400):not(.text-emerald-600):not(.text-green-500):not(.text-green-600):not(.text-teal-500):not(.text-teal-400):not(.bg-primary):not(.bg-emerald-500) {
        color: #f8fafc !important;
    }

    /* استایل کادرهای داخلی پردیس‌ها در حالت دارک */
    html.dark #campuses .bg-slate-50,
    html.dark #campuses .bg-white,
    .dark #campuses .bg-slate-50,
    .dark #campuses .bg-white {
        background-color: #1e293b !important;
        border-color: #334155 !important;
    }


/* ۲) پس‌زمینه تیره و استایل کامل اسلایدر دوره‌ها و کارگاه‌ها */
html.dark #courses,
html.dark .courses-section,
.dark #courses,
.dark .courses-section {
    background-color: #0f172a !important;
    transition: background-color 0.3s ease;
}

    html.dark #courses h2, html.dark #courses h3, html.dark #courses p, html.dark #courses span,
    .dark #courses h2, .dark #courses h3, .dark #courses p, .dark #courses span {
        color: #f8fafc;
    }

    html.dark #courses .text-slate-500, html.dark #courses .text-slate-600,
    .dark #courses .text-slate-500, .dark #courses .text-slate-600 {
        color: #94a3b8 !important;
    }

    /* استایل کارت‌های دوره‌ها در حالت تیره */
    html.dark #courses .bg-white,
    .dark #courses .bg-white {
        background-color: #1e293b !important;
        border-color: #334155 !important;
        color: #f8fafc !important;
    }

/* تنظیمات Swiper اسلایدر دوره‌ها */
.courses-swiper {
    width: 100%;
    padding-bottom: 3rem !important;
    overflow: hidden;
}

    .courses-swiper .swiper-wrapper {
        display: flex;
        align-items: stretch;
    }

    .courses-swiper .swiper-slide {
        height: auto;
        cursor: grab;
        transition: transform 0.3s ease;
    }

        .courses-swiper .swiper-slide:active {
            cursor: grabbing;
        }

    /* بولت‌های اسکرول (Pagination) */
    .courses-swiper .swiper-pagination {
        bottom: 0 !important;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }

    .courses-swiper .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        margin: 0 !important;
        background: #94a3b8;
        opacity: 0.5;
        border-radius: 9999px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .courses-swiper .swiper-pagination-bullet-active {
        width: 28px;
        border-radius: 6px;
        background: #0d9488 !important;
        opacity: 1;
    }

html.dark .courses-swiper .swiper-pagination-bullet,
.dark .courses-swiper .swiper-pagination-bullet {
    background: #475569;
}

html.dark .courses-swiper .swiper-pagination-bullet-active,
.dark .courses-swiper .swiper-pagination-bullet-active {
    background: #2dd4bf !important;
}
