/* ========================================
   RTL (Right-to-Left) Support - Arapça Dil Desteği
   ======================================== */

/* 
 * Bu dosya Arapça (ar) dil seçildiğinde otomatik olarak uygulanır.
 * HTML'e dir="rtl" attribute'u JavaScript tarafından eklenir.
 */

/* ========================================
   Global RTL Düzenlemeleri
   ======================================== */

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

[dir="rtl"] body {
  direction: rtl;
}

/* ========================================
   Navbar RTL Düzenlemeleri
   ======================================== */

/* Logo'yu sağa taşı */
[dir="rtl"] .navbar .container {
  flex-direction: row-reverse;
}

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

/* Menu itemlerini tersine çevir */
[dir="rtl"] .navbar__menu {
  flex-direction: row-reverse;
}

/* Dil seçici RTL düzenlemeleri */
[dir="rtl"] .navbar__language-selector {
  margin-left: 0;
  margin-right: var(--spacing-md);
}

/* Dropdown menü pozisyonu RTL'de */
[dir="rtl"] .lang-dropdown-menu {
  left: 0;
  right: auto;
}

/* Dropdown açıkken görünür olmalı */
[dir="rtl"] .navbar__language-selector.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Dropdown toggle buton RTL düzenlemesi */
[dir="rtl"] .lang-dropdown-toggle {
  flex-direction: row-reverse;
}

/* Dropdown ok işareti */
[dir="rtl"] .lang-arrow {
  margin-left: 0;
  margin-right: auto;
}

/* Dropdown ok işareti açıkken */
[dir="rtl"] .navbar__language-selector.open .lang-arrow {
  transform: rotate(180deg);
}

/* Dil seçenekleri hizalama */
[dir="rtl"] .lang-option {
  text-align: right;
  flex-direction: row-reverse;
  justify-content: flex-start;
}

/* Mobil menü hamburger */
[dir="rtl"] .navbar__toggle {
  right: calc(var(--container-padding) * 0.6);
  left: auto;
}

/* ========================================
   Hero Section RTL
   ======================================== */

[dir="rtl"] .hero__content {
  text-align: right;
}

/* ========================================
   Introduction Section RTL
   ======================================== */

[dir="rtl"] .introduction__content {
  text-align: right;
}

[dir="rtl"] .introduction__title {
  text-align: right;
}

[dir="rtl"] .introduction__text {
  text-align: right;
}

/* ========================================
   Mission & Vision RTL
   ======================================== */

[dir="rtl"] .mission-vision {
  direction: rtl;
}

[dir="rtl"] .mission-vision__card {
  text-align: center;
}

[dir="rtl"] .mission-vision__title {
  text-align: center;
}

[dir="rtl"] .mission-vision__text {
  text-align: center;
}

[dir="rtl"] .mission-vision__icon {
  margin: 0 auto var(--spacing-md);
}

/* ========================================
   Products Section RTL
   ======================================== */

[dir="rtl"] .category-filter {
  direction: rtl;
}

[dir="rtl"] .products__grid {
  direction: rtl;
}

[dir="rtl"] .card__content {
  text-align: right;
}

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

/* ========================================
   Product Modal RTL
   ======================================== */

[dir="rtl"] .product-modal__content {
  flex-direction: row-reverse;
}

[dir="rtl"] .product-modal__info-section {
  text-align: right;
}

[dir="rtl"] .product-modal__close {
  left: var(--spacing-lg);
  right: auto;
}

[dir="rtl"] .product-modal__features {
  text-align: right;
}

[dir="rtl"] .product-modal__feature {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .product-modal__feature svg {
  margin-left: var(--spacing-sm);
  margin-right: 0;
}

/* ========================================
   Footer RTL
   ======================================== */

[dir="rtl"] .footer .container {
  direction: rtl;
}

[dir="rtl"] .footer__section {
  text-align: center;
}

[dir="rtl"] .footer__social {
  justify-content: center;
}

/* Telefon numaraları, e-posta ve URL'ler LTR kalmalı */
[dir="rtl"] .footer__text,
[dir="rtl"] .footer__link[href^="tel:"],
[dir="rtl"] .footer__link[href^="mailto:"],
[dir="rtl"] a[href^="tel:"],
[dir="rtl"] a[href^="mailto:"],
[dir="rtl"] [data-i18n*="phone"],
[dir="rtl"] [data-i18n*="email"] {
  direction: ltr !important;
  unicode-bidi: bidi-override;
  display: inline-block;
  text-align: center;
}

/* Footer text içindeki telefon ve e-posta bilgileri */
[dir="rtl"] .footer__text {
  text-align: center;
}

[dir="rtl"] .footer__bottom {
  direction: rtl;
}

[dir="rtl"] .footer__bottom .container {
  flex-direction: row-reverse;
  justify-content: center;
}

/* ========================================
   Cookie Banner RTL
   ======================================== */

[dir="rtl"] .cookie-banner .container {
  flex-direction: row-reverse;
}

[dir="rtl"] .cookie-banner__content {
  text-align: right;
}

[dir="rtl"] .cookie-banner__actions {
  flex-direction: row-reverse;
}

/* ========================================
   Let's Go Section RTL
   ======================================== */

[dir="rtl"] .letsgo-section__content {
  text-align: center;
}

[dir="rtl"] .letsgo-section__title {
  text-align: center;
}

[dir="rtl"] .letsgo-section__text {
  text-align: center;
}

[dir="rtl"] .letsgo-btn {
  margin: 0 auto;
  display: inline-block;
}

/* ========================================
   Policy Pages RTL
   ======================================== */

[dir="rtl"] .policy-page {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .policy-page ul,
[dir="rtl"] .policy-page ol {
  margin-right: var(--spacing-lg);
  margin-left: 0;
}

[dir="rtl"] .back-link {
  text-align: right;
}

[dir="rtl"] .back-link::before {
  content: '←';
  margin-left: var(--spacing-xs);
  margin-right: 0;
}

/* ========================================
   Pagination RTL
   ======================================== */

[dir="rtl"] .pagination {
  direction: rtl;
}

[dir="rtl"] .pagination__btn--prev svg {
  transform: scaleX(-1);
}

[dir="rtl"] .pagination__btn--next svg {
  transform: scaleX(-1);
}

/* ========================================
   Typography RTL Düzenlemeleri
   ======================================== */

/* Arapça için daha iyi okunabilirlik */
[dir="rtl"] body {
  font-family: 'Cormorant Garamond', 'Tahoma', 'Arial', sans-serif;
}

[dir="rtl"] h1, 
[dir="rtl"] h2, 
[dir="rtl"] h3, 
[dir="rtl"] h4, 
[dir="rtl"] h5, 
[dir="rtl"] h6 {
  font-family: 'Playfair Display', 'Tahoma', 'Arial', sans-serif;
}

/* ========================================
   Utility Classes RTL
   ======================================== */

[dir="rtl"] .text-left {
  text-align: right;
}

[dir="rtl"] .text-right {
  text-align: left;
}

/* Margin/Padding tersine çevir */
[dir="rtl"] .ml-auto {
  margin-right: auto;
  margin-left: 0;
}

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

/* ========================================
   Icons ve SVG'ler
   ======================================== */

/* Yön gösteren ikonları ters çevir */
[dir="rtl"] .arrow-right {
  transform: scaleX(-1);
}

[dir="rtl"] .arrow-left {
  transform: scaleX(-1);
}

/* ========================================
   Responsive RTL Düzenlemeleri
   ======================================== */

@media (max-width: 768px) {
  /* Mobil menü RTL'de sağdan gelsin */
  [dir="rtl"] .navbar__menu {
    flex-direction: column;
    align-items: flex-end;
    transform: translateX(100%);
  }
  
  /* Mobil menü açıkken */
  [dir="rtl"] .navbar__menu.active {
    transform: translateX(0);
  }
  
  [dir="rtl"] .navbar__toggle {
    right: calc(var(--container-padding) * 0.6);
    left: auto;
  }
  
  /* Navbar linkleri RTL'de tam genişlik */
  [dir="rtl"] .navbar__link {
    width: 100%;
    text-align: right;
  }
  
  [dir="rtl"] .navbar__language-selector {
    margin-right: 0;
    margin-left: 0;
    width: 100%;
  }
  
  /* Mobil menüde dropdown menü RTL düzenlemeleri */
  [dir="rtl"] .lang-dropdown-menu {
    left: 0;
    right: 0;
    width: 100%;
  }
  
  /* Mobil menüde dropdown açıkken */
  [dir="rtl"] .navbar__language-selector.open .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  
  /* Dropdown toggle butonu RTL'de */
  [dir="rtl"] .lang-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    text-align: right;
  }
  
  /* Mobil menüde dil seçenekleri */
  [dir="rtl"] .lang-option {
    width: 100%;
    text-align: right;
    flex-direction: row-reverse;
    justify-content: flex-start;
  }
  
  /* Tema değiştirici RTL'de */
  [dir="rtl"] .navbar__theme-toggle {
    width: 100%;
  }
  
  /* Hakkında bölümü mobilde sağa hizalı */
  [dir="rtl"] .introduction__text {
    text-align: right;
  }
  
  [dir="rtl"] .products__grid {
    direction: rtl;
  }
  
  [dir="rtl"] .product-modal__content {
    flex-direction: column;
  }
}

/* ========================================
   Flexbox RTL Düzeltmeleri
   ======================================== */

/* Flex itemlerin sırasını tersine çevir */
[dir="rtl"] .flex-row {
  flex-direction: row-reverse;
}

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

/* ========================================
   Grid RTL Düzeltmeleri
   ======================================== */

[dir="rtl"] .grid-flow-col {
  direction: rtl;
}

/* ========================================
   Form Elements RTL (İleride kullanılabilir)
   ======================================== */

[dir="rtl"] input[type="text"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="tel"],
[dir="rtl"] textarea {
  text-align: right;
  direction: rtl;
}

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

/* ========================================
   Animasyonlar RTL Uyumlu
   ======================================== */

/* Slide animasyonlarını tersine çevir */
@keyframes slideInFromLeft-rtl {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight-rtl {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========================================
   Scroll Behavior RTL
   ======================================== */

[dir="rtl"] html {
  scroll-behavior: smooth;
}

/* ========================================
   Print Styles RTL
   ======================================== */

@media print {
  [dir="rtl"] body {
    direction: rtl;
    text-align: right;
  }
}

