/* =============================================================
   HEALENK MEDİKAL — ORTAK FOOTER TASARIMI
   Tüm sayfalarda kullanılan tek, profesyonel footer stil dosyası.
   ============================================================= */

:root {
  /* Sitede yıldız puanlarında zaten kullanılan altın tonuyla uyumlu,
     paylaşılan vurgu rengi — tüm sayfalarda tutarlı kullanım için. */
  --accent-gold: #c9a227;
}

/* Anasayfa haricindeki sayfalarda box-sizing: border-box tanımlı değildi;
   bu yüzden width+padding kullanan öğeler (ör. .search-input, .stat-item)
   anasayfadakinden daha büyük render oluyordu. Tüm sayfalarda tutarlı
   boyut hesaplaması için evrensel olarak burada tanımlanıyor. */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Dikey kaydırma çubuğu için her zaman yer ayrılır; böylece uzun
   içerikli sayfalarda çubuk sonradan belirip sayfayı yana kaydırmaz. */
html {
  overflow-y: scroll;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

/* =============================================================
   GENEL MOBİL DÜZELTMELER
   - iOS Safari, font-size 16px'in altındaki input'lara odaklanınca
     sayfayı otomatik yakınlaştırır; bu yüzden telefonda tüm form
     alanlarını 16px'e sabitliyoruz (dokunulan an sayfa sıçramasın).
   ============================================================= */
@media (max-width: 600px) {
  input, textarea, select {
    font-size: 16px !important;
  }
}

/* =============================================================
   MOBİL NAVİGASYON — kaydırmalı panel + karartma arka planı
   Tüm sayfalarda paylaşılan header .menu/.hamburger-btn üzerine
   kurulur; bu dosya her sayfada en son yüklendiği için page-level
   900px medya sorgularını ezer.
   ============================================================= */
@media (max-width: 900px) {
  /* header.sticky-header kendi z-index'i yüzünden ayrı bir stacking
     context oluşturuyor; içindeki .menu bu yüzden karartma katmanının
     (backdrop) ALTINDA kalıp görünmez oluyordu. Header'ı backdrop'ın
     üstüne çıkarmak, içindeki menüyü de otomatik olarak üste taşır. */
  header.sticky-header { z-index: 1450; }

  .hamburger-btn { position: relative; z-index: 1600; }

  .menu {
    position: fixed !important;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(82vw, 320px);
    max-width: 320px;
    background: #ffffff;
    box-shadow: -12px 0 40px rgba(10, 30, 18, 0.22);
    padding: 96px 22px 32px !important;
    margin: 0;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
    overflow-y: auto;
    gap: 2px !important;
    -webkit-overflow-scrolling: touch;
  }
  .menu.open { transform: translateX(0); }

  .menu a {
    border-top: none !important;
    border-radius: 10px;
    padding: 15px 14px !important;
    font-size: 15px;
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .menu a:active,
  .menu a:hover { background: #f0f8f2; color: #139607; }
  .menu a.nav-active {
    background: #eaf7ee;
    color: #0f8332;
    font-weight: 800;
    box-shadow: inset 3px 0 0 #27ae60;
  }

  body.mobile-menu-open { overflow: hidden; }
  body.mobile-menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(8, 24, 14, 0.5);
    z-index: 1400;
    animation: mobileMenuBackdropIn 0.25s ease;
  }
  @keyframes mobileMenuBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu { transition: none; }
  body.mobile-menu-open::before { animation: none; }
}

/* Aktif sayfa vurgusu (masaüstü + mobil menü ortak) */
.menu a.nav-active {
  color: #0f8332;
  font-weight: 800;
  position: relative;
}
@media (min-width: 901px) {
  .menu a.nav-active::after {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: -10px;
    height: 3px;
    background: #27ae60;
    border-radius: 3px 3px 0 0;
  }
}

.footer-section {
  --footer-bg-1: #0f2e1c;
  --footer-bg-2: #1f5c34;
  --footer-accent: #3fae5c;
  --footer-accent-soft: rgba(63, 174, 92, 0.16);
  --footer-text: #eaf3ee;
  --footer-text-muted: #9fc2ac;
  --footer-border: rgba(234, 243, 238, 0.12);

  position: relative;
  background: linear-gradient(160deg, var(--footer-bg-1) 0%, var(--footer-bg-2) 100%);
  color: var(--footer-text);
  font-family: 'Lato', 'Open Sans', sans-serif;
  padding: 0;
  overflow: hidden;
}

.footer-section::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--footer-accent), #cfe8a8, var(--footer-accent));
}

.footer-top {
  padding: 26px 24px 14px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 20px;
  max-width: 1240px;
  margin: 0 auto;
}

@media (min-width: 1081px) {
  .footer-column.footer-brand {
    grid-column: span 2;
  }
}

.footer-column h3,
.footer-column h4 {
  font-family: 'Playfair Display', serif;
  color: #ffffff;
}

.footer-column.footer-brand h3 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 0 0 8px;
}

.footer-column.footer-brand h3 sup {
  font-size: 13px;
  color: var(--footer-accent);
}

.footer-column.footer-brand p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--footer-text-muted);
  max-width: 340px;
}

/* Kolon başlıkları (Hızlı Erişim, İletişim, Etkinlikler, Kurumsal) */
.footer-column > h4 {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 12px;
  position: relative;
  padding-bottom: 8px;
}

.footer-column > h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--footer-accent);
}

.footer-column p,
.footer-column span,
.footer-column li {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Hızlı erişim & kurumsal linkler */
.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-column ul a {
  color: var(--footer-text-muted);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-column ul a::before {
  content: "\f105"; /* fa-chevron-right */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 10px;
  color: var(--footer-accent);
  transition: transform 0.2s ease;
}

.footer-column ul a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.footer-column ul a:hover::before {
  transform: translateX(2px);
}

/* İletişim kolonu */
.footer-contact h4:not(:first-child) {
  margin-top: 14px;
}

.footer-contact p {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--footer-text-muted);
  margin: 4px 0;
}

.footer-contact p i {
  color: var(--footer-accent);
  width: 14px;
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-contact p a {
  color: inherit;
  text-decoration: none;
}

.footer-contact p a:hover {
  color: #ffffff;
}

/* Sosyal medya ikonları */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--footer-border);
  color: var(--footer-text);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
  background: var(--footer-accent);
  border-color: var(--footer-accent);
  color: #ffffff;
  transform: translateY(-3px);
}

/* Alt bar */
.footer-bottom {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 24px 12px;
  border-top: 1px solid var(--footer-border);
}

/* Yasal linkler (alt barda ince satır) */
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
}

.footer-legal-links a {
  font-size: 12px;
  color: var(--footer-text-muted);
  text-decoration: none;
  padding: 0 12px;
  transition: color 0.2s ease;
}

.footer-legal-links a:not(:last-child) {
  border-right: 1px solid var(--footer-border);
}

.footer-legal-links a:hover {
  color: #ffffff;
}

.footer-bottom p {
  margin: 0;
  font-size: 12px;
  color: var(--footer-text-muted);
  text-align: center;
}

.footer-top-btn {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--footer-accent-soft);
  color: var(--footer-accent);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-top-btn:hover {
  background: var(--footer-accent);
  color: #ffffff;
  transform: translateY(-50%) translateY(-2px);
}

/* === RESPONSIVE === */
@media (max-width: 1080px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 22px;
  }

  .footer-column.footer-brand {
    grid-column: 1 / -1;
  }

  .footer-column.footer-brand p {
    max-width: 520px;
  }
}

@media (max-width: 600px) {
  .footer-top {
    padding: 22px 20px 12px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Hızlı erişim linkleri mobilde 2 sütun: kolon yüksekliği yarıya iner */
  .footer-nav ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
  }

  .footer-column.footer-brand p {
    font-size: 12.5px;
    line-height: 1.5;
  }

  .footer-contact p {
    margin: 3px 0;
  }

  .footer-bottom {
    padding-top: 10px;
    gap: 5px;
  }

  .footer-top-btn {
    position: static;
    transform: none;
    margin-top: 2px;
    width: 30px;
    height: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer-social a,
  .footer-column ul a,
  .footer-top-btn {
    transition: none;
  }
}
