/* Sosta — global mobil uyumluluk */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  max-width: 100vw;
}

body.sosta-menu-open {
  overflow: hidden;
  touch-action: none;
}

img,
video,
iframe,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

main {
  overflow-x: clip;
  width: 100%;
}

/* Tipografi — küçük ekran */
@media (max-width: 767px) {
  .text-display-lg,
  .font-display-lg {
    font-size: 32px !important;
    line-height: 40px !important;
    letter-spacing: -0.01em !important;
  }

  .text-headline-lg,
  .font-headline-lg {
    font-size: 24px !important;
    line-height: 32px !important;
  }

  .text-headline-md,
  .font-headline-md {
    font-size: 20px !important;
    line-height: 28px !important;
  }

  .text-body-lg,
  .font-body-lg {
    font-size: 16px !important;
    line-height: 26px !important;
  }

  .py-section-gap {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .pt-section-gap {
    padding-top: 3rem !important;
  }

  .pb-section-gap {
    padding-bottom: 3rem !important;
  }

  .mb-section-gap,
  .gap-section-gap {
    margin-bottom: 3rem !important;
  }
}

/* İçerik alanları */
.prose,
.blog-content,
.font-body-lg {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prose img,
.blog-content img,
.prose video,
.blog-content video {
  border-radius: 0.75rem;
}

.prose table,
.blog-content table,
main table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
}

.prose pre,
.blog-content pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.prose iframe,
.blog-content iframe {
  width: 100%;
  min-height: 200px;
}

/* Formlar */
@media (max-width: 639px) {
  form.flex:not(.flex-col):not(.flex-wrap) {
    flex-direction: column;
    align-items: stretch;
  }

  form.flex:not(.flex-col) input,
  form.flex:not(.flex-col) select,
  form.flex:not(.flex-col) textarea,
  form.flex:not(.flex-col) button {
    width: 100%;
  }

  .flex.flex-wrap.justify-center.gap-3 {
    gap: 0.5rem;
  }
}

/* Mobil alt bar — iOS safe area */
#sosta-mobile-bar {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Mobil menü çekmecesi */
#sosta-mobile-overlay {
  transition: opacity 0.3s ease;
}

#sosta-mobile-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

#sosta-mobile-drawer {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: env(safe-area-inset-bottom);
}

#sosta-mobile-drawer.is-open {
  transform: translateX(0);
}

#sosta-mobile-drawer .sosta-mobile-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 15px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#sosta-mobile-drawer .sosta-mobile-link:hover,
#sosta-mobile-drawer .sosta-mobile-link:focus-visible {
  background-color: #eceef0;
  outline: none;
}

#sosta-mobile-drawer .sosta-mobile-link.is-active {
  color: #004ccb;
  background-color: rgba(0, 76, 203, 0.08);
}

#sosta-mobile-drawer details summary {
  list-style: none;
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  font-weight: 700;
  font-size: 15px;
  border-radius: 0.5rem;
}

#sosta-mobile-drawer details summary::-webkit-details-marker {
  display: none;
}

#sosta-mobile-drawer details[open] summary {
  color: #004ccb;
  background-color: rgba(0, 76, 203, 0.06);
}

#sosta-mobile-drawer details a {
  display: block;
  padding: 0.625rem 1rem 0.625rem 2rem;
  font-size: 14px;
  font-weight: 600;
  color: #44474e;
  min-height: 44px;
  display: flex;
  align-items: center;
}

#sosta-mobile-drawer details a:hover {
  color: #004ccb;
}

/* Yatay taşma önleme */
@media (max-width: 767px) {
  .overflow-x-auto {
    -webkit-overflow-scrolling: touch;
  }
}

/* Dokunma hedefleri */
#sosta-mobile-open,
#sosta-mobile-close,
#sosta-mobile-bar a {
  min-height: 44px;
  min-width: 44px;
}

/* Kart içi taşma */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
