/* ==========================================================================
   SCAFFORM EXPO - ARABIC & RTL (RIGHT-TO-LEFT) STYLES
   ========================================================================== */

html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] body {
  font-family: 'Cairo', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif !important;
  direction: rtl;
  text-align: right;
}

/* Tipografi & Başlıklar (Cairo Arapça Fontu ile Görkemli Görünüm) */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .cover h1,
html[dir="rtl"] .statement h2,
html[dir="rtl"] .section-head h2,
html[dir="rtl"] .footer2 h2 {
  font-family: 'Cairo', sans-serif !important;
  letter-spacing: normal !important;
  line-height: 1.35 !important;
}

/* Sayfa İçi Hikaye Başlığı (#story-title / .inner-story h2) Arapça Boyutlandırma */
html[dir="rtl"] .inner-story h2,
html[dir="rtl"] #story-title,
[dir="rtl"] #story-title,
html[lang="ar"] #story-title {
  font-size: clamp(2.3rem, 4.2vw, 4.2rem) !important;
  line-height: 1.22 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
  max-width: 100%;
}

html[dir="rtl"] .inner-story-grid,
html[lang="ar"] .inner-story-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8%;
}

@media (max-width: 900px) {
  html[dir="rtl"] .inner-story h2,
  html[dir="rtl"] #story-title,
  [dir="rtl"] #story-title,
  html[lang="ar"] #story-title {
    font-size: clamp(2rem, 5.5vw, 3.2rem) !important;
    line-height: 1.25 !important;
  }
}

@media (max-width: 760px) {
  html[dir="rtl"] .inner-story-grid,
  html[lang="ar"] .inner-story-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Header & Navigasyon Aynalama */
html[dir="rtl"] .header-inner {
  flex-direction: row;
}

html[dir="rtl"] .site-nav {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .nav-group summary {
  text-align: right;
}

html[dir="rtl"] .nav-chevron {
  margin-left: 0;
  margin-right: 6px;
  transform: rotate(180deg);
}

html[dir="rtl"] .nav-dropdown {
  left: auto;
  right: 0;
  text-align: right;
}

/* Buton ve Bağlantı Okları */
html[dir="rtl"] .btn-arrow::after,
html[dir="rtl"] .cta-link::after,
html[dir="rtl"] [aria-hidden="true"] {
  display: inline-block;
  transform: scaleX(-1);
}

/* Sayfa İçerik Blokları ve Izgaralar */
html[dir="rtl"] .content-grid,
html[dir="rtl"] .sayfa-grid,
html[dir="rtl"] .feature-grid,
html[dir="rtl"] .two-col-layout {
  direction: rtl;
}

/* Breadcrumb / İçerik Yolu */
html[dir="rtl"] .breadcrumb,
html[dir="rtl"] .cms-breadcrumb {
  direction: rtl;
}

html[dir="rtl"] .breadcrumb-separator {
  transform: rotate(180deg);
}

/* Form Alanları & Inputlar */
html[dir="rtl"] input,
html[dir="rtl"] select,
html[dir="rtl"] textarea {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .form-label,
html[dir="rtl"] label {
  text-align: right;
  display: block;
}

/* Footer Aynalama */
html[dir="rtl"] .footer2-intro {
  flex-direction: row-reverse;
}

html[dir="rtl"] .footer2-grid {
  direction: rtl;
}

html[dir="rtl"] .footer2-column {
  text-align: right;
}

html[dir="rtl"] .footer2-bottom {
  flex-direction: row-reverse;
}

/* Dil Seçici Dropdown (Header) */
.lang-switcher-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.lang-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  padding: 6px;
  display: none;
  z-index: 1000;
}

.lang-dropdown-menu::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
}

html[dir="rtl"] .lang-dropdown-menu {
  right: auto;
  left: 0;
}

.lang-switcher-wrapper:hover .lang-dropdown-menu,
.lang-switcher-wrapper:focus-within .lang-dropdown-menu {
  display: block;
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.lang-dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.lang-dropdown-item.active {
  background: #eff6ff;
  color: #2563eb;
}
