/* ===== CUSTOM STYLES ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f0f3f9;
}
::-webkit-scrollbar-thumb {
  background: #b8c7e0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #8fa8cc;
}

/* ===== NAVBAR ===== */
#navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(19, 31, 48, 0.08);
}

#navbar.scrolled .nav-link {
  color: #1c2e45;
}

#navbar.scrolled .nav-link:hover {
  color: #b87f14;
}

#navbar.scrolled a[group-hover] .text-navy-900,
#navbar.scrolled .text-navy-900 {
  color: #1c2e45;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e6b43d, #d49a1e);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(19, 31, 48, 0.1);
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #e6b43d;
  transition: width 0.3s ease;
}

.mobile-link:hover::after {
  width: 100%;
}

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.revealed {
    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; }
}

/* ===== HERO ANIMATIONS ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.floating-card {
  animation: float 4s ease-in-out infinite;
}

/* ===== BUTTON HOVER EFFECTS ===== */
a[href="#contact"],
button[type="submit"] {
  position: relative;
  overflow: hidden;
}

a[href="#contact"]::after,
button[type="submit"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

a[href="#contact"]:hover::after,
button[type="submit"]:hover::after {
  opacity: 1;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .font-serif {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}

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

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #e6b43d;
  outline-offset: 2px;
  border-radius: 4px;
}
