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

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

body {
  overflow-x: hidden;
}

::selection {
  background: #065f46;
  color: #fefdf8;
}

/* ===== NAVBAR ===== */
.nav-link {
  position: relative;
}

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

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

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

#navbar.scrolled .nav-link {
  color: #064e3b;
}

#navbar.scrolled .nav-link::after {
  background: #059669;
}

#navbar.scrolled .logo-text {
  color: #064e3b;
}

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

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  position: relative;
}

/* Hamburger animation */
#menu-toggle.active .line-top {
  transform: translateY(5px) rotate(45deg);
}

#menu-toggle.active .line-middle {
  opacity: 0;
}

#menu-toggle.active .line-bottom {
  transform: translateY(-5px) rotate(-45deg);
}

/* ===== 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, #065f46, #10b981);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

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

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 78, 59, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

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

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(6, 78, 59, 0.1);
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 20px;
  right: 28px;
  font-family: 'Playfair Display', serif;
  font-size: 80px;
  color: #d1fae5;
  line-height: 1;
  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);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }

  .gallery-item img {
    transition: none;
  }
}

/* ===== FORM STYLES ===== */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23065f46' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}

select:focus {
  outline: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #hero h1 {
    font-size: 2.75rem;
  }

  .floating-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 1rem;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #065f46;
  border-radius: 4px;
}

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