/* ============================================
   Premium Enhancements - Motion & Polish
   Based on Bradley Davies & Dr. Lucia reference sites
   ============================================ */

/* --- Animated Credentials Ticker --- */
.credentials-bar__logos {
  display: flex;
  gap: 4rem;
  animation: scroll-logos 30s linear infinite;
  will-change: transform;
}

@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Seamless loop: duplication is done in HTML (second set of imgs inside same div) */

/* Gradient fade on edges */
.credentials-bar {
  position: relative;
  overflow: hidden;
}

.credentials-bar::before,
.credentials-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.credentials-bar::before {
  left: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}

.credentials-bar::after {
  right: 0;
  background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

/* Pause animation on hover */
.credentials-bar:hover .credentials-bar__logos {
  animation-play-state: paused;
}

/* --- Scroll-Triggered Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.5, 0, 0, 1),
              transform 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered reveal for card grids */
.card-grid .card:nth-child(1) { transition-delay: 0.1s; }
.card-grid .card:nth-child(2) { transition-delay: 0.2s; }
.card-grid .card:nth-child(3) { transition-delay: 0.3s; }

/* --- Enhanced Card Hover Effects --- */
.card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* --- Professional Icon Styling --- */
.icon-professional {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: var(--radius-md);
  color: white;
  font-size: 24px;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.icon-professional svg {
  width: 24px !important;
  height: 24px !important;
  fill: currentColor;
}

.icon-professional img {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  object-fit: contain;
}

.card:hover .icon-professional {
  transform: scale(1.1) rotate(5deg);
}

/* --- Button Enhancements --- */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: scale(0.98);
}

/* --- Smooth Page Transitions --- */
.page-transition {
  animation: fadeInUp 0.6s cubic-bezier(0.5, 0, 0, 1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Image Cutout Enhancement --- */
.hero__image-wrapper img,
.about-photo img {
  filter: drop-shadow(0 20px 40px rgba(27, 42, 74, 0.15));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero__image-wrapper:hover img {
  transform: scale(1.02);
}

/* --- Logo Styling --- */
.credentials-bar__item,
.credentials-bar__logos img {
  height: 40px;
  width: auto;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.credentials-bar__item:hover,
.credentials-bar__logos img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* --- Performance Optimizations --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
