/* ============================================================
   D'era House — animations.css
   ============================================================ */

/* ── PAGE TRANSITION ── */
body.page-enter {
  opacity: 0;
  transform: translateY(10px);
}
body.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
body.page-exit {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

/* ── NAVBAR SCROLL STATE ── */
.nav-container {
  transition: padding 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}
.nav-container.nav-scrolled {
  padding-top: 0.7rem !important;
  padding-bottom: 0.7rem !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

/* ── SCROLL REVEAL ── */
.reveal-ready {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-ready.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Slide-in from left for about sections */
.about-page section.reveal-ready {
  transform: translateX(-24px);
}
.about-page section.reveal-ready.revealed {
  transform: translateX(0);
}

/* ── HERO ENHANCEMENTS ── */
.hero {
  will-change: background-position-y;
}

.hero-text {
  animation: heroFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-text h1 {
  animation: heroFadeUp 0.9s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-text p {
  animation: heroFadeUp 0.9s 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── SPECIAL CARDS ── */
.special-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.special-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
}
.special-card img {
  transition: transform 0.5s ease;
}
.special-card:hover img {
  transform: scale(1.06);
}

/* ── REVIEW CARDS ── */
.review-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

/* ── NAV LINK ANIMATION ── */
.nav-link-anim {
  position: relative;
}
.nav-link-anim::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #355E3B;
  transition: width 0.28s ease;
  border-radius: 2px;
}
.nav-link-anim:hover::after {
  width: 100%;
}

/* ── LOGO HOVER ── */
.nav-container .logo {
  transition: letter-spacing 0.3s ease, opacity 0.2s ease;
}
.nav-container .logo:hover {
  letter-spacing: 2px;
  opacity: 0.85;
}

/* ── CTA BUTTON PULSE (Order Now) ── */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(53, 94, 59, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(53, 94, 59, 0); }
}
.cta {
  animation: ctaPulse 2.4s ease-in-out infinite;
}
/* Disable pulse on mobile fixed bar */
@media (max-width: 768px) {
  .cta { animation: none; }
}

/* ── FOOTER SECTIONS ── */
.footer-section {
  transition: transform 0.25s ease;
}
.footer-section:hover {
  transform: translateY(-3px);
}

/* ── WHATSAPP FLOAT ── */
.whatsapp-float {
  animation: waBounce 2.8s ease-in-out infinite;
}
@keyframes waBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.whatsapp-float:hover {
  animation: none;
  transform: scale(1.1) translateY(-3px) !important;
}

/* ── CONTACT FORM INPUTS ── */
input:focus, textarea:focus {
  outline: none;
  border-color: #355E3B !important;
  box-shadow: 0 0 0 3px rgba(53, 94, 59, 0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── LOCATION BOX ── */
.location-box {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.location-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

/* ── REVIEWS CTA BUTTON ── */
.reviews-cta {
  position: relative;
  overflow: hidden;
}
.reviews-cta::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.5s ease;
}
.reviews-cta:hover::before {
  left: 100%;
}

/* ── MOBILE DRAWER: smooth slide-in already handled; add spring feel ── */
.mobile-drawer {
  transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* ── REDUCED MOTION: respect user preference ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-ready {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   LOADING SCREEN
   ============================================================ */
#dera-loader {
  position: fixed;
  inset: 0;
  background: #355E3B;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
#dera-loader.loader-hidden { opacity: 0; pointer-events: none; }

.loader-inner { text-align: center; }
.loader-icon { font-size: 3.5rem; animation: loaderBounce 0.8s ease-in-out infinite alternate; }
.loader-brand { font-family: 'Playfair Display', serif; font-size: 2rem; color: #fff; letter-spacing: 4px; margin: 0.5rem 0; }
.loader-dots { display: flex; gap: 8px; justify-content: center; margin-top: 1rem; }
.loader-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.6); animation: dotPulse 1.2s ease-in-out infinite; }
.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderBounce { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@keyframes dotPulse { 0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1); } }

/* ============================================================
   DARK MODE TOGGLE BUTTON
   ============================================================ */
#dark-mode-toggle {
  position: fixed;
  bottom: 90px;
  left: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #355E3B;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 9995;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#dark-mode-toggle:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
@media (max-width: 768px) { #dark-mode-toggle { bottom: 100px; left: 16px; } }

/* ============================================================
   DARK MODE STYLES
   ============================================================ */
[data-theme="dark"] body { background-color: #1a2e1d !important; color: #e8f5e9; }
[data-theme="dark"] .nav-container { background-color: #1a2e1d !important; border-bottom-color: #2d4a30; }
[data-theme="dark"] .nav-container .logo { color: #a8d5b5 !important; }
[data-theme="dark"] .nav-container nav ul li a { color: #a8d5b5 !important; }
[data-theme="dark"] .nav-link-anim::after { background-color: #a8d5b5 !important; }
[data-theme="dark"] .specials { background-color: #1e3520 !important; }
[data-theme="dark"] .specials h2 { color: #a8d5b5 !important; }
[data-theme="dark"] .special-card { background-color: #243d27 !important; color: #e8f5e9; }
[data-theme="dark"] .special-card h3 { color: #e8f5e9 !important; }
[data-theme="dark"] .reviews-section { background: linear-gradient(180deg, #1e3520 0%, #1a2e1d 100%) !important; }
[data-theme="dark"] .reviews-title { color: #e8f5e9 !important; }
[data-theme="dark"] .reviews-subtitle { color: #a8d5b5 !important; }
[data-theme="dark"] .review-card { background: #243d27 !important; border-color: rgba(255,255,255,0.08) !important; }
[data-theme="dark"] .review-text { color: #d0e8d4 !important; }
[data-theme="dark"] .review-name { color: #e8f5e9 !important; }
[data-theme="dark"] .about-page section { background-color: #243d27 !important; }
[data-theme="dark"] .about-page section h2 { color: #a8d5b5 !important; }
[data-theme="dark"] .about-page section p { color: #d0e8d4 !important; }
[data-theme="dark"] .location-box,
[data-theme="dark"] .contact-info-box,
[data-theme="dark"] .contact-form-box { background-color: #243d27 !important; }
[data-theme="dark"] .location-box h2,
[data-theme="dark"] .contact-info-box h2,
[data-theme="dark"] .contact-form-box h2 { color: #a8d5b5 !important; }
[data-theme="dark"] .loc-detail h4,
[data-theme="dark"] .c-item h4 { color: #a8d5b5 !important; }
[data-theme="dark"] .loc-detail a,
[data-theme="dark"] .loc-detail p,
[data-theme="dark"] .c-item a,
[data-theme="dark"] .c-item p { color: #d0e8d4 !important; }
[data-theme="dark"] .contact-form-box input,
[data-theme="dark"] .contact-form-box textarea { background: #1a2e1d !important; border-color: #355E3B !important; color: #e8f5e9 !important; }
[data-theme="dark"] .menu-card { background-color: #243d27 !important; }
[data-theme="dark"] .menu-card-body h3 { color: #e8f5e9 !important; }
[data-theme="dark"] .menu-card-body p { color: #a8d5b5 !important; }
[data-theme="dark"] .gallery-item { background: #243d27 !important; }
[data-theme="dark"] .site-footer { background-color: #111d12 !important; }

/* ============================================================
   NAVBAR ACTIVE STATE
   ============================================================ */
.nav-link-anim.nav-active {
  color: #244a2c !important;
  font-weight: 700;
}
.nav-link-anim.nav-active::after {
  width: 100% !important;
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-page { background: #355E3B; padding: 3rem 1.5rem 4rem; }
.gallery-page h1 { font-family: 'Playfair Display', serif; color: #fff; text-align: center; font-size: 2.4rem; padding-top: 0; margin-bottom: 0.5rem; }
.gallery-subtitle { text-align: center; color: rgba(255,255,255,0.8); margin-bottom: 2.5rem; font-size: 1.05rem; }

.gallery-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 2rem; }
.filter-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  font-size: 0.9rem;
}
.filter-btn:hover, .filter-btn.active { background: #fff; color: #355E3B; transform: translateY(-1px); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(0,0,0,0.2); }
.gallery-item img { width: 100%; height: 240px; object-fit: cover; display: block; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-caption {
  padding: 0.8rem 1rem;
  font-family: 'Open Sans', sans-serif;
  font-weight: 600;
  color: #355E3B;
  font-size: 0.95rem;
}
[data-theme="dark"] .gallery-caption { color: #a8d5b5; }

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 99998;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#lightbox.active { display: flex; }
#lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; object-fit: contain; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
#lightbox-close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; line-height: 1; }
#lightbox-close:hover { opacity: 0.7; }

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .gallery-item img { height: 160px; }
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 90px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #355E3B;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 9994;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top.btt-visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: #2a4a30; transform: translateY(-3px) !important; }
@media (max-width: 768px) { #back-to-top { bottom: 100px; right: 16px; width: 42px; height: 42px; } }



/* ============================================================
   CONFETTI
   ============================================================ */
.confetti-piece {
  position: fixed;
  top: -20px;
  z-index: 99999;
  pointer-events: none;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { top: -20px; opacity: 1; transform: rotate(0deg) translateX(0); }
  100% { top: 110vh; opacity: 0; transform: rotate(720deg) translateX(40px); }
}

/* ============================================================
   PRELOAD FONT PERFORMANCE
   ============================================================ */
@font-face {
  font-display: swap;
}

/* ============================================================
   GOOGLE RATING SCHEMA BADGE (visual only)
   ============================================================ */
.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.88rem;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-decoration: none;
  transition: box-shadow 0.2s;
}
.rating-badge:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.14); }
.rating-badge .stars { color: #f5b301; letter-spacing: 1px; }
