/* ===== Base & Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

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

#navbar.scrolled {
  background: rgba(254, 252, 247, 0.97);
  backdrop-blur-lg;
  box-shadow: 0 1px 20px rgba(26, 39, 68, 0.08);
}

.nav-link {
  position: relative;
}

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

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

/* ===== Mobile Menu ===== */
#mobileMenu {
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  opacity: 0;
}

#mobileMenu.open {
  max-height: 500px;
  opacity: 1;
}

.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
  width: 20px;
}

.mobile-link {
  position: relative;
  padding-left: 0;
  border-left: 2px solid transparent;
  transition: border-color 0.3s ease, padding-left 0.3s ease;
}

.mobile-link:hover {
  border-left-color: #c9a84c;
  padding-left: 12px;
}

/* ===== Hero Animations ===== */
.hero-anim {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }

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

/* ===== Scroll Reveal ===== */
@media (prefers-reduced-motion: no-preference) {
  .scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
}

/* ===== Service Cards ===== */
.service-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* ===== Gallery ===== */
.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== Buttons ===== */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

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

/* ===== Form ===== */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236683b8' 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 1rem center;
  appearance: none;
}

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

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

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

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

/* ===== Selection ===== */
::selection {
  background: rgba(201, 168, 76, 0.2);
  color: #1a2744;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  html {
    scroll-padding-top: 70px;
  }

  .font-serif {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
  }
}
