/* ================================================
   EFLA THEME - DARK MODE OVERRIDES
   Applied when: html[data-theme="dark"]
   ================================================ */

[data-theme="dark"] body {
    background-color: #0F172A;
    color: #F1F5F9;
}

/* Navbar */
[data-theme="dark"] #efla-navbar.scrolled {
    background: rgba(15,23,42,.95);
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

[data-theme="dark"] #efla-navbar.scrolled .nav-link {
    color: #CBD5E1;
}

[data-theme="dark"] #efla-navbar.scrolled .nav-link:hover,
[data-theme="dark"] #efla-navbar.scrolled .nav-link.active {
    color: var(--efla-blue-light);
    background: rgba(59,130,246,.1);
}

/* Offcanvas */
[data-theme="dark"] .offcanvas {
    background: #1E293B;
    border-left-color: #334155;
}

/* Dropdown */
[data-theme="dark"] #efla-navbar .dropdown-menu {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] #efla-navbar .dropdown-item {
    color: #CBD5E1;
}

[data-theme="dark"] #efla-navbar .dropdown-item:hover {
    background: rgba(59,130,246,.1);
    color: var(--efla-blue-light);
}

/* Cards */
[data-theme="dark"] .efla-card {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .efla-card:hover {
    border-color: #3B82F6;
}

/* Services */
[data-theme="dark"] .service-card {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .service-card:hover {
    border-color: #3B82F6;
}

/* University Cards */
[data-theme="dark"] .university-card {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .university-card:hover {
    border-color: #3B82F6;
}

/* Program Cards */
[data-theme="dark"] .program-card {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .program-card:hover {
    border-color: #3B82F6;
}

/* Testimonials */
[data-theme="dark"] .testimonial-card {
    background: #1E293B;
    border-color: #334155;
}

/* Contact info cards */
[data-theme="dark"] .contact-info-card {
    background: #1E293B;
    border-color: #334155;
}

/* Filters bar */
[data-theme="dark"] .filters-bar {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .filter-btn {
    border-color: #334155;
    color: #94A3B8;
}

[data-theme="dark"] .filter-btn:hover {
    border-color: #3B82F6;
}

/* Form controls */
[data-theme="dark"] .efla-form-control {
    background: #1E293B;
    border-color: #334155;
    color: #F1F5F9;
}

[data-theme="dark"] .efla-form-control::placeholder {
    color: #64748B;
}

[data-theme="dark"] .efla-form-control:focus {
    background: #1E293B;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    color: #F1F5F9;
}

/* Bootstrap form controls inherit */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background: #1E293B;
    border-color: #334155;
    color: #F1F5F9;
}

[data-theme="dark"] .form-control::placeholder { color: #64748B; }
[data-theme="dark"] .form-control:focus {
    background: #1E293B;
    border-color: #3B82F6;
    color: #F1F5F9;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

[data-theme="dark"] .form-select:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* Accordion */
[data-theme="dark"] .efla-accordion .accordion-item {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .efla-accordion .accordion-button {
    background: #1E293B;
    color: #F1F5F9;
}

[data-theme="dark"] .efla-accordion .accordion-button:not(.collapsed) {
    background: rgba(59,130,246,.08);
    color: #3B82F6;
}

[data-theme="dark"] .efla-accordion .accordion-body {
    background: #1E293B;
    color: #94A3B8;
}

/* Badge */
[data-theme="dark"] .badge.bg-light {
    background: #334155 !important;
    color: #CBD5E1 !important;
}

/* TOC Nav */
[data-theme="dark"] .toc-nav {
    background: #1E293B;
    border-color: #334155;
}

/* Sidebar widgets */
[data-theme="dark"] .efla-widget {
    background: #1E293B;
    border-color: #334155;
}

[data-theme="dark"] .efla-widget .widget-title {
    border-bottom-color: #334155;
    color: #F1F5F9;
}

/* Form section */
[data-theme="dark"] .form-section {
    background: #1E293B;
    border-color: #334155;
}

/* Upload area */
[data-theme="dark"] .upload-area {
    border-color: #334155;
}

[data-theme="dark"] .upload-area:hover {
    border-color: #3B82F6;
    background: rgba(59,130,246,.05);
}

/* Login card */
[data-theme="dark"] .login-card {
    background: #1E293B;
    border-color: #334155;
}

/* Page review steps */
[data-theme="dark"] .form-step-bubble {
    background: #334155;
    border-color: #334155;
    color: #94A3B8;
}

/* Map placeholder */
[data-theme="dark"] .map-placeholder {
    background: #1E293B;
    border-color: #334155;
    color: #64748B;
}

/* Back to top */
[data-theme="dark"] .back-to-top {
    background: #1E293B;
    border-color: #334155;
    color: #3B82F6;
}

[data-theme="dark"] .back-to-top:hover {
    background: #3B82F6;
    color: #fff;
}

/* Preloader */
[data-theme="dark"] #efla-preloader {
    background: #0F172A;
}

/* Modal (Bootstrap) */
[data-theme="dark"] .modal-content {
    background: #1E293B;
    border-color: #334155;
    color: #F1F5F9;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #334155;
}

[data-theme="dark"] .modal-footer {
    border-top-color: #334155;
}

/* Tables */
[data-theme="dark"] .table {
    color: #CBD5E1;
    border-color: #334155;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background: rgba(255,255,255,.02);
    color: #CBD5E1;
}

[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background: rgba(59,130,246,.06);
}

/* Carousel */
[data-theme="dark"] .carousel-control-prev-icon,
[data-theme="dark"] .carousel-control-next-icon {
    filter: invert(0);
}

/* Separator in breadcrumb */
[data-theme="dark"] .efla-breadcrumb {
    color: rgba(255,255,255,.5);
}

[data-theme="dark"] .efla-breadcrumb a {
    color: rgba(255,255,255,.6);
}

/* Section backgrounds */
[data-theme="dark"] section[style*="background: var(--efla-bg-alt)"],
[data-theme="dark"] .section-alt-bg {
    background: #1A2744 !important;
}

/* Pagination */
[data-theme="dark"] .efla-pagination a,
[data-theme="dark"] .efla-pagination span {
    border-color: #334155;
    color: #CBD5E1;
    background: #1E293B;
}

[data-theme="dark"] .efla-pagination a:hover,
[data-theme="dark"] .efla-pagination span.current {
    background: #3B82F6;
    border-color: #3B82F6;
    color: #fff;
}

/* Tags / Badges */
[data-theme="dark"] .university-badge {
    filter: brightness(0.85);
}

/* Text colors */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #F1F5F9;
}

[data-theme="dark"] .text-muted {
    color: #64748B !important;
}

/* Programs scroll container */
[data-theme="dark"] .programs-scroll-container {
    scrollbar-color: #3B82F6 #1E293B;
}

/* Input group */
[data-theme="dark"] .input-group-text {
    background: #1E293B;
    border-color: #334155;
    color: #94A3B8;
}

/* Alert overrides */
[data-theme="dark"] .alert-info {
    background: rgba(59,130,246,.1);
    border-color: rgba(59,130,246,.3);
    color: #93C5FD;
}

/* ================================================
   Global light/dark consistency fixes
   These rules keep Bootstrap utility classes readable in dark mode.
   ================================================ */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] body,
[data-theme="dark"] main,
[data-theme="dark"] .site,
[data-theme="dark"] .site-main {
    background: var(--efla-bg) !important;
    color: var(--efla-text) !important;
}

[data-theme="dark"] .bg-light,
[data-theme="dark"] section.bg-light,
[data-theme="dark"] .bg-white,
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .list-group-item {
    background-color: var(--efla-bg-alt) !important;
    color: var(--efla-text) !important;
    border-color: var(--efla-border) !important;
}

[data-theme="dark"] .card .card-body,
[data-theme="dark"] .card h1,
[data-theme="dark"] .card h2,
[data-theme="dark"] .card h3,
[data-theme="dark"] .card h4,
[data-theme="dark"] .card h5,
[data-theme="dark"] .card h6,
[data-theme="dark"] .bg-light h1,
[data-theme="dark"] .bg-light h2,
[data-theme="dark"] .bg-light h3,
[data-theme="dark"] .bg-light h4,
[data-theme="dark"] .bg-light h5,
[data-theme="dark"] .bg-light h6,
[data-theme="dark"] .alert h1,
[data-theme="dark"] .alert h2,
[data-theme="dark"] .alert h3,
[data-theme="dark"] .alert h4,
[data-theme="dark"] .alert h5,
[data-theme="dark"] .alert h6 {
    color: var(--efla-text) !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .card .text-muted,
[data-theme="dark"] .bg-light .text-muted,
[data-theme="dark"] .alert .text-muted,
[data-theme="dark"] small.text-muted {
    color: #A8B3C7 !important;
}

[data-theme="dark"] .text-dark,
[data-theme="dark"] .card .text-dark,
[data-theme="dark"] .bg-light .text-dark,
[data-theme="dark"] .alert .text-dark {
    color: #F8FAFC !important;
}

[data-theme="dark"] .alert-light,
[data-theme="dark"] .alert-secondary {
    background-color: var(--efla-bg-subtle) !important;
    border-color: var(--efla-border) !important;
    color: #D7DEEA !important;
}

[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end {
    border-color: var(--efla-border) !important;
}

[data-theme="dark"] .shadow-sm,
[data-theme="dark"] .shadow,
[data-theme="dark"] .shadow-lg,
[data-theme="dark"] .shadow-xl {
    box-shadow: var(--shadow-md) !important;
}

[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.lang-btn) {
    color: #93C5FD;
}

[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.lang-btn):hover {
    color: #BFDBFE;
}

/* Service detail page: keep nested cards readable in both modes */
[data-theme="dark"] article[id="placement"],
[data-theme="dark"] article[id="visa"],
[data-theme="dark"] article[id="accommodation"],
[data-theme="dark"] article[id="scholarship"],
[data-theme="dark"] article[id="language"],
[data-theme="dark"] article[id="airport"],
[data-theme="dark"] article[id="insurance"] {
    color: var(--efla-text) !important;
}

[data-theme="dark"] article[id="placement"] .bg-light,
[data-theme="dark"] article[id="visa"] .bg-light,
[data-theme="dark"] article[id="accommodation"] .bg-light,
[data-theme="dark"] article[id="scholarship"] .bg-light,
[data-theme="dark"] article[id="language"] .bg-light,
[data-theme="dark"] article[id="airport"] .bg-light,
[data-theme="dark"] article[id="insurance"] .bg-light {
    background: #111936 !important;
    border: 1px solid var(--efla-border) !important;
}

[data-theme="dark"] .badge.bg-white {
    background: #F8FAFC !important;
    color: #1E40AF !important;
}

[data-theme="light"] .card,
[data-theme="light"] .bg-light,
[data-theme="light"] .alert-light {
    color: #0A0C18;
}

/* EFLA fixes: language dropdown + service detail dark mode */
[data-theme="dark"] .lang-current {
    color: rgba(255,255,255,.92);
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.08);
}
[data-theme="dark"] #efla-navbar.scrolled .lang-current {
    color: var(--efla-text);
    border-color: var(--efla-border);
    background: var(--efla-surface);
}
[data-theme="dark"] .lang-dropdown-menu {
    background: var(--efla-surface);
    border-color: var(--efla-border);
}
[data-theme="dark"] .lang-dropdown-menu .dropdown-item.lang-btn {
    color: var(--efla-text);
}
[data-theme="dark"] .lang-dropdown-menu .dropdown-item.lang-btn .lang-code {
    background: rgba(96,165,250,.14);
    color: #93c5fd;
}
[data-theme="dark"] .lang-dropdown-menu .dropdown-item.lang-btn:hover,
[data-theme="dark"] .lang-dropdown-menu .dropdown-item.lang-btn.active {
    background: rgba(251,191,36,.18);
    color: #f8fafc;
}
[data-theme="dark"] .service-feature-box,
[data-theme="dark"] .service-side-list a {
    background: var(--efla-bg-soft);
    color: var(--efla-text);
    border-color: var(--efla-border);
}
[data-theme="dark"] .service-side-list a span {
    background: var(--efla-surface);
    color: #93c5fd;
}
[data-theme="dark"] .service-side-list a:hover,
[data-theme="dark"] .service-side-list a.active {
    background: rgba(96,165,250,.14);
    color: #bfdbfe;
    border-color: rgba(147,197,253,.25);
}
[data-theme="dark"] .service-legal-note {
    background: var(--efla-surface);
    color: var(--efla-text-muted);
    border-color: var(--efla-border) !important;
}
[data-theme="dark"] .service-legal-note strong { color: var(--efla-text); }
[data-theme="dark"] .service-detail-body.bg-light { background: var(--efla-bg) !important; }

/* EFLA university custom popup/card fix in dark mode
   Problem: theme makes all headings white in dark mode, but university popup remains white.
*/
[data-theme="dark"] .efla-university-profile [class*="modal"],
[data-theme="dark"] .efla-university-profile [class*="popup"],
[data-theme="dark"] .efla-university-profile [class*="dialog"],
[data-theme="dark"] .efla-university-profile [role="dialog"],
[data-theme="dark"] .efla-university-profile .efla-program-modal,
[data-theme="dark"] .efla-university-profile .efla-program-popup,
[data-theme="dark"] .efla-university-profile .program-modal,
[data-theme="dark"] .efla-university-profile .program-popup {
    background: #ffffff !important;
    color: #334155 !important;
    color-scheme: light !important;
}

[data-theme="dark"] .efla-university-profile [class*="modal"] h1,
[data-theme="dark"] .efla-university-profile [class*="modal"] h2,
[data-theme="dark"] .efla-university-profile [class*="modal"] h3,
[data-theme="dark"] .efla-university-profile [class*="modal"] h4,
[data-theme="dark"] .efla-university-profile [class*="popup"] h1,
[data-theme="dark"] .efla-university-profile [class*="popup"] h2,
[data-theme="dark"] .efla-university-profile [class*="popup"] h3,
[data-theme="dark"] .efla-university-profile [class*="popup"] h4,
[data-theme="dark"] .efla-university-profile [role="dialog"] h1,
[data-theme="dark"] .efla-university-profile [role="dialog"] h2,
[data-theme="dark"] .efla-university-profile [role="dialog"] h3,
[data-theme="dark"] .efla-university-profile [role="dialog"] h4,
[data-theme="dark"] .efla-university-profile .efla-program-modal h1,
[data-theme="dark"] .efla-university-profile .efla-program-modal h2,
[data-theme="dark"] .efla-university-profile .efla-program-modal h3,
[data-theme="dark"] .efla-university-profile .efla-program-popup h1,
[data-theme="dark"] .efla-university-profile .efla-program-popup h2,
[data-theme="dark"] .efla-university-profile .efla-program-popup h3 {
    color: #0f172a !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #0f172a !important;
    text-shadow: none !important;
    mix-blend-mode: normal !important;
}

[data-theme="dark"] .efla-university-profile [class*="modal"] p,
[data-theme="dark"] .efla-university-profile [class*="popup"] p,
[data-theme="dark"] .efla-university-profile [role="dialog"] p,
[data-theme="dark"] .efla-university-profile [class*="modal"] span,
[data-theme="dark"] .efla-university-profile [class*="popup"] span,
[data-theme="dark"] .efla-university-profile [role="dialog"] span {
    color: #475569 !important;
    -webkit-text-fill-color: #475569 !important;
    opacity: 1 !important;
}

[data-theme="dark"] .efla-university-profile [class*="modal"] .efla-btn,
[data-theme="dark"] .efla-university-profile [class*="popup"] .efla-btn,
[data-theme="dark"] .efla-university-profile [role="dialog"] .efla-btn,
[data-theme="dark"] .efla-university-profile [class*="modal"] button,
[data-theme="dark"] .efla-university-profile [class*="popup"] button,
[data-theme="dark"] .efla-university-profile [role="dialog"] button {
    -webkit-text-fill-color: currentColor !important;
}


/* =========================================================
   EFLA University detail page: readable text inside light cards
   Applies regardless of dark-mode selector because cards stay white.
   ========================================================= */

.efla-university-profile .efla-info-card,
.efla-university-profile .efla-soft-card,
.efla-university-profile .efla-side-card,
.efla-university-profile .efla-program-card,
.efla-university-profile .efla-faq-item,
.efla-university-profile .efla-cta-card,
.efla-university-profile .efla-related-list a,
.efla-university-profile [class*="card"],
.efla-university-profile [class*="modal"],
.efla-university-profile [class*="popup"] {
    color-scheme: light !important;
}

.efla-university-profile .efla-info-card h1,
.efla-university-profile .efla-info-card h2,
.efla-university-profile .efla-info-card h3,
.efla-university-profile .efla-info-card h4,
.efla-university-profile .efla-soft-card h1,
.efla-university-profile .efla-soft-card h2,
.efla-university-profile .efla-soft-card h3,
.efla-university-profile .efla-soft-card h4,
.efla-university-profile .efla-side-card h1,
.efla-university-profile .efla-side-card h2,
.efla-university-profile .efla-side-card h3,
.efla-university-profile .efla-side-card h4,
.efla-university-profile .efla-program-card h1,
.efla-university-profile .efla-program-card h2,
.efla-university-profile .efla-program-card h3,
.efla-university-profile .efla-program-card h4,
.efla-university-profile .efla-faq-item summary,
.efla-university-profile .efla-related-list strong,
.efla-university-profile .efla-side-list strong,
.efla-university-profile .efla-cta-card h1,
.efla-university-profile .efla-cta-card h2,
.efla-university-profile .efla-cta-card h3,
.efla-university-profile [class*="card"] h1,
.efla-university-profile [class*="card"] h2,
.efla-university-profile [class*="card"] h3,
.efla-university-profile [class*="card"] h4,
.efla-university-profile [class*="modal"] h1,
.efla-university-profile [class*="modal"] h2,
.efla-university-profile [class*="modal"] h3,
.efla-university-profile [class*="modal"] h4,
.efla-university-profile [class*="popup"] h1,
.efla-university-profile [class*="popup"] h2,
.efla-university-profile [class*="popup"] h3,
.efla-university-profile [class*="popup"] h4 {
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    opacity: 1 !important;
    text-shadow: none !important;
    mix-blend-mode: normal !important;
}

.efla-university-profile .efla-info-card span,
.efla-university-profile .efla-program-meta,
.efla-university-profile .efla-side-list span,
.efla-university-profile [class*="label"],
.efla-university-profile [class*="eyebrow"],
.efla-university-profile [class*="meta"] {
    color: #64748b !important;
    -webkit-text-fill-color: #64748b !important;
    opacity: 1 !important;
}

.efla-university-profile .efla-info-card p,
.efla-university-profile .efla-soft-card p,
.efla-university-profile .efla-side-card p,
.efla-university-profile .efla-program-card p,
.efla-university-profile .efla-faq-item div,
.efla-university-profile .efla-prose,
.efla-university-profile .efla-bullets,
.efla-university-profile [class*="card"] p,
.efla-university-profile [class*="modal"] p,
.efla-university-profile [class*="popup"] p {
    color: #475569 !important;
    -webkit-text-fill-color: #475569 !important;
    opacity: 1 !important;
}

