/* 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);
}

.site-wordmark-dark {
  display: none;
}

html.dark .site-wordmark-light {
  display: none;
}

html.dark .site-wordmark-dark {
  display: block;
}

html.dark .site-wordmark-dark-filter {
  filter: brightness(0) invert(1) contrast(1.1);
}

/* 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; }
}

/* Gateway Portal V2 - Legal animated scene only */
.turki-portal-v2 {
  background: #030504;
  isolation: isolate;
}

.turki-portal-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  filter: blur(2px) saturate(0.75);
  mix-blend-mode: screen;
  transform: scale(1.04);
}

.turki-portal-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(211, 186, 134, 0.16), transparent 32%),
    radial-gradient(circle at 15% 80%, rgba(174, 140, 86, 0.15), transparent 28%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.98), rgba(39, 45, 29, 0.96) 44%, rgba(0, 0, 0, 0.97));
}

.turki-law-animated-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.turki-law-animated-bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(211, 186, 134, 0.065) 48% 52%, transparent 54% 100%),
    linear-gradient(0deg, transparent 0 46%, rgba(211, 186, 134, 0.035) 48% 52%, transparent 54% 100%);
  background-size: 115px 115px;
  opacity: 0.42;
  transform: rotate(-10deg);
  animation: turki-law-grid-move 18s linear infinite;
}

.turki-law-animated-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0 38%, rgba(0, 0, 0, 0.15) 58%, rgba(0, 0, 0, 0.74) 100%);
}

.turki-law-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 9999px;
  background: rgba(211, 186, 134, 0.09);
  filter: blur(55px);
  animation: turki-law-glow-drift 10s ease-in-out infinite;
}

.turki-law-glow-1 {
  top: 8%;
  right: 10%;
}

.turki-law-glow-2 {
  bottom: 6%;
  left: 8%;
  width: 300px;
  height: 300px;
  background: rgba(174, 140, 86, 0.12);
  animation-delay: -4s;
}

.turki-law-rings {
  position: absolute;
  top: 48%;
  left: 50%;
  width: min(680px, 82vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: 0.42;
}

.turki-law-rings span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(211, 186, 134, 0.22);
  border-radius: 9999px;
  box-shadow: inset 0 0 22px rgba(211, 186, 134, 0.08), 0 0 28px rgba(174, 140, 86, 0.08);
  animation: turki-law-ring-pulse 7s ease-in-out infinite;
}

.turki-law-rings span:nth-child(2) {
  inset: 13%;
  animation-delay: -2s;
}

.turki-law-rings span:nth-child(3) {
  inset: 27%;
  animation-delay: -4s;
}

.turki-law-scale-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, 80vw);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0.28;
  filter: drop-shadow(0 0 30px rgba(211, 186, 134, 0.18));
  animation: turki-law-scale-float 7s ease-in-out infinite;
}

.law-scale-stroke {
  stroke: rgba(211, 186, 134, 0.82);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: turki-law-draw 5.5s ease-in-out infinite alternate;
}

.law-scale-accent {
  stroke: rgba(174, 140, 86, 0.86);
  animation-delay: 0.35s;
}

.turki-law-pillar-row {
  position: absolute;
  bottom: -7%;
  left: 50%;
  width: min(880px, 92vw);
  height: 260px;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  opacity: 0.18;
}

.turki-law-pillar-row span {
  position: relative;
  width: clamp(42px, 7vw, 70px);
  height: 100%;
  border-radius: 999px 999px 0 0;
  background:
    linear-gradient(90deg, transparent 0 16%, rgba(211, 186, 134, 0.18) 17% 20%, transparent 21% 36%, rgba(211, 186, 134, 0.16) 37% 40%, transparent 41% 100%),
    linear-gradient(180deg, rgba(211, 186, 134, 0.24), rgba(174, 140, 86, 0.06));
  animation: turki-law-pillar-rise 7s ease-in-out infinite;
}

.turki-law-pillar-row span:nth-child(2) { height: 82%; animation-delay: -1.4s; }
.turki-law-pillar-row span:nth-child(3) { height: 112%; animation-delay: -2.6s; }
.turki-law-pillar-row span:nth-child(4) { height: 88%; animation-delay: -3.8s; }
.turki-law-pillar-row span:nth-child(5) { height: 100%; animation-delay: -5s; }

.turki-law-flow-lines {
  position: absolute;
  inset-inline: 8%;
  top: 18%;
  height: 64%;
  opacity: 0.34;
}

.turki-law-flow-lines span {
  position: absolute;
  height: 1px;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(211, 186, 134, 0.42), transparent);
  animation: turki-law-line-flow 7s ease-in-out infinite;
}

.turki-law-flow-lines span:nth-child(1) { top: 18%; right: 0; }
.turki-law-flow-lines span:nth-child(2) { top: 52%; left: 0; width: 36%; animation-delay: -2s; }
.turki-law-flow-lines span:nth-child(3) { bottom: 12%; right: 14%; width: 32%; animation-delay: -4s; }

.turki-gateway-content {
  text-shadow: 0 10px 35px rgba(0, 0, 0, 0.34);
}

.turki-gateway-hero {
  position: relative;
}

.turki-gateway-hero::before,
.turki-gateway-hero::after {
  content: "";
  position: absolute;
  top: 50%;
  width: min(180px, 22vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(211, 186, 134, 0.55), transparent);
  opacity: 0.75;
}

.turki-gateway-hero::before { right: calc(50% + 210px); }
.turki-gateway-hero::after { left: calc(50% + 210px); }

.turki-portal-card {
  isolation: isolate;
}

.turki-portal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 20% 0%, rgba(211, 186, 134, 0.16), transparent 38%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.turki-portal-card::after {
  content: "";
  position: absolute;
  inset-inline: 1.25rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(211, 186, 134, 0.45), transparent);
  transform: scaleX(0.45);
  opacity: 0.35;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.turki-portal-card:hover::before {
  opacity: 1;
}

.turki-portal-card:hover::after {
  transform: scaleX(1);
  opacity: 0.9;
}

.turki-portal-card-icon {
  box-shadow: inset 0 0 0 1px rgba(211, 186, 134, 0.14), 0 10px 22px rgba(0, 0, 0, 0.18);
}

@keyframes turki-law-grid-move {
  0% { transform: rotate(-10deg) translate3d(0, 0, 0); }
  100% { transform: rotate(-10deg) translate3d(115px, -115px, 0); }
}

@keyframes turki-law-glow-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.8; }
  50% { transform: translate3d(-20px, 18px, 0) scale(1.08); opacity: 1; }
}

@keyframes turki-law-ring-pulse {
  0%, 100% { transform: scale(0.98); opacity: 0.32; }
  50% { transform: scale(1.03); opacity: 0.72; }
}

@keyframes turki-law-scale-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-10px); }
}

@keyframes turki-law-draw {
  0% { stroke-dashoffset: 620; opacity: 0.22; }
  45%, 100% { stroke-dashoffset: 0; opacity: 0.9; }
}

@keyframes turki-law-pillar-rise {
  0%, 100% { transform: translateY(8px); opacity: 0.58; }
  50% { transform: translateY(-8px); opacity: 0.95; }
}

@keyframes turki-law-line-flow {
  0%, 100% { transform: translateX(0); opacity: 0.18; }
  50% { transform: translateX(22px); opacity: 0.75; }
}

@media (max-width: 767px) {
  .turki-law-scale-mark {
    width: 92vw;
    opacity: 0.2;
  }

  .turki-law-rings {
    width: 105vw;
    opacity: 0.34;
  }

  .turki-law-pillar-row {
    bottom: -12%;
    opacity: 0.13;
  }

  .turki-gateway-hero::before,
  .turki-gateway-hero::after {
    display: none;
  }

  .turki-gateway-kicker {
    font-size: 0.76rem;
    letter-spacing: 0.04em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .turki-law-animated-bg *,
  .turki-law-animated-bg::before,
  .turki-law-rings span,
  .turki-law-scale-mark,
  .law-scale-stroke,
  .turki-law-pillar-row span,
  .turki-law-flow-lines span,
  .turki-law-glow {
    animation: none !important;
  }
}

/* Home hero legal shape: same identity, no content/layout changes */
.turki-law-hero-shape {
  opacity: 0.92;
  mix-blend-mode: normal;
}
.turki-law-animated-bg--hero .turki-law-scale-mark {
  top: 48%;
  width: min(560px, 86vw);
  opacity: 0.24;
}
.turki-law-animated-bg--hero .turki-law-rings {
  top: 48%;
  width: min(720px, 88vw);
  opacity: 0.36;
}
.turki-law-animated-bg--hero .turki-law-pillar-row {
  bottom: -10%;
  opacity: 0.16;
}
.turki-law-animated-bg--hero .turki-law-flow-lines {
  opacity: 0.28;
}
@media (max-width: 767px) {
  .turki-law-animated-bg--hero .turki-law-scale-mark {
    width: 96vw;
    opacity: 0.18;
  }
  .turki-law-animated-bg--hero .turki-law-pillar-row {
    bottom: -16%;
    opacity: 0.1;
  }
}
