/* ==================== Base Styles ==================== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  line-height: 1.8;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==================== Navbar ==================== */
#navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Nav link hover underline */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #C9A87C;
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hamburger animation */
#menu-toggle.open .hamburger-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#menu-toggle.open .hamburger-line:nth-child(2) {
  opacity: 0;
}

#menu-toggle.open .hamburger-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* ==================== CTA Buttons ==================== */
.cta-btn {
  position: relative;
  overflow: hidden;
}

.cta-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.cta-btn:hover::before {
  left: 100%;
}

/* ==================== Mobile Sticky CTA ==================== */
.mobile-sticky-cta {
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  padding: 0.75rem;
}

@supports (width: 100dvw) {
  .mobile-sticky-cta {
    max-width: 100dvw;
  }
}

.mobile-sticky-cta__inner {
  width: min(100%, 34rem);
  margin: 0 auto;
  max-inline-size: 100%;
}

.mobile-sticky-cta__btn {
  box-sizing: border-box;
  max-width: 100%;
  max-inline-size: 100%;
}

@supports (padding: max(0px)) {
  .mobile-sticky-cta {
    padding-top: 0.75rem;
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
    padding-left: max(0.75rem, env(safe-area-inset-left));
  }
}

/* ==================== Hero Section ==================== */
#hero .hero-title span {
  background: linear-gradient(135deg, #C9A87C 0%, #D4A574 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==================== Pain Point Cards ==================== */
.pain-card {
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.pain-card:hover {
  border-color: rgba(201, 168, 124, 0.2);
}

/* ==================== Feature Cards ==================== */
.feature-card {
  border: 1px solid transparent;
}

.feature-card:hover {
  border-color: rgba(201, 168, 124, 0.15);
}

/* ==================== Cases Swiper ==================== */
.cases-swiper {
  padding-bottom: 20px;
}

.cases-swiper .swiper-slide {
  height: auto;
}

.swiper-pagination-custom {
  display: flex;
  gap: 6px;
  align-items: center;
}

.swiper-pagination-custom .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #d4d4d4;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.swiper-pagination-custom .swiper-pagination-bullet-active {
  background: #C9A87C;
  width: 24px;
  border-radius: 4px;
}

/* ==================== FAQ Accordion ==================== */
.faq-item {
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(201, 168, 124, 0.3);
}

.faq-item.active {
  border-color: rgba(201, 168, 124, 0.4);
  box-shadow: 0 4px 20px rgba(201, 168, 124, 0.1);
}

.faq-item.active .faq-toggle i {
  transform: rotate(180deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, opacity 0.2s ease;
  opacity: 0;
}

.faq-item.active .faq-content {
  max-height: 500px;
  opacity: 1;
}

/* ==================== Price Number Animation ==================== */
.price-number {
  font-variant-numeric: tabular-nums;
}

/* ==================== Form Styles ==================== */
#booking-form {
  scroll-margin-top: 96px;
}

@media (max-width: 1023px) {
  #booking-form {
    scroll-margin-top: 76px;
  }
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(201, 168, 124, 0.15);
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
  border-color: #f87171;
}

.form-group.error input:focus,
.form-group.error select:focus {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.15);
}

/* Shake animation for form errors */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.form-shake {
  animation: shake 0.3s ease;
}

/* ==================== Back to Top ==================== */
#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ==================== Scroll Animations (custom) ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== Responsive Adjustments ==================== */
@media (max-width: 1023px) {
  #back-to-top {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 64px;
  }

  /* Ensure touch targets are at least 44x44 */
  .nav-link,
  .mobile-nav-link,
  button,
  a,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  /* Process mobile adjustments */
  .process-mobile-item:last-child .w-0\.5 {
    display: none;
  }

  #hero {
    min-height: auto;
  }

  #hero .hero-title {
    font-size: 1.9rem;
    line-height: 1.3;
  }

  #pricing .price-number {
    font-size: clamp(2.75rem, 17vw, 3.75rem);
    line-height: 1.05;
  }

  .swiper-button-prev-custom,
  .swiper-button-next-custom {
    display: none !important;
  }
}

/* ==================== Custom Scrollbar ==================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #FAFAF8;
}

::-webkit-scrollbar-thumb {
  background: #C9A87C;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #B8956A;
}

/* ==================== Loading Skeleton ==================== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
