/* Mobil cihaz uyumluluk katmanı — iOS Safari, Android Chrome/Samsung/Firefox, tablet */
:root {
  --app-height: 100vh;
  --app-height: 100dvh;
  --app-height: calc(var(--app-vh, 1vh) * 100);
}

html.ios-scroll-lock,
body.ios-scroll-lock {
  overflow: hidden !important;
  touch-action: none;
  overscroll-behavior: none;
}

body.ios-scroll-lock {
  position: fixed !important;
  width: 100% !important;
  left: 0 !important;
  right: 0 !important;
}

html.is-standalone body {
  padding-top: env(safe-area-inset-top, 0px);
}

html.is-android #mobTabbar,
html.is-android nav.mob-tabbar {
  padding-bottom: max(0px, env(safe-area-inset-bottom, 0px)) !important;
}

html.is-mobile body.search-active .mob-search-sheet {
  max-height: min(calc(var(--app-height, 100dvh) - var(--keyboard-offset, 0px)), 640px) !important;
}

html.is-mobile body.search-active .mob-search-sheet-inner {
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

@supports (-webkit-touch-callout: none) {
  header nav.nav-menu.active,
  .mob-search-sheet,
  .ref-modal-overlay,
  .mfp-wrap {
    min-height: -webkit-fill-available;
  }
}

@media (max-width: 1020px) {
  html,
  body {
    overscroll-behavior-x: none;
    -webkit-overflow-scrolling: touch;
  }

  body.search-active,
  body.modal-active,
  body.ref-modal-open,
  body.menu-active.no-scroll {
    overscroll-behavior: none;
  }

  a,
  button,
  .mob-tabbar-item,
  .hizmet-detail__cta-btn,
  .mob-header-toggle {
    touch-action: manipulation;
  }

  body.search-active.ios-scroll-lock,
  body.modal-active.ios-scroll-lock,
  body.menu-active.ios-scroll-lock {
    position: fixed !important;
    width: 100% !important;
  }

  header nav.nav-menu.active,
  body.menu-active nav.nav-menu.active {
    height: var(--app-height, 100dvh) !important;
    max-height: var(--app-height, 100dvh) !important;
  }

  .mob-search-sheet {
    max-height: min(88dvh, var(--app-height, 100dvh)) !important;
  }

  .ref-modal-overlay.active {
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
  }

  .ref-modal {
    max-height: min(85dvh, calc(var(--app-height, 100dvh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px)) !important;
  }

  .mob-search-results,
  .ref-modal-body,
  header nav.nav-menu.active .menu-list-wrap,
  header nav.nav-menu.active .mob-menu-scroll {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
  textarea,
  select,
  .mob-search-input,
  .desk-search-input,
  #contact-form input,
  #contact-form textarea,
  .quote-section input,
  .quote-section textarea,
  .comment-form input,
  .comment-form textarea {
    font-size: max(16px, 1rem) !important;
    -webkit-text-size-adjust: 100%;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="number"],
  input[type="password"],
  input[type="date"],
  input[type="time"],
  input[type="datetime-local"],
  textarea {
    -webkit-appearance: none;
    appearance: none;
    border-radius: inherit;
  }

  input[type="checkbox"],
  input[type="radio"] {
    min-width: 20px;
    min-height: 20px;
  }

  input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
  }

  input[type="search"]::-webkit-search-decoration,
  input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
  }

  .mob-tabbar-item,
  .mob-header-toggle,
  .mob-search-close,
  .ref-modal-close,
  .mobile-menu-close,
  .mobile-drop-toggle,
  .sss-question,
  .hizmet-faq__trigger,
  a.button-one,
  .form-submit-btn,
  .site-contact-float {
    min-height: 44px;
    min-width: 44px;
  }

  .mob-tabbar-item {
    touch-action: manipulation;
  }

  a,
  button,
  [role="button"],
  .gallery-card,
  .ref-logo-item.has-detail {
    -webkit-tap-highlight-color: transparent;
  }

  a:active,
  button:active,
  .mob-tabbar-item:active,
  .ref-logo-item.has-detail:active {
    opacity: 0.92;
  }

  :focus-visible {
    outline: 2px solid color-mix(in srgb, #ffcd16 85%, #292929);
    outline-offset: 2px;
  }

  html.is-standalone #mobTabbar,
  html.is-standalone nav.mob-tabbar {
    bottom: calc(var(--mob-tab-float-gap, 16px) + env(safe-area-inset-bottom, 0px)) !important;
  }

  html.is-standalone body {
    padding-bottom: calc(var(--mob-tab-h, 82px) + var(--mob-tab-float-gap, 16px) + var(--mob-tab-fab-rise, 26px) + 16px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 1020px) and (orientation: landscape) {
  header nav.nav-menu.active {
    padding-left: max(12px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(12px, env(safe-area-inset-right, 0px)) !important;
  }

  .ref-modal {
    max-height: min(78dvh, calc(var(--app-height, 100dvh) - 16px)) !important;
  }
}

@media (min-width: 744px) and (max-width: 1020px) {
  .container {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  .hizmet-detail-page__layout {
    gap: 28px;
  }

  .mob-tabbar-item {
    min-height: 48px;
  }

  .ref-modal {
    max-width: min(640px, calc(100vw - 32px));
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767px) {
  .hizmet-detail__related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hizmet-detail__cta-btn--share[data-site-share] {
  display: none;
}

.hizmet-detail__cta-btn--share[data-site-share].is-share-ready {
  display: inline-flex;
}

@media (max-width: 1020px) {
  :target,
  .hizmet-detail-page [id],
  .detail-page [id],
  .site-page--detail [id] {
    scroll-margin-top: calc(64px + var(--tabbar-h, 116px) + env(safe-area-inset-top, 0px));
  }
}

.site-share-toast {
  position: fixed;
  left: 50%;
  z-index: 100010;
  max-width: min(92vw, 360px);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #292929;
  text-align: center;
  background: #ffffff;
  border: 1px solid color-mix(in srgb, #292929 12%, transparent);
  border-radius: 12px;
  box-shadow: 0 10px 32px color-mix(in srgb, #292929 14%, transparent);
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + var(--tabbar-h, 116px) + 8px);
}

html:not(.is-mobile) .site-share-toast {
  bottom: max(24px, env(safe-area-inset-bottom, 0px));
}

.site-share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html.is-mobile *,
  html.is-mobile *::before,
  html.is-mobile *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .site-share-toast {
    transition: none;
  }
}
