/* =========================================================
   Rain Cafe — Custom Stylesheet
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------------------------
   2. Smooth Scroll Enhancement
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Offset for fixed nav when jumping to anchor links */
[id] {
  scroll-margin-top: 120px;
}

/* ----------------------------------------------------------
   3. Mobile Menu Transition
   ---------------------------------------------------------- */
#mobileMenu {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

#mobileMenu.is-open {
  max-height: 300px;
  opacity: 1;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Override Tailwind hidden so transition works */
#mobileMenu.hidden {
  display: block !important;
}

/* ----------------------------------------------------------
   4. Rain Drop Animation
   ---------------------------------------------------------- */

/* Container that holds animated rain drops */
.rain-drops-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Individual rain drop element */
.rain-drop {
  position: absolute;
  top: -20px;
  width: 2px;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.6) 100%
  );
  animation: raindrop-fall linear infinite;
  opacity: 0;
}

@keyframes raindrop-fall {
  0% {
    transform: translateY(0) scaleY(1);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(110vh) scaleY(1.2);
    opacity: 0;
  }
}

/* Ripple effect at the bottom of a raindrop */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Static decorative rain drop shapes (CSS-only, no JS) */
.rain-drops {
  position: relative;
  overflow: hidden;
}

.rain-drops::before,
.rain-drops::after {
  content: '';
  position: absolute;
  top: -10%;
  width: 2px;
  height: 80px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(123, 191, 212, 0.5) 100%
  );
  border-radius: 0 0 50% 50%;
  animation: raindrop-fall 2s linear infinite;
}

.rain-drops::before {
  left: 25%;
  animation-delay: 0s;
  animation-duration: 1.8s;
}

.rain-drops::after {
  left: 70%;
  animation-delay: 0.9s;
  animation-duration: 2.2s;
}

/* ----------------------------------------------------------
   5. Gallery & Lightbox Styles
      (kept for completeness — no gallery page currently active)
   ---------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background-color: #EBF5FA;
  aspect-ratio: 4 / 3;
}

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

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 95, 125, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Lightbox backdrop */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #7BBFD4;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  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;
  backdrop-filter: blur(4px);
}

.lightbox-nav:hover {
  background: rgba(123, 191, 212, 0.3);
}

.lightbox-prev {
  left: -56px;
}

.lightbox-next {
  right: -56px;
}

/* ----------------------------------------------------------
   6. Card & UI Utilities
   ---------------------------------------------------------- */

/* Removes scrollbar from overflow-x containers */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Subtle focus ring that matches brand */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #4A7C9E;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ----------------------------------------------------------
   7. Hero Wave Divider (used on hero sections)
   ---------------------------------------------------------- */
.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  overflow: hidden;
  line-height: 0;
}

.hero-wave svg {
  display: block;
  width: 100%;
}

/* ----------------------------------------------------------
   8. Star Rating Display
   ---------------------------------------------------------- */
.star-rating {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.star-rating .star-filled {
  color: #FBBF24;
  fill: #FBBF24;
}

.star-rating .star-half {
  color: #FBBF24;
  fill: #FBBF24;
}

.star-rating .star-empty {
  color: #D1D5DB;
}

/* ----------------------------------------------------------
   9. Utility Animations
   ---------------------------------------------------------- */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-up 0.6s ease forwards;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* ----------------------------------------------------------
   10. Print Styles
   ---------------------------------------------------------- */
@media print {
  nav,
  footer,
  .rain-drops-container,
  #mobileMenu {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
