/* ==========================================================================
   Qasem Dentistry — Premium Animations & Micro-interactions
   Smooth fade-ins, elegant hover effects, and refined transitions.
   ========================================================================== */

/* ---- Respect user motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Smooth scrolling ---- */
html {
  scroll-behavior: smooth;
}

/* ---- Fade-in animation for sections ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Hero image fade-in ---- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---- Sections fade-in on scroll ---- */
.section {
  opacity: 0;
}

.section.is-visible {
  animation: fadeInUp 700ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ---- Hero image fade-in on load ---- */
.img-placeholder {
  animation: fadeIn 800ms ease-out forwards;
}

.img-placeholder img {
  display: block;
}

/* ---- Review cards hover effect ---- */
.review-card {
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, box-shadow;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ---- Expertise items hover effect ---- */
.expertise-item {
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, box-shadow;
}

.expertise-item:hover {
  transform: translateY(-4px);
}

/* ---- FAQ items hover effect ---- */
.faq__item {
  transition: all 200ms ease;
}

.faq__question {
  transition: color 200ms ease;
}

.faq__question:hover {
  color: var(--accent-green);
}

/* ---- FAQ accordion smooth height animation ---- */
.faq__answer {
  transition: max-height 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Chevron rotation animation ---- */
.faq__icon {
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Button hover effects ---- */
.btn {
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, box-shadow, background-color;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.btn:active {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* ---- Button outline variant hover ---- */
.btn--outline {
  transition: all 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* ---- Language switcher hover ---- */
.lang-switcher a {
  transition: opacity 200ms ease;
}

.lang-switcher a:hover {
  opacity: 0.7;
}

/* ---- Sticky bar slide animation ---- */
@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.sticky-bar[data-visible="true"] {
  animation: slideUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.sticky-bar:not([data-visible="true"]) {
  animation: slideDown 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ---- Sticky bar link hover ---- */
.sticky-bar__link {
  transition: all 200ms ease;
}

.sticky-bar__link:hover {
  opacity: 0.8;
}

/* ---- Focus states for accessibility ---- */
.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
  border-radius: 2px;
}

.faq__question:focus-visible {
  outline: 2px solid var(--accent-green);
  outline-offset: 2px;
}

/* ---- Modal fade-in ---- */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  animation: modalFadeIn 300ms ease-out forwards;
}

/* ---- Input focus animation ---- */
input:focus,
textarea:focus {
  transition: box-shadow 200ms ease;
}

/* ---- Link hover effect ---- */
a {
  transition: color 200ms ease;
}

a:hover {
  color: var(--accent-green);
}

/* ---- Prevent animations on print ---- */
@media print {
  *,
  *::before,
  *::after {
    animation-duration: 0 !important;
    transition-duration: 0 !important;
  }
}
