/* Uyumluluk katmanı — tüm sayfalarda EN SON yüklenir (header.php).
   Amaç: cihaz/tarayıcı farklarını (iOS Safari, yatay telefon, dokunmatik, geniş ekran) tek yerde düzeltmek.
   Kaynak CSS'lere dokunmadan geçersiz kılar; her kural gerekçesiyle işaretlidir. */

/* Site yalnız koyu tasarım: yerel form kontrolleri/kaydırma çubukları koyu çıksın */
html { color-scheme: dark; }

/* R-01 — taban .mobile-toggle{display:none} kuralı style.min.css'te medya kuralından sonra geliyor ve hamburgeri gizliyordu */
@media (max-width: 768px) {
  .mobile-toggle { display: flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
}

/* R-16 — 769–1100 px arası üst menü sıkışması */
@media (min-width: 769px) and (max-width: 1100px) {
  .nav-menu a, .nav-link, .cta-button { white-space: nowrap; }
  .cta-button { padding-inline: 12px; }
}

/* R-02 — yatay telefon (geniş ama alçak ekran): hero içeriği ekran dışında kalıyordu */
@media (min-width: 769px) and (max-height: 600px) and (orientation: landscape) {
  /* metin + görsel alt alta (539px) sığmıyor → yan yana, görsel kısaltılır */
  .hero-slide .slide-content { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 16px; align-items: center; padding-block: 8px; }
  .hero-slide .slide-visual { max-height: 300px; overflow: hidden; }
  .hero-title { font-size: clamp(1.4rem, 4vw, 2rem); }
  .hero-desc { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}

/* R-03 — iOS Safari odak yakınlaştırmasını önle: dokunmatik cihazlarda alanlar ≥16px */
@media (max-width: 768px), (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  select,
  textarea { font-size: 16px !important; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]),
  select { min-height: 44px; }
}

/* R-04 — mobil adres çubuğu: sabit 100vh yerine dinamik görünüm yüksekliği (desteklemeyen tarayıcı vh'de kalır) */
@supports (height: 100dvh) {
  .page-loader { height: 100dvh; }
  .hero-slider-section { max-height: 100dvh; }
  .error-page, .error-container { min-height: 100dvh; }
}

/* R-07 — dokunma hedefleri ≥44px (yalnız dokunmatik/kaba imleç) */
@media (pointer: coarse) {
  .footer-social a, .social-link, .filtre-chip, .filtre-toggle-modern, .cta-button,
  .model-modal-close, footer a.footer-link, .footer-links a, .footer-bottom a {
    min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center;
  }
  .footer-links a, .footer-bottom a { justify-content: flex-start; }
  .slider-dot { position: relative; }
  .slider-dot::before { content: ""; position: absolute; inset: -17px; }
  .model-modal-close { width: 44px; height: 44px; }
}

/* R-08 — backdrop-filter bulunmayan tarayıcıda yarı saydam yüzeyler okunaksız kalmasın */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ana-header, .clean-navbar, .mobile-bottom-nav-enhanced, .nav-menu, .model-modal { background-color: rgba(10, 10, 10, 0.96); }
}

/* R-12 — klavye odağı: koyu zeminde görünür halka (fare tıklamasında görünmez) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.55);
}

/* R-10 — hareketi azalt tercihi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* R-11 — JS yüklenmezse tam ekran yükleyici siteyi kapatmasın */
.no-js .page-loader { display: none !important; }
.no-js body.loading { overflow: auto !important; }

/* R-14 — çok geniş ekranlarda (≥1920px) ölçekleme */
@media (min-width: 1920px) {
  html { font-size: clamp(16px, 0.35vw + 9.3px, 22px); }
}

/* Yazdırma: gezinti, çerez/yardımcı çubuklar ve sabit öğeler basılmasın */
@media print {
  .ana-header, .ana-footer-enhanced, .mobile-menu-overlay, .page-loader, .skip-link, .mobile-bottom-nav-enhanced, .back-to-top { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
