/* ===== BASE & RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
#navbar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #208f82;
  border-radius: 1px;
  transition: width 0.25s ease;
}

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

/* ===== HERO ===== */
#hero {
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(32, 143, 130, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(32, 143, 130, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* ===== 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, #208f82, #5ec5bc);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service-card:hover::before {
  opacity: 1;
}

/* ===== GALLERY ===== */
.gallery-item {
  cursor: pointer;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 6rem;
  line-height: 1;
  color: rgba(32, 143, 130, 0.08);
  pointer-events: none;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }

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

/* ===== BACK TO TOP ===== */
#backToTop {
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

#backToTop.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTop:not(.visible) {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

/* ===== MOBILE MENU ANIMATION ===== */
#mobileMenu {
  animation: slideDown 0.25s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* ===== FORM FOCUS STATES ===== */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(32, 143, 130, 0.15);
}

/* ===== MISC ===== */
@media (max-width: 640px) {
  html {
    scroll-padding-top: 72px;
  }
}
