/* ============================================================
   hl-url-switcher.css — URL Tabanlı Dil Değiştirici
   HorsLanguage WordPress Eklentisi
   Sitenizin header'ına wp_enqueue_style() ile ekleyin.
   ============================================================ */

/* ── Konteyner ───────────────────────────────── */
.hl-has-theme-switcher .hl-menu-item,
.hl-has-theme-switcher .hl-floating-switcher {
  display: none !important;
}

.hl-mobile-switcher {
  display: none;
}

/* Elementor/Hospa header mount. The wrapper keeps its original footer
   position as a responsive fallback; JS adds this class only at wide widths. */
.hl-header-switcher {
  position: relative !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 1000 !important;
  display: inline-flex !important;
  flex: 0 0 auto;
  margin: 0 10px 0 0;
}

.hl-header-switcher .hl-url-switcher__menu {
  top: calc(100% + 10px) !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  transform-origin: top right !important;
}

/* Make room for the language control without clipping the right-hand CTA.
   The header's search item is visually absent on this layout but still takes
   space, so remove it only while the switcher is mounted in the header. */
@media (min-width: 1200px) {
  .main-header-area.mharea2
    .navbar-inner
    .others-option.hl-has-header-switcher {
    margin-left: 18px !important;
    flex-shrink: 0;
  }

  .main-header-area.mharea2
    .others-option.hl-has-header-switcher
    > .hl-header-search-option {
    display: none !important;
  }

  .main-header-area.mharea2
    .navbar-nav
    > .nav-item {
    margin-left: 10px !important;
    margin-right: 10px !important;
  }

  .main-header-area.mharea2
    .navbar-nav
    > .nav-item:first-child {
    margin-left: 0 !important;
  }

  .main-header-area.mharea2
    .navbar-nav
    > .nav-item:last-child {
    margin-right: 0 !important;
  }
}

.pxl-switch-language .pxl-item--language[data-hl-lang] {
  cursor: pointer;
}

/* ── Logo koruması (TÜM diller) ────────────────
   Çevrilmiş menü metinleri (özellikle Almanca/Rusça) orijinal Türkçeden
   daha uzun oluyor; header dar gelince flex düzeni logoyu sıkıştırıp
   görünmez/çok küçük hale getirebiliyor. Bu kural her dilde geçerli —
   logo asla küçülmesin, menü öğeleri gerekirse kendi aralarında sıkışsın. */
.navbar-brand {
  flex-shrink: 0 !important;
  min-width: 120px;
  margin-right: 16px;
}

/* Logo %25 daha büyük görünsün (tüm dillerde). transform:scale kullanıyoruz
   çünkü temanın kendi CSS'indeki tam piksel yüksekliğini bilmeden, mevcut
   boyuta ORANLA büyütür — ve transform diğer öğelerin flex/yerleşim
   hesaplamasını etkilemez, bu yüzden header'ı bozma riski yoktur.
   transform-origin:left ile büyüme sağa/aşağı doğru olur; olası nav
   metniyle çakışmayı önlemek için üstteki margin-right'ı biraz artırdık. */
.navbar-brand img {
  transform: scale(1);
  transform-origin: left center;
}

/* Compact desktop header.
   Hospa's transparent header adds generous vertical padding around the logo.
   Keep the mobile/off-canvas layout untouched and tighten only the desktop row. */
@media (min-width: 1200px) {
  .main-header-area.mharea2
    .navbar-area-with-transparent-color
    > .container-fluid
    > .navbar-brand {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  .main-header-area.mharea2
    .navbar-area-with-transparent-color.is-sticky
    > .container-fluid
    > .navbar-brand {
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }
}

/* Not: Yazı boyutu/padding'i CSS ile agresif sıkıştırmak temanın açılır
   menü oklarının ve buton ikonlarının konumunu bozuyordu (metinle üst
   üste biniyordu) — o kurallar kaldırıldı. Sığdırma işini asıl olarak
   admin panelden menü metinlerini kısaltarak çözmek daha güvenli. */

.hl-url-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: inherit;
  /* Bu değişkenleri değiştirerek tüm renk şemasını temaya göre ayarlayabilirsin */
  --hl-sw-text: #0d2d5a;
  --hl-sw-border: #dce3ee;
  --hl-sw-bg: #ffffff;
  --hl-sw-bg-hover: #f3f6fb;
  --hl-sw-accent: #2563eb;
  --hl-sw-accent-bg: #eef4ff;
}

/* ── Tetikleyici Buton ───────────────────────── */
.hl-url-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--hl-sw-border);
  border-radius: 999px;
  background: var(--hl-sw-bg);
  color: var(--hl-sw-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background .22s ease,
    border-color .22s ease,
    transform .18s ease;
  white-space: nowrap;
  line-height: 1;
}

.hl-url-switcher__btn:hover,
.hl-url-switcher__btn[aria-expanded="true"] {
  background: var(--hl-sw-bg-hover);
  border-color: var(--hl-sw-accent);
  transform: translateY(-1px);
}

/* ── Ok ──────────────────────────────────────── */
.hl-url-switcher__arrow {
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  transition: transform .22s ease;
}

.hl-url-switcher__btn[aria-expanded="true"] .hl-url-switcher__arrow {
  transform: rotate(180deg);
}

/* ── Açılır Menü ─────────────────────────────── */
.hl-url-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9999;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--hl-sw-bg, #fff);
  border: 1px solid var(--hl-sw-border, #dce3ee);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 30, 60, .14);

  /* pointer-events değil display kullanıyoruz:
     Tema JS'i menüyü görünür kılsa bile linkler tıklanabilir olsun. */
  display: none;
  transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  transition:
    opacity .2s ease,
    transform .2s ease;
  opacity: 0;
}

.hl-url-switcher__menu.is-open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Tema CSS'i .hl-url-switcher__menu'yu override ederse bile
   linkler her zaman tıklanabilir kalır. */
.hl-url-switcher__option {
  pointer-events: auto !important;
}

/* ── Menü Öğeleri ────────────────────────────── */
.hl-url-switcher__option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 9px;
  color: var(--hl-sw-text, #0d2d5a);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition:
    background .18s ease,
    color .18s ease;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.hl-url-switcher__option:hover {
  background: var(--hl-sw-bg-hover, #f3f6fb);
}

.hl-url-switcher__option.is-active {
  background: var(--hl-sw-accent-bg, #eef4ff);
  color: var(--hl-sw-accent, #2563eb);
  font-weight: 700;
}

/* RTL uyumu */
[dir="rtl"] .hl-url-switcher__menu {
  right: auto;
  left: 0;
  transform-origin: top left;
}

.hl-mobile-switcher .hl-url-switcher__menu {
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
  transform-origin: bottom right;
}

.hl-mobile-switcher.hl-mobile-rtl .hl-url-switcher__menu {
  right: auto;
  left: 0;
  transform-origin: bottom left;
}

.hl-mobile-switcher .hl-url-switcher__menu.is-open {
  transform: translateY(0) scale(1);
}

/* ── Dil Bazlı Hero/Banner Slider Okları ────────── */
.hl-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(5, 24, 54, .38);
  color: #fff;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.hl-hero-arrow:hover {
  background: rgba(5, 24, 54, .62);
}
.hl-hero-arrow--prev { left: 18px; }
.hl-hero-arrow--next { right: 18px; }

.medical-center-banner-area .hl-hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.medical-center-banner-area .medical-center-banner-content {
  position: relative;
  z-index: 2;
}

/* Hero slides use a short fade so background and slide-specific copy change
   together without a hard visual cut. */
.medical-center-banner-area.hl-hero-fade {
  animation: hl-hero-fade 1.2s ease both;
}

@keyframes hl-hero-fade {
  from { opacity: .78; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .hl-hero-arrow {
    width: 36px;
    height: 36px;
  }
  .hl-hero-arrow--prev { left: 10px; }
  .hl-hero-arrow--next { right: 10px; }
}

/* ── Ürün kartı beyaz overlay kaldır ────────────── */
.mh-cat-visual-wrap::after,
.mh-cat-visual-wrap::before,
.mh-cat-visual::after,
.mh-cat-visual::before {
  display: none !important;
  opacity: 0 !important;
  background: none !important;
}

/* Mobil */
@media (max-width: 1024px) {
  .hl-mobile-switcher {
    display: inline-flex;
    z-index: 999999 !important;
  }

  .hl-url-switcher__label {
    display: none;
  }
  .hl-url-switcher__btn {
    padding: 8px 10px;
  }
  .hl-mobile-switcher .hl-url-switcher__btn {
    min-width: 42px;
    min-height: 42px;
    justify-content: center;
    background: rgba(5, 24, 54, .92);
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .22);
  }
  .hl-url-switcher__menu {
    right: -6px;
    min-width: 130px;
  }
  .hl-mobile-switcher .hl-url-switcher__menu {
    min-width: 156px;
  }
}

/* ── Tema tarafından CSS content ile yazdırılan metinler ─────────
   Bu etiketler DOM text node'u olmadığı için JS çevirmeni tarafından
   görülemez. Body dil sınıfıyla kaynak tema kuralını kesin olarak ez. */
body.hl-lang-en .list li:first-child a::before {
  content: "Home" !important;
}
body.hl-lang-de .list li:first-child a::before {
  content: "Startseite" !important;
}
body.hl-lang-ru .list li:first-child a::before {
  content: "Главная" !important;
}

body.hl-lang-en .phone-btn span::before {
  content: "PHONE: " !important;
}
body.hl-lang-de .phone-btn span::before {
  content: "TELEFON: " !important;
}
body.hl-lang-ru .phone-btn span::before {
  content: "ТЕЛЕФОН: " !important;
}

body.hl-lang-en .list li a[href*="blog"]::before {
  content: "Blog" !important;
}
body.hl-lang-de .list li a[href*="blog"]::before {
  content: "Blog" !important;
}
body.hl-lang-ru .list li a[href*="blog"]::before {
  content: "Блог" !important;
}

body.hl-lang-en .list li a[href*="doctors-post"]::before {
  content: "Our Doctors" !important;
}
body.hl-lang-de .list li a[href*="doctors-post"]::before {
  content: "Unsere Ärzte" !important;
}
body.hl-lang-ru .list li a[href*="doctors-post"]::before {
  content: "Наши врачи" !important;
}

body.hl-lang-en .list li a[href*="department"]::before,
body.hl-lang-en .list li a[href*="birim"]::before {
  content: "Medical Units" !important;
}
body.hl-lang-de .list li a[href*="department"]::before,
body.hl-lang-de .list li a[href*="birim"]::before {
  content: "Medizinische Fachbereiche" !important;
}
/* Hospa service breadcrumbs hide the real "Services" link text and print
   "Tıbbi Birimlerimiz" through ::before. Target that exact href because the
   generated text does not exist in the DOM and cannot be translated by JS. */
html[lang^="en"] body .content .list li a[href*="services-post"]::before,
body.hl-lang-en .content .list li a[href*="services-post"]::before {
  content: "Medical Units" !important;
}
html[lang^="de"] body .content .list li a[href*="services-post"]::before,
body.hl-lang-de .content .list li a[href*="services-post"]::before {
  content: "Medizinische Fachbereiche" !important;
}
html[lang^="ru"] body .content .list li a[href*="services-post"]::before,
body.hl-lang-ru .content .list li a[href*="services-post"]::before {
  content: "\00041C\000435\000434\000438\000446\000438\00043D\000441\00043A\000438\000435 \00043E\000442\000434\000435\00043B\000435\00043D\000438\00044F" !important;
}

body.hl-lang-ru .list li a[href*="department"]::before,
body.hl-lang-ru .list li a[href*="birim"]::before {
  content: "Медицинские отделения" !important;
}
