/**
 * Kızılay Evde Sağlık - Orijinal tasarımı birebir uygulamak için
 * Bootstrap ve diğer stillerle çakışmayı önleyen override kuralları
 */

/* Bootstrap .reboot'ta scroll-behavior: smooth; hash / odak sonrası kaydırmayı yumuşatıp sayfayı “biraz oynamış” gösterebiliyor */
html {
  scroll-behavior: auto;
}

/* Orijinal sayfa body */
body.pt-0 {
  padding-top: 0 !important;
  margin: 0;
}

/* Arapça: yön bilgisini html yanında body üzerinde de tutuyoruz. Böylece
   bileşenler ve CMS'den gelen HTML, RTL yönünü doğrudan devralır. */
html[dir="rtl"],
body.rtl {
  direction: rtl;
}

body.rtl {
  text-align: right;
}

/* Header ve grid düzenini orijinal tema CSS'i yönetir */

/* Tema varsayılanı 80px; üst boşluk 140px */
.grid-layer.marginUp {
  margin-top: 140px !important;
}

/* Alt sayfa banner — sabit header (110px) altına girmesin */
.grid-layer:has(> .sub-page-banner) {
  padding-top: 110px;
  box-sizing: border-box;
}
@media screen and (max-height: 800px) {
  .grid-layer:has(> .sub-page-banner) {
    padding-top: 80px;
  }
}
@media screen and (max-width: 1100px) {
  .grid-layer:has(> .sub-page-banner) {
    padding-top: 80px;
  }
}
@media screen and (max-width: 767px) {
  .grid-layer:has(> .sub-page-banner) {
    padding-top: 60px;
  }
}

/* KVKK / Çerez: sabit header; .marginUp yetersizdi — ek padding-top (+40px üst boşluk) */
.grid-layer.kvkk-below-fixed-header {
  margin-top: 0 !important;
  padding-top: 158px;
  box-sizing: border-box;
}
@media screen and (max-width: 1100px) {
  .grid-layer.kvkk-below-fixed-header {
    padding-top: 128px;
  }
}
@media screen and (max-width: 767px) {
  .grid-layer.kvkk-below-fixed-header {
    padding-top: 112px;
  }
}

/*
  Production CSS uses custom Helvetica Neue LT families.
  If those files are missing, browser falls back to default serif.
  Keep the intended sans-serif appearance with explicit fallbacks.
*/
body,
button,
input,
select,
textarea,
.evde-saglik-theme {
  font-family: "helvetica-neue-lt-55", "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6,
strong,
b,
.bold,
.standart-btn,
.default-button {
  font-family: "helvetica-neue-lt-75", "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", sans-serif;
}

h3 {
  font-family: "helvetica-neue-lt-55", "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", sans-serif;
  font-size: 18px;
  font-weight: normal;
  font-stretch: normal;
  font-style: normal;
  line-height: 28px;
  letter-spacing: normal;
}

/* intl-tel-input bayrak görseli (flags.png wwwroot/img/ içinde olmalı) */
.iti__flag {
  background-image: url('/img/flags.png');
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .iti__flag {
    background-image: url('/img/flags.png');
  }
}

/* Sağ bar WhatsApp butonu (sm-whatsapp) her zaman görünsün */
.right-bar .sm-whatsapp,
.right-bar li.sm-whatsapp {
  display: list-item !important;
  visibility: visible !important;
}
.right-bar .sm-whatsapp a {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
}

/* kizilay-slider: Slick her doğrudan çocuğu bir slayt sayar; görsel + başlık .kizilay-slider__item içinde olmalı */
.kizilay-slider__item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  outline: none;
}
.kizilay-slider__item > p {
  margin-top: 0.75rem;
  margin-bottom: 0;
  text-align: center;
}
.kizilay-slider .slick-slide {
  height: auto;
}

/* Size Özel — Haberler: kart görseli tam genişlik, en fazla 300px yükseklik, ortalanmış */
#Haberler .card > .img-top {
  width: 100%;
  max-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
}
#Haberler .card > .img-top img {
  width: 100%;
  max-height: 300px;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Haber detayı — CMS kapak görseli canlıdaki gibi metnin üstünde ve ortada. */
.news-detail .news-detail-image {
  display: block;
  margin: 0 0 20px;
  text-align: center;
}
.news-detail .news-detail-image img {
  float: none;
  margin: 0 auto;
  max-width: 100%;
}

/* Hasta hikâyeleri — canlıdaki gibi önce kısa görünür, Görüntüle ile açılır. */
.patient-story-toggle {
  margin-top: 30px !important;
}

/* intlTelInput telefon alanı — .input-area flex konteynerde span sarmalayıcı genişlik
   almadığı için .iti ve specialInput art arda daralarak input sıfıra düşüyordu. */
.request-form .input-area > span {
  flex: 1;
  min-width: 0;
}
.request-form .input-area > span .iti {
  width: 100%;
}
.request-form .input-area > span input.specialInput {
  width: 100% !important;
}

/* Arama — footer .container ile aynı genişlik (Bootstrap max 1200px); kutu üstte; sonuç paneli ortada */
body.page-search .grid-layer.search-page-content {
  margin-top: 0 !important;
  min-height: 0 !important;
  display: block !important;
  padding-top: 0 !important;
}

body.page-search .search-page-cse {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  text-align: left;
}

body.page-search .search-page-cse .gsc-control-cse,
body.page-search .search-page-cse .gsc-control-cse-en {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

body.page-search .search-page-cse form.gsc-search-box,
body.page-search .search-page-cse table.gsc-search-box {
  width: 100% !important;
  max-width: 42rem;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Google overlay — tam ekran genişlik/yükseklik kapat; container genişliği; dikey ortalı */
body.page-search .gsc-results-wrapper-overlay {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) !important;
  width: calc(100% - 30px) !important;
  max-width: 1200px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: min(80vh, 800px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  margin: 0 !important;
  padding: 0 15px !important;
  z-index: 1040;
  box-sizing: border-box;
}

body.page-search .gsc-results-wrapper-overlay .gsc-control-cse,
body.page-search .gsc-results-wrapper-overlay .gsc-control-cse-en {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  box-sizing: border-box;
}

body.page-search .gsc-results-wrapper-overlay .gsc-control-wrapper-cse {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
}

body.page-search .gsc-results-wrapper-overlay .gsc-search-box,
body.page-search .gsc-results-wrapper-overlay form.gsc-search-box {
  order: -1;
}

body.page-search .gsc-results-wrapper-overlay form.gsc-search-box,
body.page-search .gsc-results-wrapper-overlay table.gsc-search-box {
  width: 100% !important;
  max-width: 42rem;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.page-search .gsc-modal-background-image {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1035;
}

body.page-search .gsc-results-wrapper-overlay .gsc-results-wrapper-visible,
body.page-search .gsc-results-wrapper-overlay .gsc-resultsbox-visible,
body.page-search .gsc-results-wrapper-overlay .gsc-above-wrapper-area,
body.page-search .gsc-results-wrapper-overlay .gsc-wrapper,
body.page-search .gsc-results-wrapper-overlay .gsc-results,
body.page-search .search-page-cse .gsc-results-wrapper-visible,
body.page-search .search-page-cse .gsc-resultsbox-visible,
body.page-search .search-page-cse .gsc-above-wrapper-area,
body.page-search .search-page-cse .gsc-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  text-align: left;
}

@media screen and (max-width: 767px) {
  body.page-search .grid-layer.search-page-content {
    margin-top: 0 !important;
  }

  body.page-search .gsc-results-wrapper-overlay {
    width: calc(100% - 20px) !important;
    max-height: 85vh !important;
    padding: 0 10px !important;
  }
}

/* Arapça: tema evde-saglik.min.css içindeki html[dir="rtl"] kuralları _Layout’ta dir="rtl" ile etkinleşir */
html[dir="rtl"] body.page-search .search-page-cse,
html[dir="rtl"] body.page-search .gsc-results-wrapper-overlay .gsc-results-wrapper-visible,
html[dir="rtl"] body.page-search .gsc-results-wrapper-overlay .gsc-resultsbox-visible,
html[dir="rtl"] body.page-search .gsc-results-wrapper-overlay .gsc-above-wrapper-area,
html[dir="rtl"] body.page-search .gsc-results-wrapper-overlay .gsc-wrapper,
html[dir="rtl"] body.page-search .search-page-cse .gsc-results-wrapper-visible,
html[dir="rtl"] body.page-search .search-page-cse .gsc-resultsbox-visible,
html[dir="rtl"] body.page-search .search-page-cse .gsc-above-wrapper-area,
html[dir="rtl"] body.page-search .search-page-cse .gsc-wrapper {
  text-align: right;
}

/* Telefon numarası alanı LTR kalsın (ülke kodu + rakam) */
html[dir="rtl"] .request-form .input-area .iti,
html[dir="rtl"] .request-form .input-area .iti input,
html[dir="rtl"] .appt-area .iti,
html[dir="rtl"] .appt-area .iti input {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .request-form input:not(.specialInput),
html[dir="rtl"] .request-form textarea,
html[dir="rtl"] .appt-area input:not(.specialInput),
html[dir="rtl"] .appt-area textarea {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .request-form input:not(.specialInput)::placeholder,
html[dir="rtl"] .request-form textarea::placeholder,
html[dir="rtl"] .appt-area input:not(.specialInput)::placeholder,
html[dir="rtl"] .appt-area textarea::placeholder {
  direction: rtl;
  text-align: right !important;
}

/* Telefon değeri LTR kalır; Arapça placeholder ise sağdan başlar. */
html[dir="rtl"] .request-form input.specialInput::placeholder,
html[dir="rtl"] .appt-area input.specialInput::placeholder {
  direction: rtl;
  text-align: right !important;
}

/* Başarı / hata bildirimleri RTL sayfada doğru hizalansın */
html[dir="rtl"] .appt-area .text-success,
html[dir="rtl"] .appt-area .text-danger,
html[dir="rtl"] .request-form .text-success,
html[dir="rtl"] .request-form .text-danger {
  direction: rtl;
  text-align: right;
}
