/* Global light/dark theme tokens. Dark Mode is the same design, inverted surfaces. */

:root {
  --color-bg: #ffffff;
  --color-bg-muted: #f4f8ec;
  --color-surface: #ffffff;
  --color-surface-2: #f5f9ee;
  --color-text: #616161;
  --color-text-muted: #7a8470;
  --color-title: #0c0551;
  --color-border: rgba(12, 5, 81, 0.12);
  --color-shadow: rgba(12, 5, 81, 0.12);
  --color-header-bg: #f4f8ec;
  --color-header-sticky: #0c0551;
  --color-footer-bg: #0c0551;
  --color-icon: #0c0551;
  --color-overlay: rgba(12, 5, 81, 0.88);
  --color-input-bg: #ffffff;
  --color-disabled: #9aa193;
}

html {
  color-scheme: light;
  background-color: var(--color-bg);
}

html[data-theme='dark'] {
  color-scheme: dark;
  /* Keep navy as a brand fill. Do not remap --title-color — the template
     uses it for both headings and navy backgrounds. Text uses --color-title. */
  --text-color: #c5ccb8;
  --box-bg: #120c3a;
  --box-bg2: #16104a;
  --bg-white: #120c3a;
  --section-background-2: #07051c;
  --natural: #120c3a;
  --btn-color-hover: #ffffff;
  --btn-border-hover: #92c73e;
  --btn-bg-hover: #0c0551;

  --color-bg: #07051c;
  --color-bg-muted: #0c0551;
  --color-surface: #120c3a;
  --color-surface-2: #16104a;
  --color-text: #c5ccb8;
  --color-text-muted: #9aa58e;
  --color-title: #f3f6ea;
  --color-border: rgba(243, 246, 234, 0.14);
  --color-shadow: rgba(0, 0, 0, 0.45);
  --color-header-bg: #0c0551;
  --color-header-sticky: #050317;
  --color-footer-bg: #050317;
  --color-icon: #f3f6ea;
  --color-overlay: rgba(5, 3, 23, 0.88);
  --color-input-bg: #100b32;
  --color-disabled: #6b735f;
  --primary-color: #92c73e;
  --theme-color: #92c73e;
  --btn-color: #92c73e;
  --btn-border: #92c73e;
  --btn-bg: #92c73e;
  scrollbar-color: #92c73e #120c3a;
}

html[data-theme='dark'],
html[data-theme='dark'] body,
html[data-theme='dark'] #root {
  background-color: var(--color-bg);
  color: var(--color-text);
}

html[data-theme='dark'] body,
html[data-theme='dark'] p,
html[data-theme='dark'] label,
html[data-theme='dark'] td,
html[data-theme='dark'] th {
  color: var(--color-text);
}

html[data-theme='dark'] h1,
html[data-theme='dark'] h2,
html[data-theme='dark'] h3,
html[data-theme='dark'] h4,
html[data-theme='dark'] h5,
html[data-theme='dark'] h6 {
  color: var(--color-title);
}

/* Surfaces / sections */
html[data-theme='dark'] .site-header-stack,
html[data-theme='dark'] .educate-header-area {
  background-color: var(--color-header-bg);
}

html[data-theme='dark'] .educate-header-area.sticky {
  background-color: var(--color-header-sticky) !important;
}

html[data-theme='dark'] .hero_area,
html[data-theme='dark'] .blog-area,
html[data-theme='dark'] .blog-details-area,
html[data-theme='dark'] .articles-publications-area,
html[data-theme='dark'] .home-events-area,
html[data-theme='dark'] .library-area,
html[data-theme='dark'] .about-area,
html[data-theme='dark'] .contact_area,
html[data-theme='dark'] .breadcumb-area,
html[data-theme='dark'] .course-sign-form-area,
html[data-theme='dark'] .center-mission-area,
html[data-theme='dark'] .testimonial-area,
html[data-theme='dark'] .home-testimonial-area,
html[data-theme='dark'] .partners-brand-area,
html[data-theme='dark'] .maqasid-about-intro,
html[data-theme='dark'] .error-area,
html[data-theme='dark'] section,
html[data-theme='dark'] .container {
  background-color: transparent;
}

html[data-theme='dark'] .blog-area.style-one,
html[data-theme='dark'] .articles-publications-area,
html[data-theme='dark'] .home-events-area,
html[data-theme='dark'] .library-area,
html[data-theme='dark'] .about-area,
html[data-theme='dark'] .contact_area,
html[data-theme='dark'] .course-sign-form-area,
html[data-theme='dark'] .maqasid-about-intro,
html[data-theme='dark'] .center-mission-area,
html[data-theme='dark'] .testimonial-area,
html[data-theme='dark'] .error-area {
  background-image: none;
  background-color: var(--color-bg);
}

html[data-theme='dark'] .hero_area.style-one {
  background-color: var(--color-bg);
}

html[data-theme='dark'] .breadcumb-area {
  background-color: var(--color-bg-muted);
}

html[data-theme='dark'] .footer-area {
  background-color: var(--color-footer-bg);
}

html[data-theme='dark'] .center-mission-panel,
html[data-theme='dark'] .maqasid-about-text-card,
html[data-theme='dark'] .articles-pub-card,
html[data-theme='dark'] .library-card,
html[data-theme='dark'] .home-event-card,
html[data-theme='dark'] .single-blog-box,
/* .blog-details-area .row.blogs-pr dropped: detail pages no longer draw a framed card */
html[data-theme='dark'] .site-search-card,
html[data-theme='dark'] .sign-form,
html[data-theme='dark'] .sign-form-wrapper,
html[data-theme='dark'] .course-sign-in,
html[data-theme='dark'] .admin-card,
html[data-theme='dark'] .language-switcher__menu,
html[data-theme='dark'] .home-event-body,
html[data-theme='dark'] .articles-pub-card-body {
  background: var(--color-surface);
  background-color: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: 0 14px 36px var(--color-shadow);
  color: var(--color-text);
}

html[data-theme='dark'] .articles-pub-card,
html[data-theme='dark'] .library-card,
html[data-theme='dark'] .home-event-card {
  border: 1px solid var(--color-border);
}

html[data-theme='dark'] .articles-pub-card-category,
html[data-theme='dark'] .home-event-type,
html[data-theme='dark'] .articles-pub-card-more,
html[data-theme='dark'] .home-event-more {
  color: var(--primary-color);
}

html[data-theme='dark'] .articles-pub-card-body h3 a,
html[data-theme='dark'] .home-event-body h3,
html[data-theme='dark'] .home-event-body h3 a,
html[data-theme='dark'] .blog-title,
html[data-theme='dark'] .blog-title2,
html[data-theme='dark'] .section_title h1,
html[data-theme='dark'] .home-events-title,
html[data-theme='dark'] .articles-publications-head h1,
html[data-theme='dark'] .center-mission-title,
html[data-theme='dark'] .hero_content h1 {
  color: var(--color-title);
}

html[data-theme='dark'] .home-events-desc,
html[data-theme='dark'] .hero_content p,
html[data-theme='dark'] .center-mission-text,
html[data-theme='dark'] .articles-publications-empty,
html[data-theme='dark'] .home-events-empty {
  color: var(--color-text-muted);
}

html[data-theme='dark'] .educate-header-area .header-menu > ul > li > a,
html[data-theme='dark'] .educate-header-area .header-menu > ul > li > a i {
  color: #fff;
}

html[data-theme='dark'] .header-logo .active_logo {
  display: none !important;
}

html[data-theme='dark'] .header-logo .logo_two {
  display: block !important;
}

html[data-theme='dark'] input,
html[data-theme='dark'] textarea,
html[data-theme='dark'] select {
  background-color: var(--color-input-bg);
  color: var(--color-title);
  border-color: var(--color-border);
}

html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder {
  color: var(--color-text-muted);
}

html[data-theme='dark'] input:disabled,
html[data-theme='dark'] textarea:disabled,
html[data-theme='dark'] select:disabled,
html[data-theme='dark'] button:disabled {
  opacity: 0.55;
  color: var(--color-disabled);
}

html[data-theme='dark'] .language-switcher__menu {
  background: var(--color-surface);
  border-color: var(--color-border);
}

html[data-theme='dark'] .language-switcher__option {
  color: var(--color-title);
}

html[data-theme='dark'] .language-switcher__option:hover {
  background: rgba(146, 199, 62, 0.16);
  color: var(--primary-color);
}

html[data-theme='dark'] .language-switcher__option.is-active {
  background: var(--primary-color);
  color: #0c0551;
}

html[data-theme='dark'] .xs-bg-black,
html[data-theme='dark'] .xs-sidebar-group .xs-overlay {
  background-color: var(--color-overlay);
}

html[data-theme='dark'] .xs-sidebar-widget,
html[data-theme='dark'] .sidebar-widget-container {
  background-color: var(--color-surface);
  color: var(--color-text);
}

html[data-theme='dark'] .admin-shell {
  --admin-bg: #07051c;
  --admin-text: #f3f6ea;
  --admin-muted: #9aa58e;
  --admin-card: #120c3a;
  --admin-border: rgba(243, 246, 234, 0.14);
}

html[data-theme='dark'] .admin-sidebar-brand img {
  background: #fff;
}

html[data-theme='dark'] .admin-topbar,
html[data-theme='dark'] .admin-content,
html[data-theme='dark'] .admin-main {
  background: var(--admin-bg);
  color: var(--admin-text);
}

html[data-theme='dark'] table,
html[data-theme='dark'] .admin-table,
html[data-theme='dark'] .table {
  color: var(--color-text);
  background: var(--color-surface);
}

html[data-theme='dark'] hr,
html[data-theme='dark'] .border,
html[data-theme='dark'] [class*='border-'] {
  border-color: var(--color-border);
}

html[data-theme='dark'] .mean-container .mean-nav ul li,
html[data-theme='dark'] .mean-container .mean-nav ul li a {
  background: var(--color-surface);
  color: var(--color-title);
  border-color: var(--color-border);
}

html[data-theme='dark'] .mobile-lang-switcher {
  background: var(--color-header-bg);
}

html[data-theme='dark'] .header-menu ul.sub_menu,
html[data-theme='dark'] .header-menu ul .sub_menu {
  background: var(--color-surface);
  border-color: var(--color-border);
}

html[data-theme='dark'] .header-menu ul .sub_menu > li > a {
  color: var(--color-title);
}

html[data-theme='dark'] .header-menu ul .sub_menu > li > a:hover {
  color: var(--primary-color);
}

html[data-theme='dark'] .search-body,
html[data-theme='dark'] .search-box {
  background: var(--color-surface);
  color: var(--color-title);
}

html[data-theme='dark'] .educate-header-area .search-box-btn i,
html[data-theme='dark'] .mobile-menu-area .search-box-btn i {
  color: #fff;
}

html[data-theme='dark'] .partners-brand-area,
html[data-theme='dark'] .brand-area,
html[data-theme='dark'] .brand-section {
  background-color: var(--color-bg);
}

html[data-theme='dark'] .blog-content,
html[data-theme='dark'] .blog-content p,
html[data-theme='dark'] .single-blog-dtls-box {
  color: var(--color-text);
  background-color: transparent;
}

html[data-theme='dark'] .center-mission-panel {
  background:
    radial-gradient(circle at 12% 20%, rgba(146, 199, 62, 0.16), transparent 42%),
    var(--color-surface);
}

html[data-theme='dark'] .breadcumb-area,
html[data-theme='dark'] .breadcumb-area.two {
  background-image: none;
  background-color: var(--color-bg-muted);
}

html[data-theme='dark'] .breadcumb-title h4,
html[data-theme='dark'] .breadcumb-content ul li,
html[data-theme='dark'] .seminars-page-head h1,
html[data-theme='dark'] .seminar-card-body h3,
html[data-theme='dark'] .event-register-form-head h3,
html[data-theme='dark'] .event-success-popup-panel h4,
html[data-theme='dark'] .event-register-page-summary h1,
html[data-theme='dark'] .admin-partner-preview-card p {
  color: var(--color-title);
}

html[data-theme='dark'] .search-popup {
  background-color: var(--color-bg);
  color: var(--color-title);
}

html[data-theme='dark'] .search-popup .form-group input[type='text'],
html[data-theme='dark'] .search-popup .form-group input[type='search'] {
  background-color: var(--color-input-bg);
  color: var(--color-title);
  border-color: var(--color-border);
}

html[data-theme='dark'] .cart_sidebar,
html[data-theme='dark'] .single-testi-box,
html[data-theme='dark'] .testi-box,
html[data-theme='dark'] .testi-autor-box,
html[data-theme='dark'] .comment-form,
html[data-theme='dark'] .comment-box,
html[data-theme='dark'] .blog-reply-form-wrap,
html[data-theme='dark'] .pagination-menu ul li a,
html[data-theme='dark'] .seminar-card,
html[data-theme='dark'] .event-register-page-summary,
html[data-theme='dark'] .event-register-lightbox-panel,
html[data-theme='dark'] .event-success-popup-panel,
html[data-theme='dark'] .event-register-page-form-wrap,
html[data-theme='dark'] .library-card,
html[data-theme='dark'] .library-area--pdf .library-card--pdf,
html[data-theme='dark'] .library-area--pdf .library-card--pdf.box-2,
html[data-theme='dark'] .library-area--pdf .library-card--pdf.box-3,
html[data-theme='dark'] .library-area--pdf .library-card--pdf.box-4,
html[data-theme='dark'] .maqasid-about-text-card,
html[data-theme='dark'] .article-pdf-download,
html[data-theme='dark'] .article-pdf-viewer-wrap,
html[data-theme='dark'] .article-pdf-viewer-label,
html[data-theme='dark'] .activity-details-panel,
html[data-theme='dark'] .activity-details-highlights li,
html[data-theme='dark'] .admin-logout-btn,
html[data-theme='dark'] .admin-secondary-btn,
html[data-theme='dark'] .admin-table-wrap,
html[data-theme='dark'] .admin-text-editor-modal,
html[data-theme='dark'] .admin-text-editor-table,
html[data-theme='dark'] .admin-role-list-item,
html[data-theme='dark'] .admin-privilege-check,
html[data-theme='dark'] .sign-form,
html[data-theme='dark'] .sign-form-wrapper,
html[data-theme='dark'] .form-input input,
html[data-theme='dark'] .form-input-box,
html[data-theme='dark'] .course-sign-in,
html[data-theme='dark'] .alert-box,
html[data-theme='dark'] .style-one .accordion li a,
html[data-theme='dark'] .style-one .accordion li p {
  background: var(--color-surface);
  background-color: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
  box-shadow: 0 14px 36px var(--color-shadow);
}

html[data-theme='dark'] .single-brand-box,
html[data-theme='dark'] .admin-partner-preview-card .brand-thumb,
html[data-theme='dark'] .admin-pub-list-item img {
  background: #f3f6ea;
}

html[data-theme='dark'] .hero-shape1,
html[data-theme='dark'] .hero-shape2,
html[data-theme='dark'] .hero-shape3 {
  opacity: 0.4;
}

html[data-theme='dark'] .news-feed-area,
html[data-theme='dark'] .seminars-page-area,
html[data-theme='dark'] .home-events-area,
html[data-theme='dark'] .articles-publications-area {
  background: var(--color-bg);
}

html[data-theme='dark'] .admin-role-list-item.is-active,
html[data-theme='dark'] .admin-privilege-check.is-on {
  background: var(--color-surface-2);
  border-color: var(--primary-color);
  color: var(--color-title);
}

html[data-theme='dark'] .admin-inline-msg--warn,
html[data-theme='dark'] .admin-role-pill.role-user {
  background: rgba(180, 83, 9, 0.18);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

html[data-theme='dark'] .admin-danger-btn {
  background: rgba(240, 180, 180, 0.12);
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.35);
}

html[data-theme='dark'] .pagination-menu ul li a:hover,
html[data-theme='dark'] .pagination-menu ul li.active a {
  background: var(--primary-color);
  color: #0c0551;
}

html[data-theme='dark'] .home-event-card:hover,
html[data-theme='dark'] .articles-pub-card:hover,
html[data-theme='dark'] .library-card:hover,
html[data-theme='dark'] .seminar-card:hover {
  box-shadow: 0 18px 42px var(--color-shadow);
}

html[data-theme='dark'] .footer-area,
html[data-theme='dark'] .footer-bottom-area {
  background-color: var(--color-footer-bg);
  color: #fff;
}

html[data-theme='dark'] .footer-area input,
html[data-theme='dark'] .subscribe-box input {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

html[data-theme='dark'] .footer-area p,
html[data-theme='dark'] .footer-area span,
html[data-theme='dark'] .footer-area li,
html[data-theme='dark'] .footer-area a,
html[data-theme='dark'] .footer-area h1,
html[data-theme='dark'] .footer-area h2,
html[data-theme='dark'] .footer-area h3,
html[data-theme='dark'] .footer-area h4,
html[data-theme='dark'] .footer-area h5,
html[data-theme='dark'] .footer-area h6 {
  color: #fff;
}

html[data-theme='dark'] .footer-widget-menu ul li a:hover {
  color: var(--primary-color);
}

html[data-theme='dark'] .style-one .accordion li a {
  color: var(--color-title) !important;
}

html[data-theme='dark'] .form-input-title label,
html[data-theme='dark'] .sign-form-title,
html[data-theme='dark'] .sign-in-title,
html[data-theme='dark'] .blog-details-area h2.blog-title,
html[data-theme='dark'] .blog-details-area .blog-content h2.blog-title a,
html[data-theme='dark'] .blog-details-area h2.blog-title2,
html[data-theme='dark'] .blog-details-area h2.blog-title2 a {
  color: var(--color-title);
}

html[data-theme='dark'] .blog-details-area p.blog-desc2 {
  color: var(--color-text);
}

html[data-theme='dark'] a.articles-pub-card-more,
html[data-theme='dark'] a.home-event-more,
html[data-theme='dark'] a.articles-pub-card-pdf-link {
  color: var(--primary-color);
}

.educate-header-area.sticky .theme-toggle,
.mobile-menu-area .theme-toggle {
  background: #92c73e;
  color: #0c0551;
}

.educate-header-area.sticky .search-box-btn i,
.mobile-menu-area .search-box-btn i {
  color: #fff;
}

html[data-theme='dark'] .contact-form-box,
html[data-theme='dark'] .form-box,
html[data-theme='dark'] .inner_section .contact-form-box,
html[data-theme='dark'] .blog-details-comment-reply,
html[data-theme='dark'] .comments-area,
html[data-theme='dark'] .single-comment-box {
  background: var(--color-surface);
  background-color: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

html[data-theme='dark'] .mobile-menu-area,
html[data-theme='dark'] .mean-container .mean-bar {
  background: var(--color-header-bg) !important;
}

html[data-theme='dark'] .style-one .blog-title h3 a,
html[data-theme='dark'] .blog-title,
html[data-theme='dark'] .blog-title a {
  color: var(--color-title);
}

html[data-theme='dark'] ::selection {
  background: rgba(146, 199, 62, 0.35);
  color: #f3f6ea;
}

html[data-theme='dark'] :focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #0c0551;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: none;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: #92c73e;
  color: #0c0551;
  outline: none;
}

.theme-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(146, 199, 62, 0.45);
}

.theme-toggle i {
  font-size: 1rem;
  line-height: 1;
}

html[data-theme='dark'] .theme-toggle {
  background: #92c73e;
  color: #0c0551;
}

html[data-theme='dark'] .theme-toggle:hover,
html[data-theme='dark'] .theme-toggle:focus-visible {
  background: #fff;
  color: #0c0551;
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle {
    transition: none;
  }
}
