/* ===========================================================
   Poliklinika Dona — Custom Styles Layered on top of Tailwind
   =========================================================== */

/* ---------- Baza & Scroll ---------- */
html {
  scroll-behavior: smooth;
  /* Parandalon që menuja ngjitëse (header) të mbulojë titujt e seksioneve kur klikohen linket */
  scroll-padding-top: 5rem; 
}

::selection {
  background: #5BAE4B;
  color: #fff;
}

/* Fikje e scroll-it të butë për pajisjet që s'e përballojnë dot animacionin */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---------- Header shrink-on-scroll ---------- */
#site-header.scrolled {
  box-shadow: 0 4px 20px rgba(18, 63, 41, 0.08);
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; 
  bottom: -6px;
  width: 0%; 
  height: 2px;
  background: #5BAE4B;
  transition: width 0.3s ease;
}
.nav-link:hover::after {
  width: 100%;
}

/* ---------- Scroll reveal (Hyrja e elementeve) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fikje e reveal-it për performancë në pajisjet që kërkojnë reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transition: none !important;
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- CTA pulse (Butoni Kryesor) ---------- */
.btn-pulse {
  position: relative;
}
.btn-pulse::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #5BAE4B;
  opacity: 0.55;
  z-index: -1;
  animation: pulse-ring 2.6s cubic-bezier(.4,0,.6,1) infinite;
}

@keyframes pulse-ring {
  0%   { transform: scale(1);    opacity: 0.45; }
  70%  { transform: scale(1.12); opacity: 0; }
  100% { transform: scale(1.12); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-pulse::before { 
    animation: none; 
    display: none; 
  }
}

/* ---------- Service card lift ---------- */
.service-card {
  will-change: transform;
}
.service-card:hover {
  transform: translateY(-6px);
}

/* ---------- Doctor placeholder box ---------- */
.doctor-placeholder {
  background: repeating-linear-gradient(
    135deg,
    #ffffff,
    #ffffff 10px,
    #FAFBFA 10px,
    #FAFBFA 20px
  );
  border: 2px dashed #D7E3D9;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.doctor-card:hover .doctor-placeholder {
  border-color: #5BAE4B;
}

/* ---------- Form inputs ---------- */
.form-input {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.5);
  color: #fff;
}
.whatsapp-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.5;
  z-index: -1;
  animation: pulse-ring 2.4s cubic-bezier(.4,0,.6,1) infinite;
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::after { 
    animation: none; 
  }
}

/* Përshtatja e butonit WhatsApp për ekrane të vogla (Mobile) */
@media (max-width: 640px) {
  .whatsapp-float {
    right: 16px;
    bottom: 16px;
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

/* ---------- Mobile menu ---------- */
/* Animacion i butë për hapjen e menysë në telefon */
#mobile-menu {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  /* Hiqet display: flex i detyrueshëm këtu sepse menaxhohet nga klasat Tailwind */
}

#mobile-menu.hidden {
  display: none !important; 
}

/* Magjia logjike: Kur menyja NUK është 'hidden' nga JS, atëherë aplikohet animacioni i dukshmërisë */
#mobile-menu:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
