/* =====================================================================
   Açık / Koyu tema
   - Tema, <html data-theme="light|dark"> ile seçilir (head'teki küçük betik boyamadan önce ayarlar)
   - İlk ziyarette cihazın tercihi (prefers-color-scheme) kullanılır, buton ile değiştirilebilir
   ===================================================================== */

/* ---------- Tema butonu (açık/koyu ortak) ---------- */
#masthead .rdx-theme-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #000;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
#masthead .rdx-theme-toggle:hover,
#masthead .rdx-theme-toggle:focus-visible{
    background: #f3f3f3;
}
#masthead .rdx-theme-toggle svg{
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* Açık temada AY görünür (koyuya geç), koyu temada GÜNEŞ görünür (açığa geç) */
#masthead .rdx-theme-toggle .rdx-ico-sun{ display: none; }
#masthead .rdx-theme-toggle .rdx-ico-moon{ display: block; }
html[data-theme="dark"] #masthead .rdx-theme-toggle .rdx-ico-sun{ display: block; }
html[data-theme="dark"] #masthead .rdx-theme-toggle .rdx-ico-moon{ display: none; }
@media (max-width: 575.98px){
    #masthead .rdx-theme-toggle{ width: 40px; height: 40px; }
}

/* =====================================================================
   KOYU TEMA
   ===================================================================== */
html[data-theme="dark"]{
    color-scheme: dark;
    /* Marka renkleri (lacivert #202338, pembe, yeşil) tek bir lacivert aileden türetildi */
    --d-bg: #111325;
    --d-surface: #191c34;
    --d-surface-2: #232748;
    --d-border: #343a63;
    --d-text: #eef0fa;
    --d-muted: #b8bdd8;
    --d-link: #ff8fba;
    --d-link-hover: #ffb8d3;
    --d-pink-bg: #2a2142;      /* pembe alanların koyu karşılığı (yumuşak erik-lacivert) */
    --d-teal: #1f5f5a;         /* markanın yeşilinin koyu tonu: yalnızca alt çubuk ve vurgularda */
    --d-footer-bg: #0b0d1c;
}

/* Zemin ve genel yazı */
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .page,
html[data-theme="dark"] main.site-main{
    background-color: var(--d-bg);
    color: var(--d-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,
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,
html[data-theme="dark"] strong,
html[data-theme="dark"] b,
html[data-theme="dark"] th,
html[data-theme="dark"] label,
html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .rdx-footer-title{
    color: var(--d-text);
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] td,
html[data-theme="dark"] dd,
html[data-theme="dark"] dt,
html[data-theme="dark"] blockquote,
html[data-theme="dark"] small,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] figcaption{
    color: var(--d-muted);
}
html[data-theme="dark"] .text-muted{ color: var(--d-muted) !important; }
html[data-theme="dark"] .text-dark{ color: var(--d-text) !important; }

/* Bağlantılar */
html[data-theme="dark"] a{ color: var(--d-link); }
html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus{ color: var(--d-link-hover); }

/* Kenarlıklar, çizgiler */
html[data-theme="dark"] hr{ border-color: var(--d-border); }
html[data-theme="dark"] .table,
html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th,
html[data-theme="dark"] table,
html[data-theme="dark"] td,
html[data-theme="dark"] th{ border-color: var(--d-border); }

/* ---------- Üst şerit + header ---------- */
html[data-theme="dark"] .ttm-topbar-wrapper{ background-color: var(--d-pink-bg); }
html[data-theme="dark"] .rdx-contact-text,
html[data-theme="dark"] .rdx-contact-text .rdx-sr-only,
html[data-theme="dark"] a.rdx-contact-card{ color: var(--d-text); }
html[data-theme="dark"] span.rdx-contact-icon{ background-color: var(--d-surface-2); color: var(--d-link); }
html[data-theme="dark"] span.rdx-contact-icon svg{ fill: currentColor; }

html[data-theme="dark"] #masthead,
html[data-theme="dark"] .ttm-header-wrap,
html[data-theme="dark"] .site-header-menu-inner,
html[data-theme="dark"] .site-header-menu,
html[data-theme="dark"] .ttm-stickable-header,
html[data-theme="dark"] .navs,
html[data-theme="dark"] .ttm-header-style-classicinfo{
    background-color: var(--d-surface);
    border-color: var(--d-border);
}
html[data-theme="dark"] a.mdl-button,
html[data-theme="dark"] #site-navigation a,
html[data-theme="dark"] .mobile-menu a{ color: var(--d-text); }
html[data-theme="dark"] #site-navigation a:hover,
html[data-theme="dark"] .mobile-menu a:hover{ color: var(--d-link); }

/* Dikkat: ana menü listesi de "dropdown" sınıfını taşır; yalnızca İÇ İÇE açılır menüler boyanır */
html[data-theme="dark"] ul.dropdown ul,
html[data-theme="dark"] .th-menudropdown,
html[data-theme="dark"] .dropdown-menu{
    background-color: var(--d-surface-2);
    border-color: var(--d-border);
}
html[data-theme="dark"] #site-navigation ul.dropdown,
html[data-theme="dark"] #site-navigation .menu > ul{ background-color: transparent; }

/* Hamburger, arama ve tema butonu ikonları */
html[data-theme="dark"] #masthead .ttm-menu-toggle .toggle-block{ background-color: var(--d-text); }
html[data-theme="dark"] #masthead .rdx-search-trigger i{ background-color: var(--d-text); }
html[data-theme="dark"] #masthead .rdx-search-trigger:hover,
html[data-theme="dark"] #masthead .rdx-theme-toggle:hover,
html[data-theme="dark"] #masthead .rdx-theme-toggle:focus-visible{ background: var(--d-surface-2); }
html[data-theme="dark"] #masthead .rdx-theme-toggle{ color: #ffd75e; }

/* Mobil menü paneli */
html[data-theme="dark"] .mobile-menu,
html[data-theme="dark"] .mobile-menu .nav-header,
html[data-theme="dark"] .mobile-menu-bg,
html[data-theme="dark"] div.nav-header{
    background-color: var(--d-surface);
}
html[data-theme="dark"] .mobile-menu li,
html[data-theme="dark"] .mobile-menu ul{ border-color: var(--d-border); }
html[data-theme="dark"] .rdx-mobile-close{ color: var(--d-text); }
html[data-theme="dark"] .mobile-menu li.active,
html[data-theme="dark"] .mobile-menu li.active > a{ background-color: var(--d-surface-2) !important; color: var(--d-link) !important; }
html[data-theme="dark"] .mobile-menu .mobile-social-menu,
html[data-theme="dark"] .mobile-social-menu{ background-color: var(--d-surface); }

/* Arama penceresi */
html[data-theme="dark"] dialog.ttm-search-overlay,
html[data-theme="dark"] .ttm-search-overlay,
html[data-theme="dark"] .ttm-search-outer{
    background-color: var(--d-surface);
    color: var(--d-text);
}
html[data-theme="dark"] button.rdx-search-close{ background-color: var(--d-surface-2); color: var(--d-text); }
html[data-theme="dark"] .ttm-form-title{ color: var(--d-text); }

/* ---------- Ana menü (tema ID'li seçicilerle yazdığı için aynı özgüllükte eziyoruz) ---------- */
html[data-theme="dark"] #site-header-menu #site-navigation .menu ul{ color: var(--d-text); }
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul > li > a{ color: var(--d-text); }
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul > li > a:hover,
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul > li > a:focus-visible,
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul > li.active > a,
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul > li:hover > a{ color: var(--d-link); }

/* Açılır alt menü */
html[data-theme="dark"] #site-header-menu #site-navigation .menu ul ul{
    background-color: var(--d-surface-2);
    border: 1px solid var(--d-border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
}
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul li ul li a{ color: var(--d-muted); }
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul li ul li a:hover,
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul li ul li a:focus-visible,
html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul li ul li.active > a{ color: var(--d-link); background-color: rgba(255, 143, 186, .08); }
html[data-theme="dark"] #site-header-menu #site-navigation .menu ul li ul > li:not(:last-child){ border-bottom-color: var(--d-border); }

/* Sabit (kaydırınca yapışan) header'daki menü */
html[data-theme="dark"] .fixed-header #site-navigation .menu > ul > li > a:hover,
html[data-theme="dark"] .fixed-header #site-navigation .menu > ul > li.active > a,
html[data-theme="dark"] .fixed-header #site-navigation .menu > ul > li:hover > a,
html[data-theme="dark"] .fixed-header #site-navigation .menu > ul li ul li a:hover{ color: var(--d-link) !important; }
html[data-theme="dark"] .fixed-header #site-navigation .menu > ul li ul li a{ color: var(--d-muted) !important; }

/* Dar ekranda menü listesi (1200px altı) */
@media (max-width: 1199.98px){
    html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul{
        background-color: var(--d-surface);
        box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
    }
    html[data-theme="dark"] #site-header-menu #site-navigation .menu > ul li{ border-bottom-color: var(--d-border); }
}

/* ---------- Mobil menü paneli (ID'li seçicileri ezer) ---------- */
html[data-theme="dark"] .mobile-menu.mobile-show{ background-color: var(--d-surface); }
html[data-theme="dark"] .mobile-menu .nav-header{ background-color: var(--d-surface); border-bottom-color: var(--d-border); }
html[data-theme="dark"] .mobile-menu a{ color: var(--d-text); }
html[data-theme="dark"] #mobile-menu .rdx-nav__link,
html[data-theme="dark"] #mobile-menu .rdx-nav__toggle{ color: var(--d-text); background: transparent; }
html[data-theme="dark"] #mobile-menu .rdx-nav__link:hover,
html[data-theme="dark"] #mobile-menu .rdx-nav__toggle:hover,
html[data-theme="dark"] #mobile-menu .rdx-nav__link[aria-current="page"]{ color: var(--d-link); }
html[data-theme="dark"] .mobile-menu .menu ul li{ border-top-color: var(--d-border); }
html[data-theme="dark"] .mobile-menu-bg.active{ background-color: rgba(6, 7, 18, .62); }
html[data-theme="dark"] .mobile-menu-bg.active::before{ background-color: var(--d-surface); }

/* Logo: koyu zeminde okunsun diye açık bir plaka içine al */
html[data-theme="dark"] #masthead img.rdx-brand-logo,
html[data-theme="dark"] .mobile-menu img.rdx-brand-logo{
    background: #fff;
    border-radius: 10px;
    padding: 4px 8px;
}

/* Footer logosu da aynı açık plakada */
html[data-theme="dark"] footer img.navbar-brand__logo{
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    filter: none;
}

/* ---------- Genel ikonlar (maske ile çizilen .fa) ---------- */
html[data-theme="dark"] i.fa{ background-color: currentColor; }
html[data-theme="dark"] .ttm-topbar-wrapper i.fa,
html[data-theme="dark"] .widget-footer i.fa,
html[data-theme="dark"] footer i.fa,
html[data-theme="dark"] .social-media i.fa,
html[data-theme="dark"] .ttm-social-links i.fa{ background-color: var(--d-text); }

/* ---------- Bölümler / kartlar ---------- */
html[data-theme="dark"] .features{ background-color: var(--d-pink-bg); }
html[data-theme="dark"] .features h2.fea2{ color: #ff9cc2; }
html[data-theme="dark"] .fbody{ background-color: var(--d-footer-bg); }
html[data-theme="dark"] .fbody,
html[data-theme="dark"] .fbody p,
html[data-theme="dark"] .fbody h2,
html[data-theme="dark"] .fbody h3,
html[data-theme="dark"] .fbody a{ color: var(--d-muted); }

html[data-theme="dark"] .box-art,
html[data-theme="dark"] .box1,
html[data-theme="dark"] .card,
html[data-theme="dark"] .well,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .jumbotron,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .pagination .page-link{
    background-color: var(--d-surface-2);
    border-color: var(--d-border);
    color: var(--d-text);
}
html[data-theme="dark"] .box-art h3,
html[data-theme="dark"] .box-art h2,
html[data-theme="dark"] .box-art a{ color: var(--d-text); }

/* Alt sayfa başlık şeridi + ekmek kırıntısı */
html[data-theme="dark"] .ttm-page-title-row{
    background-color: var(--d-surface);
    border-color: var(--d-border);
}
html[data-theme="dark"] .ttm-page-title-row .breadcrumb-wrapper-inner{ background-color: transparent; }
html[data-theme="dark"] .ttm-page-title-row h1,
html[data-theme="dark"] .ttm-page-title-row .title{ color: var(--d-text); }
html[data-theme="dark"] .breadcrumb-wrapper li.active,
html[data-theme="dark"] .ttm-page-title-row li.active{ background-color: transparent; }

/* Çalışma saatleri kartı */
html[data-theme="dark"] .ag-hours__card{ background-image: none; }
html[data-theme="dark"] .ag-hours__card,
html[data-theme="dark"] .ag-hours__right{
    background-color: var(--d-surface-2);
    border-color: var(--d-border);
    color: var(--d-text);
}
html[data-theme="dark"] .ag-hours__icon{ background-color: var(--d-pink-bg); color: #ff9cc2; }
html[data-theme="dark"] .ag-hours__value{ color: var(--d-text); }

/* ---------- Temanın !important ile yazdığı koyu renkleri ezenler ---------- */
html[data-theme="dark"] .fixed-header,
html[data-theme="dark"] .fixed-header .ttm-header-wrap,
html[data-theme="dark"] .fixed-header .site-header-menu-inner{ background-color: var(--d-surface) !important; }
html[data-theme="dark"] .fixed-header a{ color: var(--d-text) !important; }
html[data-theme="dark"] .fixed-header .ttm-header-icons i{ background-color: var(--d-text) !important; }
html[data-theme="dark"] .fixed-header .rdx-theme-toggle{ color: #ffd75e !important; }

html[data-theme="dark"] .breadcrumb-wrapper span:last-child{ color: var(--d-text) !important; }
html[data-theme="dark"] .sticky-footer p{ color: #fff !important; }
html[data-theme="dark"] .rdx-footer-contact a,
html[data-theme="dark"] .footer .rdx-footer-sitemap-list a{ color: #fff !important; }
html[data-theme="dark"] a.rdx-contact-card,
html[data-theme="dark"] .rdx-contact-text{ color: var(--d-text) !important; }
html[data-theme="dark"] .right-bar ul li,
html[data-theme="dark"] .right-bar ul li a{ color: var(--d-text) !important; }
html[data-theme="dark"] .contents.contents-toc .contents-toc-item > a{ color: var(--d-text) !important; }
html[data-theme="dark"] .contents.contents-toc .contents-toc-item > a:hover{ color: var(--d-link) !important; }
html[data-theme="dark"] label.kvkk-onay,
html[data-theme="dark"] #iletisim-formu-form label.kvkk-onay{ color: var(--d-muted) !important; }
html[data-theme="dark"] .contact-sf .form-control{ border-color: var(--d-border) !important; }
html[data-theme="dark"] #totop{ background-color: var(--d-surface-2) !important; color: var(--d-text) !important; }

/* Makale sayfaları: içindekiler kutusu, meta kutusu, SSS */
html[data-theme="dark"] .jumbotron,
html[data-theme="dark"] .article-meta-box,
html[data-theme="dark"] .faq-singular,
html[data-theme="dark"] .faq-singular.active{
    background-color: var(--d-surface-2) !important;
    background-image: none !important;
    border-color: var(--d-border) !important;
    color: var(--d-text);
}
html[data-theme="dark"] .jumbotron *:not(a):not(i),
html[data-theme="dark"] .article-meta-box *:not(a):not(i){ color: var(--d-text); }
html[data-theme="dark"] .jumbotron h1,
html[data-theme="dark"] .jumbotron h2,
html[data-theme="dark"] .jumbotron h3,
html[data-theme="dark"] .jumbotron .display-5{ color: var(--d-text) !important; }
html[data-theme="dark"] .jumbotron li::marker{ color: var(--d-link); }
html[data-theme="dark"] .faq-singular h3,
html[data-theme="dark"] .faq-singular h4,
html[data-theme="dark"] .faq-singular .faq-title,
html[data-theme="dark"] .faq-singular .faq-question{ color: var(--d-text); }

/* Bootstrap yardımcı sınıfları */
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .bg-light{ background-color: var(--d-surface-2) !important; }
html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom{ border-color: var(--d-border) !important; }

/* Slider (görsel içinde yazı var, görsel açık kalır; yazılar koyu kalsın) */
html[data-theme="dark"] .main-slider h1,
html[data-theme="dark"] .main-slider h2,
html[data-theme="dark"] .main-slider h3{ color: #6b6b6b; }
html[data-theme="dark"] .main-slider p,
html[data-theme="dark"] .main-slider span{ color: #4a4a4a; }

/* Sayfa altı CTA ve sabit mobil alt şerit */
html[data-theme="dark"] .sticky-footer{ background-color: var(--d-teal); }
html[data-theme="dark"] .sticky-footer,
html[data-theme="dark"] .sticky-footer a,
html[data-theme="dark"] .sticky-footer span,
html[data-theme="dark"] .sticky-footer p{ color: #fff; }
html[data-theme="dark"] .sticky-footer i.fa{ background-color: #fff; }

/* ---------- Footer ---------- */
html[data-theme="dark"] footer,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .widget-footer{
    background-color: var(--d-footer-bg);
    color: var(--d-muted);
    border-color: var(--d-border);
}
html[data-theme="dark"] footer .text-dark,
html[data-theme="dark"] footer p,
html[data-theme="dark"] footer li,
html[data-theme="dark"] footer span,
html[data-theme="dark"] .bottom-footer-text,
html[data-theme="dark"] .bottom-footer-text p{ color: var(--d-muted) !important; }
html[data-theme="dark"] footer a,
html[data-theme="dark"] .footer a{ color: var(--d-text); }
html[data-theme="dark"] footer a:hover,
html[data-theme="dark"] .footer a:hover{ color: var(--d-link-hover); }
html[data-theme="dark"] footer hr{ border-color: var(--d-border); }
/* Telif şeridi (::before ile çizilen açık yeşil zemin) */
html[data-theme="dark"] .bottom-footer-text::before{ background-color: var(--d-surface); }

/* ---------- Form elemanları ---------- */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .form-control{
    background-color: var(--d-surface-2);
    border-color: var(--d-border);
    color: var(--d-text);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{ color: #8991a3; }
html[data-theme="dark"] .form-control:focus{
    background-color: var(--d-surface-2);
    color: var(--d-text);
    border-color: var(--d-link);
}

/* Makale gövdesi / içerik alanları (CKEditor'dan gelen satır içi renkleri yumuşat) */
html[data-theme="dark"] .article-content,
html[data-theme="dark"] .article-body,
html[data-theme="dark"] .entry-content{ color: var(--d-muted); }

/* Görseller: hafifçe kıs (göz yormasın), logo/ikonlara dokunma */
html[data-theme="dark"] img:not(.rdx-brand-logo){ filter: brightness(.92); }

/* Footer üstündeki dalga: görseldeki beyaz şekil, sayfa zemin rengiyle (maske kullanılarak) boyanır */
html[data-theme="dark"] .bt_bb_section_top_section_coverage_image2{
    background-color: var(--d-bg);
    -webkit-mask: url("/2023/04/bg-footer.webp") center / 100% 100% no-repeat;
    mask: url("/2023/04/bg-footer.webp") center / 100% 100% no-repeat;
}
html[data-theme="dark"] .bt_bb_section_top_section_coverage_image2 img{ display: block; opacity: 0; }

/* Geçişler yumuşak olsun (yalnızca tema değişirken uygulanır) */
html.rdx-theme-anim,
html.rdx-theme-anim *{
    transition: background-color .25s ease, color .25s ease, border-color .25s ease !important;
}
