/* ===============================================================
  DIGIKOVA WEBSITE PUBLIK | Tema Terang + Gelap
  Muat SETELAH digikova.css (tanpa mengubah CSS admin atau login).
  Default = DARK, LIGHT aktif pada html[data-public-theme="light"].
================================================================ */

/* Tombol toggle, semua mode */
.public-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 7px 11px; flex-shrink: 0;
  border: 1px solid rgba(80,220,218,.35); border-radius: 12px;
  background: rgba(30,65,90,.54); color: #d8f5fb;
  font: 700 11px/1.25 'Segoe UI',system-ui,sans-serif;
  white-space: nowrap; transition: transform .2s, background .2s, border-color .2s;
}
.public-theme-toggle:hover { background: #154764; border-color: #35dccc; transform: translateY(-1px); }
.public-theme-toggle svg { width: 17px; height: 17px; }
.public-theme-toggle .public-theme-moon { display: none; }
.public-theme-toggle:focus-visible { outline: 2px solid #23c5c0; outline-offset: 3px; }
html[data-public-theme="light"] .public-theme-toggle .public-theme-sun { display: none; }
html[data-public-theme="light"] .public-theme-toggle .public-theme-moon { display: inline-block; }

/* IMPORTANT: applied only to public pages, not the admin theme */
html[data-public-theme="light"] {
  color-scheme: light;
  --bg: #f2f8fc;
  --bg2: #edf5fb;
  --panel: #ffffff;
  --panel2: #f0f8fb;
  --line: rgba(19,84,119,.17);
  --text: #173147;
  --muted: #557489;
  --mint: #008a80;
  --cyan: #017da7;
  --violet: #6855b5;
}
html[data-public-theme="light"] body { background: #f2f8fc; color: #173147; }
html[data-public-theme="light"] :is(.about,.inner-section,.products,.process) { background: #f3f8fc; }
html[data-public-theme="light"] :is(.services,.media,.contact,.inner-cta) { background: #eaf3fa; }
html[data-public-theme="light"] :is(.hero,.inner-hero) {
  background:
    radial-gradient(ellipse 62% 68% at 80% 38%, rgba(115,214,225,.32),transparent 70%),
    linear-gradient(120deg, #eff8fd, #e3f2fa 76%);
  border-color: #d5e7ef;
}
html[data-public-theme="light"] .top-note {
  background: linear-gradient(95deg,#d7f9f3,#e1edff 64%,#e6e1ff);
  color: #176877;
}
html[data-public-theme="light"] .site-header {
  background: rgba(255,255,255,.94); border-bottom-color: #d7e6ed;
  box-shadow: 0 5px 22px rgba(27,84,114,.07);
}
html[data-public-theme="light"] .brand .brand-text { color: #14364e; }
html[data-public-theme="light"] .brand .brand-text small { color: #4e7b90; }
html[data-public-theme="light"] :is(.nav-link,.nav-dropdown-toggle) { color: #3a5c71; }
html[data-public-theme="light"] :is(.nav-link:hover,.nav-dropdown-toggle:hover,.nav-link.active,.nav-dropdown.active .nav-dropdown-toggle) { color: #007b83; }
html[data-public-theme="light"] .public-theme-toggle { border-color: #b5d7df; color: #006d7b; background: #e3f6f8; }
html[data-public-theme="light"] .public-theme-toggle:hover { background: #cdf2f3; }
html[data-public-theme="light"] .mobile-menu-toggle { color: #155977; background: #e8f5fa; border-color: #c8e1ea; }
html[data-public-theme="light"] .primary-nav.open { background: #ffffff; border-bottom-color: #cfe4ec; }
html[data-public-theme="light"] .nav-dropdown.active .nav-dropdown-toggle { color: #007b83; }
html[data-public-theme="light"] .dropdown-menu {
  background: #fff; border: 1px solid #d9e7ef;
  box-shadow: 0 25px 70px rgba(14,62,91,.16);
}
html[data-public-theme="light"] .dropdown-title { color: #507e92; }
html[data-public-theme="light"] .dropdown-item strong { color: #173147; }
html[data-public-theme="light"] .dropdown-item small { color: #637f93; }
html[data-public-theme="light"] .dropdown-item:hover,html[data-public-theme="light"] .dropdown-item.active { background: #e6f5f7; }
html[data-public-theme="light"] .dropdown-all:hover { color: #005b66; }
html[data-public-theme="light"] .nav-cta { color: #023944; }

/* HERO / SECTION INTRO */
html[data-public-theme="light"] .hero h1,
html[data-public-theme="light"] .inner-hero h1 { color: #123249; }
html[data-public-theme="light"] .hero-copy>p,
html[data-public-theme="light"] .inner-hero p,
html[data-public-theme="light"] .section-head p { color: #55768b; }
html[data-public-theme="light"] .eyebrow { color: #007e7d; background: #e0faf5; border-color: #bce8e2; }
html[data-public-theme="light"] .gradient-text { background: linear-gradient(105deg, #008e86, #067cac 53%, #7452ce); background-clip: text; -webkit-background-clip:text; color: transparent; }
html[data-public-theme="light"] .hero-points,
html[data-public-theme="light"] .hero-bottom,
html[data-public-theme="light"] .hero-bottom div { color: #567e92; }
html[data-public-theme="light"] .btn-ghost { color: #18516d; background: #fff; border-color: #c6dce7; }
html[data-public-theme="light"] .btn-ghost:hover { background: #e1f1f8; }
html[data-public-theme="light"] .floating-tag { color: #11536e; background: rgba(250,254,255,.94); border-color: #b3dde4; }
html[data-public-theme="light"] :is(.tag-one,.tag-two) { color: #145b75; }
html[data-public-theme="light"] .hero-art>img { filter: drop-shadow(0 25px 24px rgba(36,97,148,.13)); }

/* ABOUT / MISSION */
html[data-public-theme="light"] :is(.about-showcase,.service-card,.product-card,.media-card,.value-item,.detail-panel,.detail-sidebar) {
  background: #fff;
  border-color: #d7e7ee;
  box-shadow: 0 15px 35px rgba(21,72,106,.06);
}
html[data-public-theme="light"] .about-showcase { background: linear-gradient(130deg,#e0f5fa,#e8e8ff); }
html[data-public-theme="light"] .core-center { color: #176c83; }
html[data-public-theme="light"] .about-quote,
html[data-public-theme="light"] .about-float { color: #347689; }
html[data-public-theme="light"] :is(.service-card h3,.media-card h3,.product-card h3,.value-item h3) { color: #16384e; }
html[data-public-theme="light"] :is(.value-item p,.service-card>p,.product-info p,.media-card p,.process-step p) { color: #55778d; }
html[data-public-theme="light"] .service-no { color: #bed8e1; }
html[data-public-theme="light"] .service-icon { background: #dff8f5; color: #008c91; }
html[data-public-theme="light"] .tags span { color: #346d83; background: #eff8fb; border-color: #d7eaf1; }
html[data-public-theme="light"] .text-link { color: #007d82; }
html[data-public-theme="light"] .text-link:hover { color: #005766; }
html[data-public-theme="light"] .product-image,
html[data-public-theme="light"] :is(.detail-visual,.category-banner) { background: #e9f4fa; border-color: #d8e7f0; }
html[data-public-theme="light"] .product-status { background: rgba(255,255,255,.93); color: #087b78; }
html[data-public-theme="light"] .product-info strong { color: #496c82; }
html[data-public-theme="light"] .sample-note,
html[data-public-theme="light"] .media-coming { color: #6f879a; }
html[data-public-theme="light"] .category-label.cyan { color: #007f81; }
html[data-public-theme="light"] .category-label.violet { color: #7051b7; }
html[data-public-theme="light"] .category-label.amber { color: #95600c; }
html[data-public-theme="light"] .process-step>span { color: #087d80; background: #d8f2f2; }
html[data-public-theme="light"] .process-line { background: #bedfe6; }

/* CTA tetap memiliki aksen brand tetapi teks harus kontras */
html[data-public-theme="light"] .contact-panel,
html[data-public-theme="light"] .callout-panel {
  background: linear-gradient(120deg,#d4f5f3,#e2f2ff 65%,#e8e4fb);
  border-color: #b8dfe5;
  box-shadow: 0 17px 45px rgba(42,109,143,.07);
}
html[data-public-theme="light"] .contact h2,
html[data-public-theme="light"] .callout-panel h2 { color: #133d50; }
html[data-public-theme="light"] .contact h2 span { color: #008d8a; }
html[data-public-theme="light"] .contact p,
html[data-public-theme="light"] .callout-panel p { color: #456b82; }
html[data-public-theme="light"] .decoration-text { color: #3c8a98; }
html[data-public-theme="light"] .decoration-text em { color: #008883; }

/* Footer / Floating consultation */
html[data-public-theme="light"] .site-footer { background: #e3edf5; border-top: 1px solid #cadfe9; }
html[data-public-theme="light"] :is(.footer-about p,.footer-main>div>p) { color: #526f84; }
html[data-public-theme="light"] .footer-main h3 { color: #183e56; }
html[data-public-theme="light"] .footer-main>div>a:not(.brand) { color: #43657b; }
html[data-public-theme="light"] .footer-main>div>a:hover { color: #007f82; }
html[data-public-theme="light"] .footer-main .footer-link-cta { color: #007f82!important; }
html[data-public-theme="light"] .footer-bottom { color: #617c8f; border-top-color: #cadfe9; }
html[data-public-theme="light"] .footer-bottom a { color: #1d6d86!important; }
html[data-public-theme="light"] .chat-widget { background: #fff; border-color: #bbdce5; box-shadow: 0 18px 60px rgba(30,73,100,.18); }
html[data-public-theme="light"] .chat-header { background: #e3f7f8; color: #154357; }
html[data-public-theme="light"] .chat-header small { color: #537788; }
html[data-public-theme="light"] .chat-close { color: #2c6479; }
html[data-public-theme="light"] .chat-bubble { background: #ecf5f9; color: #284e64; }
html[data-public-theme="light"] .chat-body { color: #315970; }
html[data-public-theme="light"] .chat-notice { color: #426c7c; background: #e1f7f1; border-color: #b9e8db; }
html[data-public-theme="light"] .chat-bottom-link { border-color: #d6e7ee; color: #007f83; }

/* Halaman layanan, produk, riset, detail artikel */
html[data-public-theme="light"] .breadcrumbs { color: #567b90; }
html[data-public-theme="light"] .breadcrumbs span:last-child { color: #173b4e; }
html[data-public-theme="light"] .check-list li { color: #4b7185; }
html[data-public-theme="light"] .detail-panel p,
html[data-public-theme="light"] .detail-sidebar p { color: #496f83; }
html[data-public-theme="light"] .detail-panel h2,
html[data-public-theme="light"] .detail-panel h3 { color: #153b50; }
html[data-public-theme="light"] .subtle-note { color: #678395!important; }
html[data-public-theme="light"] .detail-badge { color: #007a7c; background: #dff9f4; border-color: #bce9de; }
html[data-public-theme="light"] .subtle-link { color: #007c80; }
html[data-public-theme="light"] .category-empty { color: #173b50; }
/* Artikel CMS lama masih memakai sejumlah style inline dengan warna khusus dark. */
html[data-public-theme="light"] .detail-panel > p[style*="color:#b0eff0"] { color:#176c77!important; }
html[data-public-theme="light"] .detail-panel > div[style*="white-space:pre-wrap"] { color:#2c5168!important; }
html[data-public-theme="light"] .detail-panel > hr { border-top-color:#d9e7ef!important; }

@media(max-width:840px) {
  .public-theme-toggle { width:100%; justify-content:center; margin:7px 0; font-size:13px; min-height:43px; }
  html[data-public-theme="light"] .primary-nav { background: #fff; }
  html[data-public-theme="light"] .dropdown-menu { background: #f2f9fc; }
  html[data-public-theme="light"] .primary-nav .nav-link.active,
  html[data-public-theme="light"] .primary-nav .nav-dropdown-toggle.active { color: #007f83; }
}
@media(prefers-reduced-motion:reduce) {
  .public-theme-toggle { transition:none; }
}
