/* ========== Custom Styles for RefurbVision ========== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

/* ========== Before/After Slider Overrides ========== */
img-comparison-slider {
  --divider-width: 3px;
  --divider-color: #C5A572;
  --handle-opacity: 1;
  --handle-opacity-active: 1;
  outline: none;
}

img-comparison-slider [slot="first"],
img-comparison-slider [slot="second"] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

img-comparison-slider::part(handle) {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #C5A572;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========== Fade-in Animation ========== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in:nth-child(2) { transition-delay: 0.1s; }
.fade-in:nth-child(3) { transition-delay: 0.2s; }
.fade-in:nth-child(4) { transition-delay: 0.3s; }

/* ========== Hero Staggered Reveal ========== */
.hero-stagger {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-stagger-1 { animation-delay: 0.2s; }
.hero-stagger-2 { animation-delay: 0.5s; }
.hero-stagger-3 { animation-delay: 0.8s; }
.hero-stagger-4 { animation-delay: 1.1s; }

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== FAQ Accordion ========== */
.faq-item {
  background: #fff;
  transition: box-shadow 0.2s ease;
}

.faq-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.faq-chevron {
  transition: transform 0.2s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-content {
  max-height: 300px;
}

/* ========== Nav Transparent → Solid on Scroll ========== */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #E8E8E4;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-brand {
  color: #1B2A4A;
}

#navbar.scrolled .nav-link {
  color: rgba(45, 45, 45, 0.7);
}

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

#navbar.scrolled .nav-menu-btn {
  color: #1B2A4A;
}

#navbar.scrolled .nav-logo-box {
  background: #1B2A4A;
}

/* ========== Form Focus States ========== */
input:focus,
textarea:focus {
  border-color: #0D7377;
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.1);
}

/* ========== Video Play Button Overlay ========== */
video::-webkit-media-controls-panel {
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.4));
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 768px) {
  .hero-slider {
    aspect-ratio: 4 / 3;
  }
}

/* ========== Selection Color ========== */
::selection {
  background: rgba(197, 165, 114, 0.3);
  color: #1B2A4A;
}
