/* =========================================
   Frontyard Cafe - Custom Styles
   ========================================= */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* ---- Base ---- */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---- Fade-in animation ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.7s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.25s; }
.fade-in-delay-3 { animation-delay: 0.4s; }
.fade-in-delay-4 { animation-delay: 0.55s; }

/* ---- Intersection observer fade ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---- Navigation ---- */
nav {
  transition: box-shadow 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ---- Mobile menu transition ---- */
#mobileMenu {
  transition: max-height 0.35s ease, opacity 0.35s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

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

/* Override hidden for mobile menu when using JS classes */
#mobileMenu.hidden {
  display: block !important;
}

/* ---- Hero ---- */
.hero-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* ---- Gallery ---- */
.gallery-item {
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 77, 57, 0.0);
  transition: background 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-item-overlay {
  background: rgba(45, 77, 57, 0.45);
}

.gallery-item-overlay svg {
  opacity: 0;
  transition: opacity 0.4s ease;
  color: white;
  width: 40px;
  height: 40px;
}

.gallery-item:hover .gallery-item-overlay svg {
  opacity: 1;
}

/* ---- Lightbox ---- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#lightbox.active {
  display: flex;
}

#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  backdrop-filter: blur(4px);
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

#lightboxPrev { left: 1.5rem; }
#lightboxNext { right: 1.5rem; }

#lightboxClose {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

#lightboxClose:hover {
  background: rgba(255, 255, 255, 0.25);
}

#lightboxCounter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}

/* ---- Cards hover ---- */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(61, 107, 79, 0.15);
}

/* ---- Star rating display ---- */
.star-filled {
  color: #f59e0b;
}

/* ---- CTA button ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #3D6B4F;
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-color: #2A4D39;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(61, 107, 79, 0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 2px solid #3D6B4F;
  color: #3D6B4F;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background-color: #3D6B4F;
  color: white;
  transform: translateY(-2px);
}

/* ---- Section divider ---- */
.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, #3D6B4F, #8FBF7C);
  border-radius: 2px;
  margin: 0 auto 1.5rem auto;
}

/* ---- Image hover shadow ---- */
.img-hover {
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.img-hover:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transform: scale(1.01);
}

/* ---- WhatsApp floating button (CSS kept per spec) ---- */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll;
  }

  #lightboxPrev { left: 0.75rem; }
  #lightboxNext { right: 0.75rem; }
}
