/* Custom scrollbar for an elegant look */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background-color: #F8EDDE;
}
html.dark ::-webkit-scrollbar-track {
  background-color: #272D1D;
}
::-webkit-scrollbar-thumb {
  background-color: #D3BA86;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #AE8C56;
}

/* Animations */
@keyframes pulse-slow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.animate-pulse-slow {
  animation: pulse-slow 3s ease-in-out infinite;
}

body.overflow-hidden {
  overflow: hidden;
}

/* Marquee for Partners */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
}
.marquee-content {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}
html[dir="ltr"] .marquee-content {
  animation: marquee-ltr 30s linear infinite;
}
@keyframes marquee-ltr {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}

/* Professional mobile polish and horizontal overflow fixes */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, video, canvas, svg {
  max-width: 100%;
}

body {
  position: relative;
}

/* Use favicon artwork wherever the scale icon was used */
.favicon-scale-icon {
  display: inline-block;
  vertical-align: middle;
  filter: drop-shadow(0 8px 18px rgba(174, 140, 86, 0.25));
}

.site-favicon-logo {
  border-radius: 9999px;
  filter: drop-shadow(0 6px 14px rgba(174, 140, 86, 0.28));
}

.site-wordmark {
  max-width: min(220px, 52vw);
}

/* Prevent AOS/transformed blocks and decorative borders from causing side-scroll */
[data-aos], .aos-init, .aos-animate {
  max-width: 100%;
}

section, nav, footer, main, header {
  max-width: 100vw;
}

/* Marquee stability on mobile */
.marquee-container {
  max-width: 100vw;
  direction: ltr;
}
.marquee-content {
  width: max-content;
  min-width: 100%;
  will-change: transform;
}
.marquee-content > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Mobile-specific refinements */
@media (max-width: 767px) {
  nav .h-20 {
    height: 72px;
  }

  .site-favicon-logo {
    width: 42px;
    height: 42px;
  }

  .site-wordmark {
    max-width: 165px;
    height: auto;
  }

  #mobile-menu {
    width: 100%;
    max-width: 100vw;
  }

  .marquee-content {
    gap: 2rem !important;
    padding-inline: 1rem !important;
  }

  .marquee-content .text-2xl {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .grid {
    min-width: 0;
  }

  h1, h2, h3, p, a, li, button {
    overflow-wrap: anywhere;
  }

  .absolute.-inset-4 {
    inset: -0.5rem;
  }

  .fixed.bottom-6.left-6 {
    bottom: 1rem !important;
    left: 1rem !important;
    padding: 0.85rem !important;
  }

  .favicon-scale-icon.h-16,
  .favicon-scale-icon.w-16 {
    width: 3.5rem;
    height: 3.5rem;
  }
}

/* Fix 21-05: professional favicon logo on gateway page */
@keyframes float-soft {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.035); }
}
.animate-float-soft { animation: float-soft 4s ease-in-out infinite; }
.portal-favicon-shell {
  width: 7.5rem;
  height: 7.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
}
.portal-favicon-img {
  display: block;
  border-radius: 9999px;
  filter: drop-shadow(0 10px 24px rgba(211, 186, 134, 0.32));
}

/* FAQ must be closed by default */
.faq-content {
  max-height: 0;
  overflow: hidden;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-content.is-open {
  padding-top: 1.25rem !important;
  padding-bottom: 1.25rem !important;
}

/* Footer icon direction normalization */
.footer-contact-list { direction: rtl; }
.footer-contact-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  direction: rtl;
  text-align: right;
}
.footer-contact-item i,
.footer-contact-item svg {
  flex: 0 0 auto;
}
.footer-contact-item span[dir="ltr"] {
  direction: ltr;
  unicode-bidi: embed;
}
.footer-social {
  direction: ltr;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .portal-favicon-shell {
    width: 6rem;
    height: 6rem;
  }
  .portal-favicon-img {
    width: 4.5rem !important;
    height: 4.5rem !important;
  }
  .faq-btn {
    gap: 1rem;
  }
}


/* Bilingual direction fixes - no section/style removal */
html[dir="rtl"] body.turki-lang-ar { direction: rtl; text-align: right; }
html[dir="ltr"] body.turki-lang-en { direction: ltr !important; text-align: left; }
.turki-lang-en .main-navbar-row { direction: ltr !important; flex-direction: row !important; }
.turki-lang-ar .main-navbar-row { direction: rtl !important; }
.turki-lang-en nav, .turki-lang-en header, .turki-lang-en main, .turki-lang-en section, .turki-lang-en footer { direction: ltr; }
.turki-lang-en .site-wordmark { max-width: 260px; }
.turki-lang-en .footer-contact-list-en { direction: ltr; }
.footer-contact-item-en { display:flex; align-items:center; justify-content:flex-start; gap:.5rem; direction:ltr; text-align:left; }
.footer-contact-item-en i, .footer-contact-item-en svg { flex:0 0 auto; }
.turki-lang-en .footer-social { direction:ltr; }
@media (min-width: 768px){
  .turki-lang-en nav .main-navbar-row > a { order:1; }
  .turki-lang-en nav .main-navbar-row > .hidden.md\:flex.items-center.gap-8 { order:2; }
  .turki-lang-en nav .main-navbar-row > .hidden.md\:flex.items-center.space-x-4 { order:3; }
}
@media (max-width: 767px){
  .turki-lang-en .main-navbar-row { direction:ltr !important; }
}
