/* ============================================================
   Star Medica — Custom CSS
   Design System: "The Clinical Sanctuary"
   ============================================================ */

/* --- Scroll Behavior --- */
html {
  scroll-behavior: smooth;
}

/* --- Selection --- */
::selection {
  background-color: #cbead6;
  color: #001b57;
}

/* --- Breath Ingress Animation (Intersection Observer) --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* --- Glassmorphism Navbar --- */
.glass-nav {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgba(251, 249, 245, 0.9);
}

/* --- Hero Slider --- */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
}

/* --- Slider Dots --- */
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.4);
  transition: all 0.4s ease;
  cursor: pointer;
}
.slider-dot.active {
  width: 32px;
  background-color: #ffffff;
}

/* --- Mobile Menu --- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
#mobile-menu.open {
  max-height: 600px;
}

/* --- Dropdown Menu --- */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s;
}
.dropdown-parent:hover .dropdown-menu,
.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --- Material Symbols --- */
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  background: linear-gradient(
    to right,
    rgba(0, 27, 87, 0.8) 0%,
    rgba(0, 27, 87, 0.2) 100%
  );
}

/* --- FAB Pulse --- */
.fab-pulse {
  animation: fabPulse 2.5s ease-in-out infinite;
}
@keyframes fabPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(73, 100, 85, 0.4);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(73, 100, 85, 0);
  }
}

/* --- Stats Counter --- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* --- Ambient Shadow (no solid border) --- */
.ambient-shadow {
  box-shadow: 0 24px 60px -12px rgba(0, 27, 87, 0.08);
}
.ambient-shadow-hover:hover {
  box-shadow: 0 32px 80px -12px rgba(0, 27, 87, 0.14);
}

/* --- No outline on focus (replaced with ring) --- */
*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 27, 87, 0.25);
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #f5f3ef;
}
::-webkit-scrollbar-thumb {
  background: #c4c6d3;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #001b57;
}

/* --- Print --- */
@media print {
  .no-print {
    display: none !important;
  }
}

/* --- Cookie Consent Banner --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #ffffff;
  border-top: 1px solid #e0e2ef;
  box-shadow: 0 -8px 32px rgba(0, 27, 87, 0.12);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
#cookie-banner.visible {
  transform: translateY(0);
}
#cookie-banner .cookie-text {
  flex: 1;
  min-width: 260px;
  font-size: 0.85rem;
  color: #444652;
  line-height: 1.6;
}
#cookie-banner .cookie-text a {
  color: #001b57;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#cookie-banner .cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}
#cookie-btn-accept {
  padding: 0.6rem 1.4rem;
  background: #001b57;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
#cookie-btn-accept:hover {
  opacity: 0.85;
}
#cookie-btn-reject {
  padding: 0.6rem 1.2rem;
  background: transparent;
  color: #444652;
  border: 1px solid #c4c6d3;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    border-color 0.15s,
    color 0.15s;
}
#cookie-btn-reject:hover {
  border-color: #001b57;
  color: #001b57;
}

/* --- Mobile Accordion Menu --- */
.accordion-body {
  display: none !important; /* Tailwind hidden class'ını geçersiz kıl */
}
.mobile-accordion.open .accordion-body {
  display: block !important;
}
.mobile-accordion.open .accordion-icon {
  transform: rotate(180deg);
}

/* ============================================================
   MOBİL GÖRÜNÜM DÜZELTMELERİ  (max-width: 1023px)
   ============================================================ */
@media (max-width: 1023px) {
  /* --- 1. Navbar: justify-between kaldır, logo sola lang+hamburger sağa --- */
  #navbar .max-w-7xl {
    justify-content: flex-start !important;
  }
  #lang-sw-m {
    margin-left: auto;
  }

  /* --- 2. Mobil menü: tam ekran, kaydırılabilir --- */
  #mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  }
  #mobile-menu.open {
    max-height: calc(100vh - 70px) !important;
    overflow-y: auto;
  }

  /* --- 3. Menü item'ları: tümü aynı font, padding, hizalama --- */
  /* Ana linkler (Ana Sayfa, Doktorlarımız, İletişim) */
  #mobile-menu > div > a {
    font-size: 0.875rem !important; /* text-sm */
    font-weight: 500 !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  /* Accordion trigger butonları (Kurumsal, Bölümlerimiz, Hizmetler) */
  #mobile-menu .mobile-accordion > button {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  /* Aktif sayfa (Ana Sayfa bold kalabilir ama aynı boyut) */
  #mobile-menu > div > a[class*="font-bold"] {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
  }

  /* --- 4. FAB hizalama: ikisi de right:2rem, 64x64, üst üste --- */
  a[aria-label="Randevu Al"] {
    bottom: 2rem !important;
    right: 2rem !important;
    width: 64px !important;
    height: 64px !important;
  }
  #sm-chat-toggle {
    right: 2rem !important; /* randevu ile aynı */
    bottom: 7rem !important; /* 2rem(32px) + 64px + 12px boşluk ≈ 7rem */
    width: 64px !important;
    height: 64px !important;
  }
  #sm-chat-toggle .material-symbols-outlined {
    font-size: 28px;
  }
}

/* --- 5. Sosyal şerit mobil: simgeler solda, telefon sağda --- */
@media (max-width: 767px) {
  .social-topbar-inner {
    justify-content: space-between !important;
    flex-direction: row-reverse; /* telefon → sağ, ikonlar → sol */
    gap: 0.5rem !important;
  }
  /* Telefon linki sağda sabit */
  .social-phone-link {
    order: 2;
    flex-shrink: 0;
  }
  /* Sosyal ikon + divider grubu solda */
  .social-topbar-inner > a:not(.social-phone-link),
  .social-topbar-inner > div {
    order: 1;
  }
}

/* ── Sticky Social Panel ─────────────────────────────────── */
#sticky-social {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 10px 10px;
}

.sticky-social-btn {
  width: 46px;
  height: 46px;
  border-radius: 10px 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -2px 2px 10px rgba(0,0,0,0.20);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  flex-shrink: 0;
}

.sticky-social-btn:hover {
  transform: translateX(-4px);
  box-shadow: -4px 4px 16px rgba(0,0,0,0.28);
}

@media (max-width: 640px) {
  .sticky-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px 0 0 8px;
  }
  .sticky-social-btn svg {
    width: 18px;
    height: 18px;
  }
}
