/* =====================================================
   Tema Katmanı — Dark/Light Toggle
   Varsayılan: LIGHT (mevcut özgün tasarım birebir korunur).
   Dark: html[data-theme="dark"] altında override edilen
   sınırlı sayıda Tailwind utility'si ile elde edilir.
   Tailwind statik build'e dokunulmaz.
   ===================================================== */

/* ---- Geçiş yumuşatma (yalnızca tema değişiminde hissedilir) ---- */
html[data-theme] body,
html[data-theme] .bg-white,
html[data-theme] .bg-light,
html[data-theme] #navbar,
html[data-theme] .border-gray-100,
html[data-theme] .border-gray-200 {
    transition: background-color .35s ease, color .35s ease, border-color .35s ease;
}

/* =====================================================
   DARK TEMA
   ===================================================== */

html[data-theme="dark"] body {
    background-color: #0d0f13;
    color: #e8eaed;
}

/* Yüzeyler */
html[data-theme="dark"] .bg-light  { background-color: #0d0f13 !important; }
html[data-theme="dark"] .bg-white  { background-color: #161a21 !important; }
/* .bg-dark bölümleri (Vizyon/Misyon, footer) her iki temada da koyu kalır — override YOK */

/* Metin */
html[data-theme="dark"] .text-dark      { color: #e8eaed !important; }
html[data-theme="dark"] .text-gray-700  { color: #b6bdc9 !important; }
html[data-theme="dark"] .text-gray-600  { color: #a3acb9 !important; }
html[data-theme="dark"] .text-gray-500  { color: #8d96a3 !important; }
html[data-theme="dark"] .text-gray-400  { color: #707a88 !important; }

/* Kenarlıklar */
html[data-theme="dark"] .border-gray-100 { border-color: rgba(255,255,255,.07) !important; }
html[data-theme="dark"] .border-gray-200 { border-color: rgba(255,255,255,.10) !important; }

/* Navbar — light'ta beyaz, dark'ta koyu yüzey (scroll'da JS bg-white/95 eklese de id !important kazanır) */
html[data-theme="dark"] #navbar {
    background-color: rgba(17,20,26,.92) !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.06) !important;
    backdrop-filter: saturate(160%) blur(8px);
}

/* Hero perde gradyanı — light'ta beyaza fade, dark'ta koyuya fade (index.php'de .hero-veil) */
html[data-theme="dark"] .hero-veil {
    background-image: linear-gradient(to right, rgba(13,15,19,.96), rgba(13,15,19,.82), transparent) !important;
}

/* Logo swap — light: siyah yazılı SVG, dark: krem/açık yazılı SVG */
.site-logo--dark { display: none; }
html[data-theme="dark"] .site-logo--light { display: none; }
html[data-theme="dark"] .site-logo--dark  { display: block; }

/* Navbar menü linkleri (header.php inline <style>'da #4B5563/#0F1115 sabit) — dark'ta görünür yap */
html[data-theme="dark"] .nav-link { color: #c8cdd5; }
html[data-theme="dark"] .nav-link:hover { color: #ffffff; }

/* İç sayfalarda kullanılan opaklık varyantları (text-dark/60, border-dark/10 vb.) dark'ta okunur olsun */
html[data-theme="dark"] .text-dark\/80 { color: rgba(232,234,237,.82) !important; }
html[data-theme="dark"] .text-dark\/70 { color: rgba(232,234,237,.74) !important; }
html[data-theme="dark"] .text-dark\/60 { color: rgba(232,234,237,.64) !important; }
html[data-theme="dark"] .text-dark\/50 { color: rgba(232,234,237,.52) !important; }
html[data-theme="dark"] .text-dark\/40 { color: rgba(232,234,237,.42) !important; }
html[data-theme="dark"] .border-dark\/5  { border-color: rgba(255,255,255,.06) !important; }
html[data-theme="dark"] .border-dark\/10 { border-color: rgba(255,255,255,.10) !important; }
html[data-theme="dark"] .border-dark\/20 { border-color: rgba(255,255,255,.16) !important; }
html[data-theme="dark"] .bg-dark\/5  { background-color: rgba(255,255,255,.04) !important; }

/* İletişim formu input'ları (bg-light) form kartının (bg-white) içinde biraz daha koyu dursun */
html[data-theme="dark"] .bg-white .bg-light { background-color: #0b0d11 !important; }

/* Gölgeler dark'ta sertleşmesin */
html[data-theme="dark"] .shadow-sm,
html[data-theme="dark"] .shadow-md { box-shadow: 0 1px 3px rgba(0,0,0,.5) !important; }
html[data-theme="dark"] .shadow-lg,
html[data-theme="dark"] .shadow-2xl { box-shadow: 0 18px 50px rgba(0,0,0,.55) !important; }

/* Uzmanlık radial nokta deseni dark'ta biraz daha görünür */
html[data-theme="dark"] section#uzmanliklar > .opacity-5 { opacity: .08 !important; }

/* =====================================================
   TEMA TOGGLE BUTONU (her iki temada da çalışır)
   ===================================================== */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 9999px;
    color: #6B7280;
    border: 1px solid transparent;
    transition: color .25s ease, border-color .25s ease, background-color .25s ease;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}
.theme-toggle-btn:hover { color: #D4AF37; border-color: rgba(212,175,55,.4); }
html[data-theme="dark"] .theme-toggle-btn { color: #c8cdd5; }
html[data-theme="dark"] .theme-toggle-btn:hover { color: #D4AF37; }

/* İkon görünürlüğü: light'ta ay (→dark'a geç), dark'ta güneş (→light'a geç) */
.theme-toggle-btn .theme-icon-to-dark  { display: inline-flex; }
.theme-toggle-btn .theme-icon-to-light { display: none; }
html[data-theme="dark"] .theme-toggle-btn .theme-icon-to-dark  { display: none; }
html[data-theme="dark"] .theme-toggle-btn .theme-icon-to-light { display: inline-flex; }

/* Mobil menü içindeki toggle (her zaman koyu zemin üstünde) */
#menu-overlay .theme-toggle-btn { color: rgba(255,255,255,.85); border-color: rgba(255,255,255,.15); }
#menu-overlay .theme-toggle-btn:hover { color: #D4AF37; border-color: rgba(212,175,55,.5); }
