/* ───────────────────────────────────────────────────
   Hover & micro-interaction animations
   Targets the floating action bar and CTA buttons
   without touching the React bundle.
   ─────────────────────────────────────────────────── */

/* ── Floating bottom-bar buttons (WhatsApp, Floor Plans) ── */
.fixed.bottom-0 .flex-1 {
  position: relative;
  overflow: hidden;
  transition:
    background-color 0.3s ease,
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease;
}

.fixed.bottom-0 .flex-1:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(191, 166, 109, 0.18);
  background-color: rgba(191, 166, 109, 0.08) !important;
}

.fixed.bottom-0 .flex-1:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 8px rgba(191, 166, 109, 0.1);
}

/* Shimmer sweep on hover */
.fixed.bottom-0 .flex-1::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(191, 166, 109, 0.12) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: none;
  pointer-events: none;
}

.fixed.bottom-0 .flex-1:hover::after {
  transform: translateX(100%);
  transition: transform 0.6s ease;
}

/* Icon glow on hover */
.fixed.bottom-0 .flex-1:hover svg,
.fixed.bottom-0 .flex-1:hover .text-\[var\(--gold\)\] {
  filter: drop-shadow(0 0 6px rgba(191, 166, 109, 0.5));
  transition: filter 0.3s ease;
}

/* ── All kg-btn CTA buttons (Explore Master Plan, etc.) ── */
.kg-btn {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    letter-spacing 0.3s ease;
}

.kg-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 8px 25px rgba(28, 26, 23, 0.15),
    0 0 0 1px rgba(191, 166, 109, 0.2);
  letter-spacing: 0.18em;
}

.kg-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(28, 26, 23, 0.1);
}

/* Shimmer sweep on CTA buttons */
.kg-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  pointer-events: none;
}

.kg-btn:hover::after {
  transform: translateX(100%);
  transition: transform 0.5s ease;
}

/* ── Floating banner (Unlock floor plans) pulse ─────── */
.fixed.bottom-\[calc\(5rem\+env\(safe-area-inset-bottom\)\)\] {
  animation: kg-pulse 2.5s ease-in-out infinite;
}

@keyframes kg-pulse {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(-3px); opacity: 0.85; }
}

/* ── Section reveal children micro-animation ────────── */
.reveal-child {
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.2s ease;
}

.reveal-child:hover {
  transform: translateX(3px);
}

/* ── Glass card styling with gradient backdrop blur (Outwards to Inwards) ── */
.kg-card {
  position: relative !important;
  z-index: 1 !important;
  overflow: hidden !important;
  background: rgba(185, 185, 185, 0.65) !important; /* Thick grey glassy background tint */
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 12px !important;
  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.08),
    inset 0 1.5px 2px rgba(255, 255, 255, 0.7) !important; /* Thick top white reflection highlight */
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important,
    box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important,
    border-color 0.3s ease !important;
}

/* Pseudo-element applying the radial gradient backdrop blur */
.kg-card::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: -1 !important;
  pointer-events: none !important;
  background: transparent !important;
  backdrop-filter: blur(40px) !important; /* Thicker backdrop blur */
  -webkit-backdrop-filter: blur(40px) !important;
  /* Higher blur at outer borders, lesser/clear at the center */
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 1) 90%) !important;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0) 10%, rgba(0, 0, 0, 1) 90%) !important;
}

/* Top highlighted gold/white accent border */
.kg-card::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 8% !important;
  right: 8% !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, rgba(191, 166, 109, 0.5), transparent) !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

.kg-card:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(191, 166, 109, 0.6) !important;
  box-shadow:
    0 25px 50px rgba(28, 26, 23, 0.08),
    0 0 0 1px rgba(191, 166, 109, 0.15) !important;
}

/* ── Arrow bounce on button hover ───────────────────── */
.group:hover .group-hover\:translate-x-1 {
  animation: kg-arrow-bounce 0.6s ease infinite;
}

@keyframes kg-arrow-bounce {
  0%, 100% { transform: translateX(4px); }
  50% { transform: translateX(8px); }
}

/* ── Hero Section 1:3 and 2:3 Layout Overrides ──────────────── */
@media (min-width: 1024px) {
  /* Set parent section full-width and layout flex stretch */
  .relative.w-full.min-h-screen {
    position: relative !important;
    overflow: hidden !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: stretch !important;
  }

  /* Expand max-width wrapper to full screen and stretch */
  .relative.w-full.min-h-screen > .max-w-\[1400px\] {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: stretch !important;
  }

  /* Grid layout: Left column takes exactly 1 part (1/3), right takes 2 parts (2/3) */
  .relative.min-h-screen .grid.lg\:grid-cols-2 {
    grid-template-columns: 1fr 2fr !important;
    gap: 0 !important; /* No gap so it matches edge to edge */
    width: 100% !important;
    min-height: 100vh !important;
    align-items: stretch !important;
    position: relative !important;
    z-index: 10 !important;
  }
  
  /* Left column text container: Centered flex container occupying exactly 1/3 of the width */
  .relative.min-h-screen .flex.flex-col.items-center.text-center {
    grid-column: 1 / span 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important; /* Centered horizontally */
    text-align: center !important; /* Centered text */
    padding-left: 40px !important; /* Equal side padding to keep it centered */
    padding-right: 40px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    gap: 2rem !important; /* More breathing room */
  }
  
  /* Fix line wraps to prevent text overflow */
  .relative.min-h-screen .hero-line {
    white-space: normal !important;
    display: block !important;
  }
  
  /* Scale header font size to fill the space nicely */
  .relative.min-h-screen .kg-phrase-heading {
    font-size: clamp(28px, 2.5vw, 44px) !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    white-space: normal !important;
  }
  
  .relative.min-h-screen .hero-logo-big {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 290px !important; /* Scaled up logo to fill the space */
  }
  
  .relative.min-h-screen .hero-logo-big img {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .relative.min-h-screen .hero-cta {
    align-items: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Right column (hero-image) occupies exactly 2/3 of viewport edge to edge */
  .hero-image {
    display: block !important;
    position: relative !important;
    grid-column: 2 / span 1 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: hidden !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .hero-image picture,
  .hero-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
  }
}

/* Mobile responsive fixes */
@media (max-width: 1023px) {
  .hero-image {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin-top: 2rem !important;
  }
}

/* Hide desktop gallery track by default on desktop until explore cover is clicked */
@media (min-width: 1024px) {
  .gallery-desktop-track {
    display: none !important;
  }
  
  .gallery-desktop-track.kg-active {
    display: flex !important;
  }
}

/* ── Gallery Desktop Click-to-Explore Cover ────────── */
#gallery-desktop-cover {
  width: 100%;
  height: 60vh;
  margin-top: 30px;
  border-radius: 16px;
  border: 1px solid rgba(191, 166, 109, 0.3);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}

#gallery-desktop-cover:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(191, 166, 109, 0.16);
  border-color: rgba(191, 166, 109, 0.5);
}

#gallery-desktop-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#gallery-desktop-cover:hover img {
  transform: scale(1.03);
}

#gallery-desktop-cover .cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 26, 23, 0.85) 0%, rgba(28, 26, 23, 0.45) 50%, rgba(28, 26, 23, 0.6) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  transition: background 0.4s ease;
}

#gallery-desktop-cover:hover .cover-overlay {
  background: linear-gradient(to top, rgba(28, 26, 23, 0.9) 0%, rgba(28, 26, 23, 0.5) 50%, rgba(28, 26, 23, 0.65) 100%);
}

#gallery-desktop-cover h3 {
  font-family: 'Fraunces', serif;
  font-size: 2.75rem;
  font-weight: 400;
  color: #fff;
  margin: 0 0 10px;
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6);
  letter-spacing: -0.01em;
}

#gallery-desktop-cover p {
  font-family: 'Quicksand', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 24px;
}

#gallery-desktop-cover .cover-btn {
  background: #1C1A17;
  color: #fff;
  border: 1px solid rgba(191, 166, 109, 0.4);
  border-radius: 8px;
  padding: 14px 28px;
  font-family: 'Quicksand', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

#gallery-desktop-cover:hover .cover-btn {
  background: rgba(191, 166, 109, 0.1);
  color: #E5C469;
  border-color: #E5C469;
  transform: scale(1.04);
  box-shadow: 0 8px 25px rgba(191, 166, 109, 0.3);
}

/* ── Scale/Highlights Section (02 — THE SCALE) Spacing Refinement ── */
@media (min-width: 1024px) {
  /* 1. Grid alignment and gap */
  #highlights .grid.lg\:grid-cols-12 {
    gap: 36px !important;
    align-items: center !important;
  }

  /* 2. Left Stats Column: Right-aligned, stats closer together */
  #highlights .grid.lg\:grid-cols-12 > div:nth-child(1) {
    text-align: right !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 28px !important; /* Closer vertical stats spacing */
  }

  /* Remove default space-y margin */
  #highlights .grid.lg\:grid-cols-12 > div:nth-child(1) > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0 !important;
  }

  #highlights .grid.lg\:grid-cols-12 > div:nth-child(1) .reveal-child {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
  }

  /* 3. Middle Column (Image): Centered, scaled larger, shifted left */
  #highlights .grid.lg\:grid-cols-12 > div:nth-child(2) {
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  #highlights .grid.lg\:grid-cols-12 > div:nth-child(2) img {
    /* Scale up and translate left into empty space */
    transform: scale(1.38) translateX(-110px) !important;
    transform-origin: center !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 680px !important; /* Make it significantly taller to align with columns */
    object-fit: contain !important;
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.1)) !important;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease !important;
  }
  
  #highlights .grid.lg\:grid-cols-12 > div:nth-child(2) img:hover {
    transform: scale(1.42) translateX(-110px) !important;
    filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.15)) !important;
  }

  /* 4. Right Column (Text): Left-aligned */
  #highlights .grid.lg\:grid-cols-12 > div:nth-child(3) {
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}


