/* MAIN.CSS — Ultra-Premium Minimal Glass + Price Range Slider */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Kaushan+Script&family=Satisfy&family=Grand+Hotel&family=Dancing+Script:wght@400;600;700&family=Lobster&family=Playfair+Display:wght@600;700;800&family=Raleway:wght@500;600;700;800&family=Oswald:wght@400;500;600;700&family=Figtree:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=Bungee&family=Luckiest+Guy&family=Patua+One&display=swap');

/* ============================== ROOT VARIABLES ============================== */
:root {
  --primary: #1a5f3d;
  --secondary: #2d3748;
  --feature-primary: #45403b;
  --feature-secondary: #d3cac2;
  --accent: #4d8d82d9;
  --accent-rgb: 77, 141, 130;
  --black: #000000;
  --white: #ffffff;
  --bg: #000000;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --transition: 300ms cubic-bezier(.2, .9, .2, 1);
  --dark-gray: rgba(15, 15, 15, 0.8);
  --font-base: 'Figtree', sans-serif;
  --font-alt: 'Inter', sans-serif;
  --h1-size: 5rem;
  --h2-size: 1.6rem;
  --h3-size: 1.2rem;
  --h4-size: 1.1rem;
  --h5-size: 1rem;
  --h6-size: 0.9rem;
  --p-size: 1.1rem;
  --h1-weight: 900;
  --h2-weight: 700;
  --h3-weight: 700;
  --h4-weight: 600;
  --h5-weight: 600;
  --h6-weight: 500;
  --p-line: 1;
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.25);
  --shadow-card: 0 10px 35px rgba(0, 0, 0, 0.22);

  /* ============================== BACKGROUND IMAGE & CONTROL ============================== */
  --site-bg-image: url('../../images/web-video.webp');
  --site-bg-overlay-dark:
    linear-gradient(145deg,
      rgba(12, 12, 12, 0.72) 0%,
      rgba(18, 18, 18, 0.78) 18%,
      rgba(22, 22, 22, 0.35) 40%,
      rgba(0, 0, 0, 0.90) 100%);

  /* Light  overlay */
  --site-bg-overlay-light:
    linear-gradient(140deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.14) 28%,
      rgba(255, 255, 255, 0.22) 55%,
      rgba(255, 255, 255, 0.28) 100%);

  /* Shared SVG Filters */
  --site-bg-overlay-chroma:
    radial-gradient(circle at 70% 30%,
      rgba(180, 220, 255, 0.06),
      transparent 60%),
    radial-gradient(circle at 30% 70%,
      rgba(255, 200, 255, 0.05),
      transparent 65%);

}

.theme-text-icon {
  color: var(--white) !important;
}

html[data-theme="light"] .theme-text-icon {
  color: var(--black) !important;
}

/* ============================== CLEAN CONTACT SECTION ============================== */
#contact {
  background: transparent !important;
  width: 100%;
  margin: 0;
  padding: 20px 0;
  /* Adjust padding as needed */
  border: none;
  box-shadow: none;
}


/* ============================== VISIBILITY UTILITIES ============================== */
.desktop-only {
  display: block !important;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 991px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  color: var(--white);
  font-family: var(--font-base);
  line-height: 1;
  background: none;
}

/* Fixed background layer using web-video.webp */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    var(--site-bg-overlay-dark),
    var(--site-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  will-change: transform;
  transform: translateZ(0);
}

/* ============================== LIGHT MODE BACKGROUND ============================== */
/* LIGHT MODE — NO FLASH — uses html[data-theme] so it applies instantly */
/* html[data-theme="light"],
html[data-theme="light"] body::before {
  background:
    var(--site-bg-overlay-light),
    var(--site-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
} */

/* Also add a fallback for any other elements that use body selector */
html[data-theme="light"] {
  color: #111;
}

/* ============================== LIGHT MODE TEXT COLOR ============================== */
html[data-theme="light"],
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] p,
html[data-theme="light"] a,
html[data-theme="light"] span,
html[data-theme="light"] li,
html[data-theme="light"] label {
  color: var(--black) !important;
}

/* ============================== TEXT VARIABLES ============================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-base);
  line-height: 0.9;
  color: var(--white);
  font-weight: normal;
  margin: 0 0 0 0;
}

h1 {
  font-size: var(--h1-size);
  font-weight: var(--h1-weight);
}

h2 {
  font-size: var(--h2-size);
  font-weight: var(--h2-weight);
}

h3 {
  font-size: var(--h3-size);
  font-weight: var(--h3-weight);
}

h4 {
  font-size: var(--h4-size);
  font-weight: var(--h4-weight);
}

h5 {
  font-size: var(--h5-size);
  font-weight: var(--h5-weight);
}

h6 {
  font-size: var(--h6-size);
  font-weight: var(--h6-weight);
}

p {
  font-size: var(--p-size);
  line-height: var(--p-line);
  color: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

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

[id] {
  scroll-margin-top: 100px;
}

/* ============================== RESPONSIVE TYPE SCALE ============================== */

/* ===== Tablet (≤ 1024px) ===== */
@media (max-width: 1024px) {
  :root {
    --h1-size: 4rem;
    --h2-size: 2rem;
    --h3-size: 1.4rem;
    --h4-size: 1.2rem;
    --h5-size: 1rem;
    --h6-size: 0.8rem;
    --p-size: 1.1rem;
  }
}

/* ===== Mobile (≤ 768px) ===== */
@media (max-width: 768px) {
  :root {
    --h1-size: 4rem;
    --h2-size: 2rem;
    --h3-size: 1.1rem;
    --h4-size: 1rem;
    --h5-size: 0.9rem;
    --h6-size: 0.7rem;
    --p-size: 0.95rem;
  }
}

/* ===== Small Mobile (≤ 480px) ===== */
@media (max-width: 480px) {
  :root {
    --h1-size: 2rem;
    --h2-size: 1.4rem;
    --h3-size: 1.2rem;
    --h4-size: 1rem;
    --h5-size: 0.9rem;
    --h6-size: 0.7rem;
    --p-size: 1.2rem;
  }
}

:root {
  /* Parent container  (deep ambient) */
  --parent-bg-dark: rgba(12, 12, 12, 0.40);
  --parent-border-dark: rgba(255, 255, 255, 0.06);
  --parent-glow-dark: rgba(255, 255, 255, 0.10);

  --parent-bg-light: rgba(255, 255, 255, 0.38);
  --parent-border-light: rgba(255, 255, 255, 0.50);
  --parent-glow-light: rgba(255, 255, 255, 0.45);

  --parent-blur: 10px;
  --parent-saturation: 300%;
  --parent-radius: 24px;

  /* Ambient grain layer */
  --parent-noise-opacity: 0.18;
}

/* ===========================================================
   GLOBAL  COMPONENT — VISIONOS LIQUID  EDITION
   =========================================================== */
.glass-panel {
  position: relative;
  padding: 32px;
  display: flex;
  flex-direction: column;
  border-radius: var(---radius, 20px);
  align-items: center;
  text-align: center;
  background:
    /* soft chromatic glow layer */
    radial-gradient(120% 120% at 20% 10%,
      rgba(255, 182, 193, 0.28),
      /* blush pink */
      transparent 60%),
    radial-gradient(140% 140% at 90% 90%,
      rgba(255, 127, 109, 0.25),
      /* coral */
      transparent 65%),
    radial-gradient(120% 120% at 50% 100%,
      rgba(255, 210, 180, 0.18),
      /* warm peach */
      transparent 70%),

    /*  surface */
    linear-gradient(145deg,
      rgba(255, 255, 255, 0.22) 0%,
      rgba(255, 255, 255, 0.08) 35%,
      rgba(255, 255, 255, 0.03) 100%);

  background-clip: padding-box;

  /* Iridescent border (VisionOS style) */
  --iridescent: linear-gradient(135deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 255, 255, 0.12) 40%,
      rgba(255, 255, 255, 0.35) 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;

  /* Soft ambient  shadow */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 25px 55px rgba(0, 0, 0, 0.45),
    inset 0 2px 8px rgba(255, 255, 255, 0.10);

  backdrop-filter: blur(calc(var(---blur) * 1.25)) saturate(2);
  -webkit-backdrop-filter: blur(calc(var(---blur) * 1.25)) saturate(2);

  /* width: 100%; REMOVED as requested */
  overflow: hidden;
  transition:
    box-shadow 0.6s cubic-bezier(.22, 1, .36, 1),
    background 0.6s cubic-bezier(.22, 1, .36, 1),
    border-color 0.6s ease;
}

/* VisionOS soft specular highlight */
.glass-panel::before {
  content: "";
  position: absolute;
  top: -28%;
  left: -20%;
  width: 170%;
  height: 80%;
  background: radial-gradient(circle at 30% 40%,
      rgba(255, 255, 255, 0.18),
      rgba(255, 255, 255, 0.04) 45%,
      transparent 80%);
  filter: blur(22px);
  opacity: 0.55;
  transform: rotate(-8deg);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Subsurface scattering + micro-texture shimmer */
.glass-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.10), transparent 70%),
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, 0.02) 0px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 3px);
  mix-blend-mode: screen;
  opacity: 0.35;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

/* ===========================================================
   HOVER (movement removed)
   =========================================================== */
.glass-panel:hover {
  box-shadow:
    0 30px 65px rgba(0, 0, 0, 0.50),
    inset 0 3px 12px rgba(255, 255, 255, 0.14);
}

/* Highlight brightens without shifting */
.glass-panel:hover::before {
  /* Removed movement; only brighten */
  opacity: 0.78;
}

/* Micro texture intensifies slightly */
.glass-panel:hover::after {
  opacity: 0.60;
}

/* Liquid Lens distortion overlay */
.glass-panel .liquid-lens {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;

  filter: url(#liquidLens);
  background: rgba(255, 255, 255, 0.05);
  /* Pixel buffer for displacement */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0.0;
  transition: opacity 0.45s ease;
  mix-blend-mode: soft-light;
  z-index: 3;
}

/* On hover, reveal distortion — no movement */
.glass-panel:hover .liquid-lens {
  opacity: 0.55;
}

/* ============================== SECTION CONTAINERS ============================== */
section {
  max-width: 1800px;
  margin: 0 auto;
  overflow: hidden;
  text-align: center;
}

@media (min-width: 768px) {
  section {
    padding: 100px 5%;
  }
}

@media (min-width: 1200px) {
  section {
    padding: 120px 5%;
  }
}

.section- {
  overflow: hidden;
  text-align: center;
  position: relative;
}

@media (min-width: 768px) {
  section {
    padding: 100px 5%;
  }
}

@media (min-width: 1200px) {
  section {
    padding: 120px 5%;
  }
}

/* ===== LIGHT THEME  OVERRIDE ===== */


html[data-theme="light"] .glass-panel {
  border: 1px solid var(--glass-border-light);
  box-shadow: var(--glass-shadow-light);
}

html[data-theme="light"] .glass-panel::before {
  background: var(--glass-gloss-light);
}

html[data-theme="light"] .glass-panel::after {
  background: var(--glass-sheen-light);
}



/* ============================== MAIN CONTAINERS ============================== */


/* ======================================
   LIQUID SPATIAL GLASS CONTAINER
   Apple visionOS-inspired styling
   ====================================== */
.container-glass {
  position: relative;
  z-index: 1;
  width: calc(100% - 80px);
  max-width: 1400px;
  padding: 40px;
  margin: 40px auto;
  box-sizing: border-box;
  border-radius: var(--parent-radius);
  /* Multi-layer frosted glass with depth */
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.08) 0%,
      rgba(255, 255, 255, 0.02) 100%),
    var(--parent-bg-dark);

  border: 1px solid rgba(255, 255, 255, 0.18);

  /* Enhanced glass blur with multiple layers */
  backdrop-filter:
    blur(var(--parent-blur)) saturate(var(--parent-saturation)) brightness(1.05);
  -webkit-backdrop-filter:
    blur(var(--parent-blur)) saturate(var(--parent-saturation)) brightness(1.05);

  /* Dimensional shadow with subtle glow */
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(0, 0, 0, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    0 0 60px rgba(255, 255, 255, 0.03);

  overflow: hidden;

  /* Smooth transitions with spring-like easing */
  transition:
    background 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Subtle 3D transform for depth */
  transform: translateZ(0);
  transform-style: preserve-3d;
}

/* Refined grain texture - more subtle */
.container-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-size: 200px 200px;
  opacity: 0.15;
  mix-blend-mode: overlay;
  z-index: 1;
}

/* Dynamic luminous gradient - follows viewport */
.container-glass::after {
  content: "";
  position: absolute;
  inset: -50%;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 20%),
      rgba(255, 255, 255, 0.15) 0%,
      rgba(255, 255, 255, 0.05) 25%,
      transparent 50%),
    radial-gradient(ellipse at 80% 80%,
      rgba(150, 180, 255, 0.08) 0%,
      transparent 50%);
  opacity: 0.8;
  mix-blend-mode: plus-lighter;
  z-index: 2;
  filter: blur(40px);
  animation: float-glow 8s ease-in-out infinite;
}

/* Floating glow animation */
@keyframes float-glow {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translate(-10px, -10px) scale(1.05);
    opacity: 1;
  }
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.05) 25%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  display: inline-block;
  min-width: 20px;
  min-height: 1em;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Interactive hover state - subtle lift */
.container-glass:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.25),
    0 0 80px rgba(255, 255, 255, 0.05);

  transform: translateZ(0) translateY(-2px);
}

/* Edge highlight - liquid rim effect */
.container-glass::before {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* MOBILE — full-bleed with preserved effects */
@media (max-width: 640px) {

  .container-glass,
  .glass-panel {
    margin: 0;
    width: 100%;
    border-radius: 0;
    padding: 20px 10px;
    background: var(--black);
  }

  /* Mobile Light Mode Override */
  html[data-theme="light"] .container-glass,
  html[data-theme="light"] .glass-panel {
    background: var(--white) !important;
  }

  .container-glass:hover {
    transform: none;
  }
}

/* LIGHT MODE VARIANT - Brighter, airier glass */
html[data-theme="light"] .container-glass {
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.7) 0%,
      rgba(255, 255, 255, 0.5) 100%),
    var(--parent-bg-light);

  border: 1px solid rgba(0, 0, 0, 0.12);

  backdrop-filter:
    blur(var(--parent-blur)) saturate(1.8) brightness(1.1);
  -webkit-backdrop-filter:
    blur(var(--parent-blur)) saturate(1.8) brightness(1.1);

  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 1px 0 0 rgba(255, 255, 255, 1),
    0 0 60px rgba(150, 180, 255, 0.08);
}

html[data-theme="light"] .container-glass::after {
  background:
    radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 20%),
      rgba(150, 180, 255, 0.15) 0%,
      rgba(200, 220, 255, 0.08) 25%,
      transparent 50%),
    radial-gradient(ellipse at 80% 80%,
      rgba(255, 200, 150, 0.1) 0%,
      transparent 50%);
  opacity: 0.6;
}

html[data-theme="light"] .container-glass:hover {
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 1px 0 0 rgba(255, 255, 255, 1),
    0 0 80px rgba(150, 180, 255, 0.12);
}



/* ============================== FILTER CONTAINER ============================== */
.filters-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 40px;
}

/* ============================== PROPERTY FILTER CONTAINER ============================== */
/* ============================== PROPERTY FILTER CONTAINER ============================== */
.property-filters-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 30px 0 40px;
}

/* Divider between Filter Group and Pricing Group */
/* Vertical Dividers for property filters container groups - REMOVED per user request */
.property-filters-container>*:not(:last-child)::after {
  display: none;
}

[data-theme="light"] .property-filters-container>*:not(:last-child)::after {
  display: none;
}

/* ============================== PROPERTY & GALLERY FILTER CHIPS — BASE ============================== */
.property-gallery-filters,
.gallery-type-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  order: 0;
}

.property-gallery-filters>*,
.gallery-filters>*,
.gallery-type-filters>* {
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: transparent;
  border: none;
}

/* Vertical Dividers (30px) for all Filters */
/* Vertical Dividers (30px) for all Filters */
.property-gallery-filters>*:not(:last-child)::after,
.gallery-filters>*::after,
.gallery-type-filters>*::after {
  display: none;
}

/* Light mode divider override - Removed */

/* HOW IT WORKS NAV */
.how-it-works-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 30px 0 40px;
}

.how-it-works-nav li {
  margin: 0;
  display: flex;
  align-items: center;
}

/* Vertical Divider (30px) */
.how-it-works-nav li:not(:last-child)::after {
  content: '';
  display: block;
  width: 1px;
  height: 30px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 0 5px;
}

/* Light mode divider override */
html[data-theme="light"] .how-it-works-nav li:not(:last-child)::after {
  background-color: rgba(0, 0, 0, 0.1);
}

html {
  font-size: 16px;
  /* scroll-behavior: smooth; REMOVED per user request for instant jumps */
  background-color: var(--bg-color);
  /* Prevents white flash during body fade-in */
}

body {
  font-family: 'Figtree', sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  opacity: 0;
  animation: pageFadeIn 0.8s ease-out forwards;
}

@keyframes pageFadeIn {
  to {
    opacity: 1;
  }
}

/* Directional slide animations for how-it-works and services */
@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

.how-it-works-nav .nav-btn {
  background: transparent;
  border: none;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--white);
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  text-transform: uppercase;
  opacity: 0.7;
}

/* Remove underline animation */
.how-it-works-nav .nav-btn::after {
  display: none;
}

.how-it-works-nav .nav-btn:hover,
.how-it-works-nav .nav-btn.active {
  color: var(--white);
  font-weight: 800;
  opacity: 1;
}

/* Light mode override for nav buttons */
html[data-theme="light"] .how-it-works-nav .nav-btn {
  color: var(--black);
}

html[data-theme="light"] .how-it-works-nav .nav-btn:hover,
html[data-theme="light"] .how-it-works-nav .nav-btn.active {
  color: var(--black);
}

@media (max-width: 768px) {
  .how-it-works-nav {
    gap: 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 10px;
    margin-bottom: 20px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Hide dividers on mobile since it's scrollable */
  .how-it-works-nav li:not(:last-child)::after {
    display: none;
  }

  .how-it-works-nav::-webkit-scrollbar {
    display: none;
  }

  .how-it-works-nav .nav-btn {
    white-space: nowrap;
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* Consolidated with property filters above */

/* ============================== FILTER CHIPS — BASE ============================== */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  order: 0;
}

/* Consolidated with property filters above */

.property-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.status-filters,
.type-filters {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Dividers for Flat Property Filters - Removed */
.property-gallery-filters>*:not(:last-child)::after {
  display: none;
}

/* Light mode divider override - Removed */

.filter-toggle:last-of-type {
  margin-right: 15px;
}

.filter-toggle,
.filter {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  position: relative;
  text-transform: uppercase;
}

.filter-toggle.active {
  color: var(--text) !important;
  font-weight: 700;
}

[data-theme="light"] .filter-toggle.active {
  color: #0b0f1a !important;
}

/* Base style for for-sale/for-lease indicators if needed */
.filter-toggle.active::after,
.property-gallery-filters .filter.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  opacity: 0.6;
}

/* ============================== FILTER CHIPS — DARK MODE ============================== */
[data-theme="dark"] .gallery-filters>*,
[data-theme="dark"] .property-gallery-filters>*,
[data-theme="dark"] .gallery-type-filters>* {
  color: var(--white) !important;
}

[data-theme="dark"] .property-card p,
[data-theme="dark"] .property-card span,
[data-theme="dark"] .property-card div {
  color: var(--white) !important;
  opacity: 1 !important;
}

[data-theme="dark"] .gallery-filters>*:hover,
[data-theme="dark"] .property-gallery-filters>*:hover,
[data-theme="dark"] .gallery-type-filters>*:hover,
[data-theme="dark"] .gallery-filters .filter.active,
[data-theme="dark"] .property-gallery-filters .filter.active,
[data-theme="dark"] .gallery-type-filters .filter.active {
  background: transparent;
  border-color: transparent;
  color: var(--white);
  font-weight: 700;
  text-shadow: none;
}

/* ============================== FILTER CHIPS — LIGHT MODE ============================== */
[data-theme="light"] .gallery-filters>*,
[data-theme="light"] .property-gallery-filters>*,
[data-theme="light"] .gallery-type-filters>* {
  color: #0b0f1a;
}

[data-theme="light"] .gallery-filters>*:hover,
[data-theme="light"] .property-gallery-filters>*:hover,
[data-theme="light"] .gallery-type-filters>*:hover,
[data-theme="light"] .gallery-filters .filter.active,
[data-theme="light"] .property-gallery-filters .filter.active,
[data-theme="light"] .gallery-type-filters .filter.active {
  background: transparent;
  border-color: transparent;
  color: #0b0f1a;
  /* Use text-shadow to simulate weight without shifting layout */
  text-shadow: 0.5px 0 0 currentColor, -0.2px 0 0 currentColor;
}

/* ===== Active Shine ===== */
.gallery-filters .filter.active::before,
.property-gallery-filters .filter.active::before {
  display: none;
  inset: 0;
  border-radius: 50px;
  background: linear-gradient(120deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.25) 50%,
      rgba(255, 255, 255, 0) 100%);
  opacity: 0.4;
  pointer-events: none;
}

/* ============================== PRICE FILTER — BASE ============================== */
.price-filter-inline {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 14px;
  height: 30px;
  border: none;
  border-radius: 10px;
  background: transparent;
  flex-shrink: 0;
  order: 0;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  transition: all 0.25s ease;
}

[data-theme="light"] .price-filter-inline {
  border: none;
  color: var(--black);
}

/* Light mode hover */
[data-theme="light"] .price-filter-inline:hover {
  border: none;
}

.price-filter-inline:hover {
  background: transparent;
}

.price-label,
#priceRangeValue,
#dashPriceRangeValue {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--white);
}

[data-theme="light"] .price-label,
[data-theme="light"] #priceRangeValue,
[data-theme="light"] #dashPriceRangeValue {
  color: var(--black) !important;
}

#priceRangeValue,
#dashPriceRangeValue {
  min-width: 110px;
  text-align: right;
}

.price-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: inherit;
}

/* ============================== SLIDER — BASE ============================== */
.slider-container-inline {
  position: relative;
  width: 160px;
  height: 24px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  /* Prevent slider track from overflowing */
}

.slider-inline {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  width: 100%;
  height: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border-radius: 3px;
  pointer-events: none;
  z-index: 3;
  margin: 0;
  /* Remove default margin */
}

.slider-track-inline {
  position: absolute;
  width: 100%;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

[data-theme="light"] .slider-track-inline {
  background: rgba(0, 0, 0, 0.05);
}

.slider-range-inline {
  position: absolute;
  height: 3px;
  border-radius: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  pointer-events: none;
  z-index: 2;
  transition: left .15s ease, right .15s ease;
}

[data-theme="light"] .slider-range-inline {
  background: var(--black);
}

/* Thumb */
.slider-inline::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--white);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid var(--white);
  transition: transform .2s ease;
  margin-top: 0;
  /* Center on track */
}

[data-theme="light"] .slider-inline::-webkit-slider-thumb {
  background: var(--black);
  border-color: var(--black);
}

.slider-inline::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--white);
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid var(--white);
  margin-top: 0;
  /* Center on track */
}

[data-theme="light"] .slider-inline::-moz-range-thumb {
  background: var(--black);
  border-color: var(--black);
}

.slider-inline:active::-webkit-slider-thumb,
.slider-inline:focus::-webkit-slider-thumb {
  transform: scale(1.1);
}

/* ============================== SLIDER — LIGHT MODE ============================== */
[data-theme="light"] .slider-track-inline {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .slider-inline::-webkit-slider-thumb {
  border-color: rgba(0, 0, 0, 0.2);
}

/* ============================== MOBILE ============================== */
@media (max-width: 768px) {
  .filters-container {
    gap: 20px;
  }

  /* MOBILE BEHAVIOR: chips on first row, slider drops below */
  .gallery-filters,
  .property-gallery-filters {
    flex: 1 1 100%;
  }

  .price-filter-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
    height: auto;
    min-height: 30px;
    width: 100%;
    /* Full width on mobile */
    flex-shrink: 1;
    /* Allow shrinking on mobile */
  }

  /* Keep Price + Any Price on one row */
  .price-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .price-label {
    font-size: 11px;
  }

  #priceRangeValue {
    min-width: auto;
    text-align: right;
    font-size: 11px;
  }

  .gallery-filters>*,
  .property-gallery-filters>* {}

  .slider-container-inline {
    width: 100%;
    margin-top: 2px;
  }

  /* Increase touch target for mobile */
  .slider-inline::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
  }

  .slider-inline::-moz-range-thumb {
    width: 18px;
    height: 18px;
  }
}



/* ============================== NAVIGATION ============================== */

a,
button {
  -webkit-tap-highlight-color: transparent;
}

nav {
  position: fixed;
  top: 30px;
  left: 0;
  right: 0;
  padding: 1px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 1002;
  transition: top 0.3s ease, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

html[data-theme="light"] nav {
  background: var(--white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

nav .logo-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  height: 100%;
}

nav .logo-container img {
  display: block;
  width: 120px;
  height: auto;
  max-height: 60px;
  flex-shrink: 0;
  object-fit: contain;
}

@media (max-width: 900px) {
  nav {
    top: 0 !important;
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }

  nav .logo-container img {
    width: 110px;
  }

  #userEmail {
    display: none !important;
  }
}

#userEmail {
  padding-right: 15px;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* Premium Nav Icon Style Fix */
.nav-icon-link,
.theme-toggle,
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
}

/* Hide mobile menu toggle on desktop */
@media (min-width: 1025px) {
  .menu-toggle {
    display: none !important;
  }
}

.nav-icon-link:hover,
.theme-toggle:hover,
.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .nav-icon-link,
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .menu-toggle {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--black);
}

html[data-theme="light"] .nav-icon-link:hover,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .menu-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
}

nav ul {
  display: flex;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dark mode (existing) */
nav a:not(.logo-container):hover,
nav a:not(.logo-container).active {
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.35);
  /* transform: translateY(-1px); REMOVED */
}

/* Light mode */
html[data-theme="light"] nav a:not(.logo-container) {
  color: var(--white);
}

html[data-theme="light"] nav a:not(.logo-container):hover,
html[data-theme="light"] nav a:not(.logo-container).active {
  background: rgba(78, 205, 196, 0.12);
  color: var(--white);
  box-shadow: 0 0 10px rgba(78, 205, 196, 0.35);
  /* transform: translateY(-1px); REMOVED */
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  /* space between arrow and text */
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-link i {
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.back-link:hover i {
  transform: translateX(-4px);
  /* subtle arrow movement on hover */
}

.back-link:hover {
  opacity: 0.85;
}

/* ================= NAV RIGHT (DESKTOP + MOBILE) ================= */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  z-index: auto;
}

/* Default (dark mode) buttons */
.nav-right button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  /* DARK MODE GLASS */
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.nav-right button:hover {
  background: var(--accent);
}

.nav-right i {
  font-size: 16px;
  transition: color 0.25s ease;
  color: var(--white);
}

/* ================= LIGHT MODE FIXES ================= */
html[data-theme="light"] .nav-right button {
  background: rgba(0, 0, 0, 0.06);
  /* SOFT GRAY GLASS */
  border: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .nav-right button:hover {
  background: rgba(78, 205, 196, 0.15);
  /* ACCENT GLOW */
}

html[data-theme="light"] .nav-right i {
  color: #222;
  /* DARK ICONS FOR VISIBILITY */
}

/* Dark Mode Toggle (Sun Icon showing) - Light Blue BG, Orange/Yellow Icon */
.nav-right .theme-toggle {
  background-color: #bae6fd !important;
  color: #f59e0b !important;
}

.nav-right .theme-toggle .theme-icon {
  color: #f59e0b !important;
}

/* Light Mode Toggle (Moon Icon showing) - Dark Blue BG, Light Yellow Icon */
html[data-theme="light"] .nav-right .theme-toggle {
  background-color: #1e3a8a !important;
  color: #fef3c7 !important;
}

html[data-theme="light"] .theme-toggle .theme-icon {
  color: #fef3c7 !important;
}

/* Smooth fade transition for theme icon */
.theme-toggle .theme-icon {
  opacity: 1;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* FIX: Prevent button movement on hover/active to match dashboard icon */
.nav-right .theme-toggle:hover,
.nav-right .theme-toggle:active,
.nav-right .theme-toggle:focus {
  transform: none !important;
}

/* During icon change */
.theme-toggle.fading .theme-icon {
  opacity: 0;
  transform: scale(0.8);
}

/* ================= HAMBURGER ICON FIX ================= */
.menu-toggle i {
  font-size: 18px;
  color: var(--white);
  transition: color 0.25s ease, transform 0.25s ease;
}

/* Light mode hamburger */
html[data-theme="light"] .menu-toggle i {
  color: #222;
}

/* When menu is open - Toggle to X */
.menu-toggle.active i::before {
  content: "\f00d";
  /* FontAwesome 'times' (X) icon */
}

.menu-toggle.active i {
  transform: rotate(90deg);
  /* Keep same color as non-active state unless hovered */
  color: inherit;
}

/* Ensure light mode inherits correctly when active */
html[data-theme="light"] .menu-toggle.active i {
  color: #222;
}

/* Hover state remains accent for both open/closed */
.menu-toggle:hover i,
.menu-toggle.active:hover i {
  color: var(--accent);
}

.menu-toggle:hover i {
  color: var(--accent);
}

html[data-theme="dark"] .menu-toggle:hover i {
  color: #000;
  /* or var(--black) for black, or #fff for white */
}

/* ================= MOBILE ONLY ================= */
@media (min-width: 901px) {
  .nav-right .menu-toggle {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-right .menu-toggle {
    display: flex;
  }

  .nav-right {
    gap: 5px;
  }
}




/* ================= MOBILE MENU ================= */
.mobile-menu {
  position: fixed;
  top: 40px;
  right: 0;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(16px);
  padding: 90px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 1001;
  overflow-y: auto;
  font-family: var(--font-base);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  justify-content: flex-start;
}

.mobile-menu.open {
  transform: translateX(0);
}

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 1000;
  pointer-events: none;

}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

}

/* Admin Actions Overlay - Global Styles */
.admin-actions-overlay {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 1002;
  /* Ensure strictly above overay */
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  /* Initially allow clicks to pass through, but buttons need pointer-events: auto */
}

.gallery-item:hover .admin-actions-overlay {
  opacity: 1;
  pointer-events: auto;
}

.admin-btn {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  pointer-events: auto;
  /* Buttons must capture clicks */
}

.admin-btn:hover {
  background: var(--accent);
  transform: scale(1.1);
}

.admin-btn.delete:hover {
  background: #ff4444;
}

.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  font-weight: 300;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s ease;
  z-index: 1002;
}

.menu-close:hover {
  background: var(--accent);
  color: #000;
  transform: scale(1.1) rotate(90deg);
}

.mobile-menu-logo {
  text-align: center;
  margin-bottom: 32px;
}

.mobile-menu-logo img {
  max-width: 110px;
  border-radius: 10px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu-logo img:hover {
  opacity: 1;
  transform: scale(1.05);
}

.mobile-menu a {
  position: relative;
  padding: 16px 18px 16px 20px;
  color: #fff;
  border-radius: 10px;
  margin: 4px 0;
  display: flex;
  align-items: center;
  transition: all 0.35s ease;
  border: none;
  background: transparent;
  backdrop-filter: none;
}

.mobile-menu a:hover {
  color: var(--accent);
  background: transparent;
  transform: none;
  box-shadow: none;
}

body.menu-open {
  overflow: hidden;
}

/* Light Theme Overrides for Mobile Menu */
html[data-theme="light"] .mobile-menu {
  background: rgba(255, 255, 255, 0.95);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .mobile-menu a {
  color: #000;
  background: transparent;
  border: none;
}

html[data-theme="light"] .mobile-menu a:hover {
  color: var(--accent);
  background: transparent;
}

html[data-theme="light"] .mobile-menu a i {
  color: var(--accent);
}

html[data-theme="light"] .mobile-menu a:hover i {
  color: #000;
}

html[data-theme="light"] .menu-close {
  color: #000;
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .menu-close:hover {
  background: var(--accent);
  color: #000;
}

html[data-theme="light"] .menu-overlay {
  background: rgba(255, 255, 255, 0.65);
}

/* ============================== MOBILE MENU LAYOUT ============================== */
@media (max-width: 576px) {
  .mobile-menu {
    width: 280px;
    padding: 80px 18px 28px;
  }

  .mobile-menu a {
    padding: 16px 18px 16px 20px;
    font-size: 15px;
    margin: 3px 8px;
  }

  .mobile-menu-logo img {
    max-width: 95px;
  }
}

/* ============================== TOP INFO BAR ============================== */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 8px 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.5s ease, box-shadow 0.3s ease;
  background: rgba(0, 0, 0, 0.9);
}

.top-bar-left,
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.top-bar.hidden {
  transform: translateY(-100%);
  opacity: 0;
}

.top-bar a {
  color: #fff;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color .3s ease, transform .3s ease;
}

.top-bar a:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

/* Icon-only Add Button */
/* Icon-only Add Button */
.btn-add-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  /* Prevent shrinking in flex layouts */
}

.btn-add-icon:hover {
  /* Removed translateY */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}


/* Action Buttons */
.top-bar a i {
  font-size: 15px;
  color: var(--accent);
}

/* —————— LIGHT MODE —————— */
html[data-theme="light"] .top-bar {
  background: rgba(255, 255, 255, 1);
  color: #111;
}

html[data-theme="light"] .top-bar a {
  color: #111;
}

html[data-theme="light"] .top-bar a:hover {
  color: var(--accent);
}

html[data-theme="light"] .top-bar a i {
  color: var(--accent);
}

/* —————— FACEBOOK OVERRIDES (ALWAYS BLUE) —————— */
.top-bar a.facebook-link,
.top-bar a.facebook-link i {
  color: #1877F2 !important;
}

.top-bar a.facebook-link:hover {
  color: #0e63d8 !important;
}

/* —————— TELEGRAM OVERRIDES (ALWAYS BLUE) —————— */
.top-bar a.telegram-link,
.top-bar a.telegram-link i {
  color: #0088cc !important;
}

.top-bar a.telegram-link:hover {
  color: #007ab8 !important;
}

/* ============================== HIDE TOP BAR ON SMALL SCREENS ============================== */
@media (max-width: 768px) {
  .top-bar {
    display: none !important;
  }
}

.top-bar,
nav,
.hero-carousel {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}


/* ============================== HERO SECTION ============================== */

html[data-theme="light"] .hero-carousel {
  background: var(--white);
  /* Solid white background */
  background-size: initial;
  /* Reset if animation is kept, or remove if disabling */
  animation: none;
  /* Optional: Remove rainbow animation for a cleaner light theme; or keep a softer version below */
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.18);
  /* Subtle dark shadow for depth on light bg */
}

.hero {
  position: relative;
  min-height: 100vh;
  /* ← key change */
  width: 100%;
  overflow: visible;
  /* ← key change */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  filter: brightness(0.85);
  transition: filter 0.4s ease;
}

html[data-theme="light"] .hero video {
  filter: brightness(0.95);
}

.hero-inner {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ============================== 
   HERO WELCOME TEXT - WITH GLASS PANEL
   ============================== */
.hero-welcome-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 50 !important;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  display: none;
  max-width: 90%;
  padding: 3rem 4rem;

  /* Glass panel effect */
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 60px rgba(255, 112, 219, 0.15);
}

.hero-welcome-text h1 {
  font-family: 'Bungee', cursive;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
  line-height: 1.05;
  display: inline-block;

  /* Coral-to-pink gradient - flows through text length */
  background: linear-gradient(to right,
      #ff6b6b 0%,
      #ff8787 15%,
      #ffa5a5 30%,
      #ffb6c1 50%,
      #ff9cc5 70%,
      #ff85d0 85%,
      #ff70db 100%);
  background-size: 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-repeat: no-repeat;

  /* Softer glow to match coral-pink gradient */
  filter: drop-shadow(0 0 40px rgba(255, 112, 219, 0.4)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 60px rgba(255, 107, 107, 0.3));
}

/* ============================== 
   LIGHT MODE - ELEGANT FROSTED GLASS
   ============================== */
html[data-theme="light"] .hero-welcome-text {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 60px rgba(168, 69, 199, 0.12);
}

html[data-theme="light"] .hero-welcome-text h1 {
  /* Darker coral-to-pink gradient for light mode */
  background: linear-gradient(to right,
      var(--white) 0%,
      var(--accent) 100%);
  background-size: 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-repeat: no-repeat;

  filter: drop-shadow(0 0 25px rgba(168, 69, 199, 0.3)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.12)) drop-shadow(0 0 45px rgba(214, 52, 71, 0.25));
}

/* ============================== 
   ACCESSIBILITY - REDUCED MOTION
   ============================== */
@media (prefers-reduced-motion: reduce) {
  .hero-welcome-text {
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }

  .hero-welcome-text h1 {
    animation: none;
    background-position: 0% 50%;
    filter: drop-shadow(0 0 30px rgba(255, 112, 219, 0.3)) drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
  }

  html[data-theme="light"] .hero-welcome-text h1 {
    animation: none;
    filter: drop-shadow(0 0 20px rgba(168, 69, 199, 0.25)) drop-shadow(0 5px 15px rgba(0, 0, 0, 0.12));
  }
}

/* ============================== 
   MOBILE OPTIMIZATION
   ============================== */
@media (max-width: 768px) {
  .hero-welcome-text {
    padding: 2rem 2.5rem;
    max-width: 85%;
    border-radius: 20px;

    /* Lighter blur on mobile for performance */
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
  }

  .hero-welcome-text h1 {
    /* Lighter glow on mobile for performance */
    filter: drop-shadow(0 0 25px rgba(255, 112, 219, 0.3)) drop-shadow(0 5px 15px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 45px rgba(255, 107, 107, 0.25));
  }
}

@media (max-width: 480px) {
  .hero-welcome-text {
    padding: 1.5rem 2rem;
    max-width: 90%;
    border-radius: 16px;
  }
}

/* ============================== 
   FALLBACK FOR BROWSERS WITHOUT BACKDROP-FILTER
   ============================== */
@supports not (backdrop-filter: blur(20px)) {
  .hero-welcome-text {
    background: rgba(0, 0, 0, 0.75);
  }

  html[data-theme="light"] .hero-welcome-text {
    background: rgba(255, 255, 255, 0.85);
  }
}

/* ============================== CAROUSEL DESKTOP ============================== */
.hero-carousel {
  position: relative;
  width: 80%;
  max-width: 1000px;
  min-width: 320px;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 20px;
  padding: 1px;
  background: var(--black);
  background-size: 400% 400%;
  box-shadow: 0 0 32px rgba(255, 255, 255, 0.18);
  overflow: hidden;
  touch-action: pan-y;
  opacity: 0 !important;
  will-change: transform, opacity;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-carousel.is-visible {
  opacity: 1 !important;
  transform: none !important;
}



/* Mobile & smaller screens — force 3:4 aspect ratio */
@media (max-width: 991px) {
  .hero-carousel {
    aspect-ratio: 3 / 4;
  }
}

/* Force inner container to follow the aspect ratio */
.hero-carousel .hero-slide-container {
  position: relative;
  width: 100%;
  height: 100% !important;
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
  display: flex;
}

/* ============================== SLIDES ============================== */
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: row;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  overflow: hidden;
  justify-content: flex-start;
  align-items: stretch;
  border-radius: 20px;
  z-index: 0;
  transition:
    opacity 1s ease-in-out,
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  will-change: opacity;
}

.hero-slide.active {
  position: relative;
  /* ← THIS LINE PREVENTS SHRINKING - DO NOT REMOVE */
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* ============================== IMAGE ============================== */
.slide-image {
  flex: 0 0 50%;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden;
  border-radius: 20px 0 0 20px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  filter: brightness(1.08) saturate(1.1);
}

.slide-image img:not(.hero-logo-overlay) {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center !important;
  transition: transform 0.5s ease;
}

/* ============================== CONTENT ============================== */
.slide-content {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
  border-radius: 0 20px 20px 0;
  overflow: hidden;

  transition: transform 0.3s ease, opacity 0.4s ease;
}

.slide-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  align-items: center;
}

.slide-content h2 {
  line-height: 1;
  font-weight: 700;
}

/* ============================== HOVER EFFECTS ============================== */
.hero-slide:hover {
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.35),
    inset 0 2px 8px rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
}

.hero-slide:hover .slide-image {
  box-shadow: 0 0 35px rgba(78, 205, 196, 0.6);
  transform: scale(1.03);
}

.hero-slide:hover .slide-image img {
  transform: scale(1.1);
}

html[data-theme="light"] .hero-slide:hover .slide-image {
  box-shadow: 0 0 30px rgba(78, 205, 196, 0.4);
}

/* ============================== MOBILE ============================== */
@media (max-width: 900px) {
  .hero-carousel {
    aspect-ratio: 2.6 / 4;
    width: 94%;
    padding: 1px;
  }

  .hero-learn-more {
    display: none !important;
  }

  .hero-slide {
    flex-direction: column;
  }

  .slide-image {
    flex: 0 0 55%;
    width: 100%;
    height: 55%;
    border-radius: 20px 20px 0 0;
  }

  .slide-content {
    padding: 24px 26px 30px;
    border-radius: 0 0 20px 20px;
  }

  .slide-text {
    gap: 0;
  }
}

/* ============================== SMALLER MOBILE ============================== */
@media (max-width: 600px) {
  .hero-carousel {
    aspect-ratio: 2.6 / 4;
  }

  .slide-image {
    height: 50%;
  }

  .slide-content {
    padding: 18px;
  }

  .slide-content h1 {
    font-size: 1.6rem;
  }
}

@keyframes rainbowBorder {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}


/* ============================== EXPLORE MORE - LIQUID GLASS ============================== */
.hero-learn-more {
  position: absolute;
  left: 50%;
  bottom: 2.5rem;
  transform: translateX(-50%);
  z-index: 11;
  opacity: 0;
  animation: fadeSlideUp 1.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0.6s forwards;
  will-change: opacity, transform;
  backdrop-filter: blur(6px);
  border-radius: 10px;
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    translate: 0 30px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* LIQUID GLASS BUTTON - WRAPPER */
.learn-more-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 1rem;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 6px 6px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 2.2);
  border-radius: 10px;

}

/* Layer 1: Glass distortion effect (backdrop blur) - STATIC, NO ANIMATION */
.learn-more-btn::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: 10px;
}

/* Layer 2: Color tint overlay */
.learn-more-btn::after {
  content: "";
  z-index: 1;
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

/* Layer 3: Specular shine (inset highlights) */
.hero-learn-more::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;

  pointer-events: none;
  border-radius: 10px;
}

/* Layer 4: Text content */
.learn-more-btn>* {
  position: relative;
  z-index: 3;
  color: var(--white);
}

/* Active/pressed state */
.learn-more-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Arrow icon with stick - pointing down */
.arrow-icon {
  width: 18px;
  height: 18px;
  stroke: var(--white);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============================== LIGHT MODE ============================== */


html[data-theme="light"] .learn-more-btn>* {
  color: var(--black);
}

html[data-theme="light"] .arrow-icon {
  stroke: var(--black);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .learn-more-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }

  .arrow-icon {
    width: 16px;
    height: 16px;

  }
}


/* ============================== PROPERTY LISTINGS SECTION ============================== */

/* DARK MODE — SECTION BACKGROUND */
body:not([data-theme="light"]) .properties {
  text-align: center;
  padding: 60px 20px;
  background: #000;
  /* pure black */
  color: #fff;
}

/* LIGHT MODE — SECTION BACKGROUND */
html[data-theme="light"] .properties {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  /* pure white */
  color: #111;
}

/* ============================== PROPERTY GRID ============================== */
.property-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin: 0 auto 40px;
}

/* ============================== PROPERTY CARD ============================== */
.no-results-card {
  grid-column: 1 / -1;
  max-width: 450px;
  margin: 2rem auto !important;
  pointer-events: none;
  border-style: dashed !important;
  opacity: 0.8;
}

.no-results-card .property-image {
  background: var(--glass-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px !important;
  flex-direction: column;
  gap: 16px;
  border-radius: 20px;
}

.property-card {
  cursor: pointer;
  position: relative;
  background: rgba(25, 25, 25, 0.85);
  /* deep glass dark */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: visible !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  text-align: left;
  display: flex;
  flex-direction: column;
  padding-bottom: 6px;
}

.property-card:hover {
  box-shadow: var(--shadow-card);
}

/* LIGHT MODE — PROPERTY CARD */
html[data-theme="light"] .property-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
}

html[data-theme="light"] .property-card:hover {
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

/* ============================== IMAGE ============================== */
.property-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

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

.property-card:hover .property-image img {
  transform: scale(1.05);
}

/* Mock Nav Arrows for "just for show" */
.property-image .mock-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.property-card:hover .property-image .mock-nav {
  opacity: 1;
}

.property-image .mock-nav.prev {
  left: 12px;
}

.property-image .mock-nav.next {
  right: 12px;
}

.property-card:hover .property-image .mock-nav.prev {
  left: 15px;
}

.property-card:hover .property-image .mock-nav.next {
  right: 15px;
}

/* ============================== LOGO ============================== */
.property-logo {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

.property-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

#homebuyerLogoMain {
  transition: opacity 0.3s ease;
}

.property-card:hover .property-logo {
  transform: scale(1.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* LIGHT MODE — LOGO */
html[data-theme="light"] .property-logo {
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.property-logo-modal {
  top: 20px;
  right: 20px;
  width: 150px;
  height: 150px;
  /* Slightly larger for modal context if needed, or keep standard */
  z-index: 50;
  /* Ensure it sits above everything */
}

.property-info {
  display: flex;
  justify-content: space-between;
  padding: 2px 12px;
  font-weight: 500;
  color: #e5e5e5;
  background: transparent;
  gap: 12px;
  min-width: 0;
}

.property-location {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.property-info.primary {
  font-weight: 500;
  padding-top: 12px;
}

.property-price {
  font-weight: 700;
}

/* LIGHT MODE — INFO */
html[data-theme="light"] .property-info {
  color: #111;
}

/* ============================== FEATURES ============================== */
.property-features {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 12px;
  color: #d8d8d8;
  flex-wrap: wrap;
  gap: 8px;
}

.property-features .feature {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.property-features i {
  font-size: 16px;
  color: var(--feature-secondary);
}

/* LIGHT MODE — FEATURES */
html[data-theme="light"] .property-features i {
  color: #333;
}

html[data-theme="light"] .property-features {
  color: #444;
}

/* ============================== TOOLTIP ============================== */
.property-features .feature::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -34px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(0, 0, 0, 0.95);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  transition-delay: 0s;
}

.property-features .feature::before {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border-width: 6px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.95) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 9998;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  transition-delay: 0s;
}

.property-features .feature:hover::after,
.property-features .feature:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0.5s;
  /* 500ms delay for "purposeful" hover */
}

/* LIGHT MODE — TOOLTIP */
html[data-theme="light"] .property-features .feature::after {
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
}

html[data-theme="light"] .property-features .feature::before {
  border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* ============================== FULL SCREEN OVERLAY ============================== */
/* ============================== DASHBOARD CUSTOMS ============================== */
.thumb-wrapper {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 60px;
}

.thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.gallery-badge {
  position: absolute;
  top: -5px;
  width: 50px;
  right: -5px;
  background: var(--accent);
  color: var(--white);
  font-weight: 700;
  padding: 10px 10px;
  border-radius: 50px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
  pointer-events: none;
}

.source-icon {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.source-icon.whatsapp {
  color: #25D366;
}

.source-icon.telegram {
  color: #0088cc;
}

.source-icon.user {
  color: var(--text-muted);
  opacity: 0.9;
}

.source-icon:hover {
  transform: scale(1.2);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  /* 🔒 TRUE FULL-VIEWPORT BLUR */
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease;
  overflow: hidden;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Light mode overlay */
html[data-theme="light"] .modal-overlay {
  background: rgba(255, 255, 255, 0.55);
}

/* ============================== MODAL OVERLAY ============================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: #12a7b88c;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 9998;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ============================== PROPERTY MODAL ============================== */
.property-modal {
  max-width: none;
  max-height: none;
  border-radius: 20px;
  margin: 0;
  z-index: 9999;
  pointer-events: none;
  /* Let clicks pass through to overlay */
}

/* ============================== MODAL PANEL ============================== */
.modal-content {
  width: 92vw;
  margin: 0 auto;
  max-height: 90vh;
  /* Reduced from 95vh */
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.96) translateY(20px);
  transition: transform 0.35s ease;
  border-radius: 20px;
  pointer-events: auto;
  position: relative;
  /* Block clicks on content */

  /* Hide scrollbar but keep functionality */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
}

.modal-content::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari/Opera */
}

.property-modal.open .modal-content {
  transform: scale(1) translateY(0);
}

/* ============================== DARK MODE ============================== */
html[data-theme="dark"] .modal-content {
  background: #0b0b0b;
  color: #f5f5f5;
}

/* ============================== LIGHT MODE ============================== */
html[data-theme="light"] .modal-content {
  background: var(--white);
  color: #111111;
}

/* ============================== CLOSE BUTTON ============================== */
.modal-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  z-index: 10000;
  transition: transform 0.25s ease, background 0.25s ease;
  color: var(--white);
  background: var(--accent);
}

.modal-close:hover {
  transform: rotate(90deg) scale(1.1);
}

/* ============================== IMAGE ============================== */
.modal-image-container {
  position: relative;
  width: 100%;
  height: 42vh;
  margin-bottom: 20px;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================== GLASS PANEL ============================== */
.modal-glass {
  border-radius: 20px;
  padding: 20px;
}

html[data-theme="dark"] .modal-glass {
  backdrop-filter: blur(16px);
}

/* ============================== HEADER ============================== */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
}


.modal-header h2 {
  margin: 0;
}

.modal-subtext {
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal-price {
  font-weight: 700;
}

html[data-theme="light"] .modal-price {
  color: #1a5f3d;
}

/* ============================== STATS ============================== */
.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.modal-stats div {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.modal-stats strong {
  display: block;
  font-size: 20px;
}

.modal-stats span {
  font-size: 11px;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================== SECTIONS ==============================*/

.modal-engagement {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 24px;
}

.engagement-stats {
  display: flex;
  gap: 20px;
  color: var(--black);
  font-size: 0.9rem;
  opacity: 0.7;
}

.engagement-stats span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-like {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-like:hover {
  background: rgba(var(--accent-rgb), 0.1);
  transform: scale(1.1);
}

.btn-like.liked {
  background: transparent;
  cursor: pointer;
  /* Allow unliking */
  border-color: #ff69b4;
  color: #ff69b4;
}

.btn-like.liked i {
  color: #ff69b4 !important;
}

.engagement-stats {
  display: flex;
  gap: 20px;
  color: var(--white);
  font-size: 1rem;
  /* Slightly larger for visibility */
  opacity: 0.9;
  /* More solid for clarity */
}

html[data-theme="light"] .modal-engagement {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

/* ============================== GRID LIKE BUTTON ============================== */
.grid-like-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s cubic-bezier(.175, .885, .32, 1.275);
}

.grid-like-btn:hover {
  transform: scale(1.15);
  background: rgba(0, 0, 0, 0.6);
  border-color: var(--accent);
}

.grid-like-btn.liked {
  color: #ff69b4;
  border-color: #ff69b4;
  background: rgba(255, 105, 180, 0.15);
}

.grid-like-btn i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.grid-like-btn.liked i {
  transform: scale(1.1);
}

/* Ensure stats hearts are only pink if liked, not based on count */
.engagement-stats i.fa-heart {
  color: inherit;
}

.engagement-stats .liked i.fa-heart {
  color: #ff69b4;
}

/* Modal Header */
.modal-section h3 {
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

.modal-section p {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.9;
}

/* ============================== FEATURES ============================== */
.modal-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

.modal-features li {
  font-size: var(--p-size);
  position: relative;
  padding-left: 18px;
}

.modal-features li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================== ACTIONS ============================== */
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.btn-primary,
.btn-secondary {
  flex: 1;
  height: 44px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--accent);
  border: none;
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ============================== LIGHT MODE TWEAKS ============================== */
html[data-theme="light"] .modal-stats div {
  background: #f5f0f0;
}

/* ============================== GRID SYSTEM ============================== */
.grid,
.steps-details {
  display: grid;
  gap: 20px !important;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 40px;
  margin-bottom: 20px;
  align-items: start;
}

@media (min-width: 992px) {
  .steps-details {
    max-width: 1400px;
    margin: 0 auto 40px;
  }
}

/* ============================== CARD BASE ============================== */
.card {
  padding: 24px;
  border-radius: 20px;

  text-align: center;
  color: var(--white);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  overflow: hidden;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.card-cta {
  display: none !important;
}

/* ============================== MOBILE - EXPANDED CARDS DEFAULT ============================== */
@media (max-width: 768px) {

  /* Hide regular grid cards on mobile */
  #how-it-works .grid .card:not(.full-width),
  #services .grid .card:not(.full-width) {
    display: none !important;
  }

  /* Show expanded card by default on mobile */
  #how-it-works .card.full-width,
  #services .card.full-width {
    display: grid !important;
    opacity: 1 !important;
  }

  .contact-newsletter-container {
    padding: 40px 24px;
  }

  .contact-row {
    padding: 18px;
    gap: 20px;
  }

  .icon-box {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .contact-text .value {
    font-size: 1.05rem;
  }
}

/* Gradient overlay for non-expanded cards - DARK THEME */
.card:not(.full-width)::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 120% at 20% 10%,
      rgba(255, 182, 193, 0.28),
      transparent 60%),
    radial-gradient(140% 140% at 90% 90%,
      rgba(109, 130, 255, 0.25),
      transparent 65%),
    radial-gradient(120% 120% at 50% 100%,
      rgba(255, 210, 180, 0.18),
      transparent 70%),
    linear-gradient(145deg,
      rgba(0, 0, 0, 0.75) 0%,
      rgba(0, 0, 0, 0.55) 50%,
      rgba(0, 0, 0, 0.40) 100%);
  z-index: 1;
  border-radius: 20px;
  pointer-events: none;
}

/* Gradient overlay for non-expanded cards - LIGHT THEME */
html[data-theme="light"] .card:not(.full-width)::before {
  background:
    radial-gradient(120% 120% at 20% 10%,
      rgba(255, 182, 193, 0.28),
      transparent 60%),
    radial-gradient(140% 140% at 90% 90%,
      rgba(109, 130, 255, 0.25),
      transparent 65%),
    radial-gradient(120% 120% at 50% 100%,
      rgba(255, 210, 180, 0.18),
      transparent 70%),
    linear-gradient(145deg,
      rgba(255, 255, 255, 0.85) 0%,
      rgba(255, 255, 255, 0.65) 50%,
      rgba(255, 255, 255, 0.40) 100%);
}

.card:hover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-4px);
}

/* Remove hover transform for display cards */
#how-it-works-display.card:hover,
#services-display.card:hover {
  transform: none;
}

/* Carousel Layout */
.carousel-container {
  overflow: hidden;
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  height: 100%;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.card:not(.full-width) {
  align-self: start;
  justify-content: center;
}

/* ============================== IMAGE ============================== */
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: 20px;
  z-index: 0;
}

/* Hide image in non-expanded cards if not present */
.card:not(.full-width) .card-image:not([src]) {
  display: none;
}

/* ============================== CARD CONTENT ============================== */
.card-content {
  position: relative;
  z-index: 2;
  color: var(--white) !important;
  /* Force white in dark mode */
  opacity: 1 !important;
  /* No reduction in opacity */
}

/* ============================== CARD FULL-WIDTH EXPANSION ============================== */
.card.full-width {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  height: 400px;
  padding: 0;
  position: relative;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
  cursor: default;
}

/* Background glass overlay effect */
.card.full-width::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.4) 0%,
      rgba(0, 0, 0, 0.25) 35%,
      transparent 65%);
  z-index: 1;
  border-radius: 20px;
  pointer-events: none;
}

/* Image takes full space */
.card.full-width .card-image {
  display: block;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: 20px;
  z-index: 0;
}

/* Content overlays on left side */
.card.full-width .card-content {
  grid-column: 1;
  grid-row: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  position: relative;
  z-index: 2;
  max-width: 550px;
  background:
    radial-gradient(120% 120% at 20% 10%,
      rgba(255, 182, 193, 0.28),
      transparent 60%),
    radial-gradient(140% 140% at 90% 90%,
      rgba(109, 130, 255, 0.25),
      transparent 65%),
    radial-gradient(120% 120% at 50% 100%,
      rgba(255, 210, 180, 0.18),
      transparent 70%),
    linear-gradient(145deg,
      rgba(0, 0, 0, 0.75) 0%,
      rgba(0, 0, 0, 0.55) 50%,
      rgba(0, 0, 0, 0.40) 100%);
  border-radius: 20px;
  margin: 50px;
  align-self: center;
  /* Center vertically */
}

/* Close button styling */
.expanded-close-btn {
  padding: 10px 24px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.expanded-close-btn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Highlight active card in grid */
.card.card-active {
  border-color: var(--white);
  box-shadow: 0 0 0 2px var(--white);
  transform: scale(0.98);
  transition: all 0.3s ease;
}

/* ============================== CARD NAV ============================== */
.card-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  z-index: 5;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(40, 40, 40, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  color: white;
  font-size: 0;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card-nav:hover {
  background: rgba(60, 60, 60, 0.8);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.card-nav::before {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}

.card-nav-left::before {
  transform: rotate(135deg);
  margin-left: 4px;
}

.card-nav-right::before {
  transform: rotate(-45deg);
  margin-right: 4px;
}

.card-nav-left {
  left: 4px;
}

.card-nav-right {
  right: 4px;
}

.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================== CARD CTA ============================== */
/* ============================== CARD CTA (HIDDEN) ============================== */
.card-cta {
  display: none !important;
}

/* ============================== EXPANDED TEXT ============================== */
.card.full-width .expanded-title {
  color: var(--white);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.card.full-width .expanded-subtitle {
  color: var(--white) !important;
  opacity: 0.95;
  margin-bottom: 0.25rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.card.full-width .card-content p {
  color: var(--white) !important;
  margin-top: 0;
  line-height: 1.3;
}

.card.full-width .card-content p:last-child {
  margin-bottom: 0;
}

/* .card-expand-text removed as we now use simple <p> tags */

/* ============================== RESPONSIVE ============================== */
@media (max-width: 1024px) {
  .card.full-width {
    height: 500px;
  }

  .card.full-width .card-content {
    padding: 20px;
    margin: 40px;
    max-width: 480px;
  }

  .card-nav {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 767px) {
  .card.full-width {
    height: 500px;
  }

  .card.full-width .card-content {
    padding: 30px;
    margin: 30px;
    max-width: calc(100% - 40px);
  }

  /* Adjust gradient for mobile */
  .card.full-width::before {
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        transparent 100%);
  }

  .expanded-close-btn {
    padding: 10px 20px;
    font-size: 0.7rem;
    width: 100%;
  }

  .card-nav {
    width: 44px;
    height: 44px;
  }

  .card-nav-left {
    left: 4px;
  }

  .card-nav-right {
    right: 4px;
  }

  /* Hide card CTA on mobile */
  .card:not(.full-width) .card-cta {
    display: none !important;
  }

  /* Let cards collapse to content height */
  .card:not(.full-width) {
    min-height: auto;
    padding: 16px;
  }

  /* Slightly tighter content spacing */
  .card:not(.full-width) .card-content {
    padding-bottom: 0;
  }
}

/* ============================== LIGHT THEME ============================== */
html[data-theme="light"] .card {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px) saturate(1.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  color: #111;
}

html[data-theme="light"] .card:hover {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

/* Gradient overlay for non-expanded cards - LIGHT THEME */
html[data-theme="light"] .card:not(.full-width)::before {
  background:
    radial-gradient(120% 120% at 20% 10%,
      rgba(255, 182, 193, 0.28),
      transparent 60%),
    radial-gradient(140% 140% at 90% 90%,
      rgba(109, 130, 255, 0.25),
      transparent 65%),
    radial-gradient(120% 120% at 50% 100%,
      rgba(255, 210, 180, 0.18),
      transparent 70%),
    linear-gradient(145deg,
      rgba(255, 255, 255, 0.85) 0%,
      rgba(255, 255, 255, 0.65) 50%,
      rgba(255, 255, 255, 0.40) 100%);
}

html[data-theme="light"] .card.full-width::before {
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(0, 0, 0, 0.08) 35%,
      transparent 65%);
}

/* Light theme expanded card content */
html[data-theme="light"] .card.full-width .card-content {
  background:
    radial-gradient(120% 120% at 20% 10%,
      rgba(255, 182, 193, 0.28),
      transparent 60%),
    radial-gradient(140% 140% at 90% 90%,
      rgba(109, 130, 255, 0.25),
      transparent 65%),
    radial-gradient(120% 120% at 50% 100%,
      rgba(255, 210, 180, 0.18),
      transparent 70%),
    linear-gradient(145deg,
      rgba(255, 255, 255, 0.85) 0%,
      rgba(255, 255, 255, 0.65) 50%,
      rgba(255, 255, 255, 0.40) 100%);
}

html[data-theme="light"] .card.full-width .expanded-title,
html[data-theme="light"] .card.full-width .expanded-subtitle,
html[data-theme="light"] .card.full-width .card-content p {
  color: var(--black) !important;
}

html[data-theme="light"] .expanded-close-btn {
  background: #111;
  color: #fff;
  border: none;
}

html[data-theme="light"] .expanded-close-btn:hover {
  background: #333;
}

html[data-theme="light"] .card-nav {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.15);
  color: #111;
}

html[data-theme="light"] .card-nav:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

/* ============================== SECTION TITLES ============================== */
.section-title {
  margin: 20px;
  text-align: center;
}

/* ============================== HERO ============================== */
.home-buyer__hero {
  max-width: 1400px;
  margin: 0 auto 140px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: center;
}

.home-buyer__intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-buyer__title-block h1 {
  font-size: clamp(2.8rem, 4vw, 3.8rem);
  line-height: 1.05;
  margin-bottom: 20px;
}

.home-buyer__title-block h2 {
  font-size: clamp(1.3rem, 1.8vw, 1.6rem);
  font-weight: 500;
  opacity: 0.85;
}

.home-buyer__image img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 50px 120px rgba(0, 0, 0, 0.65);
  transition: transform 0.8s ease;
}

.home-buyer__image img:hover {
  transform: scale(1.03);
}

@media (max-width: 900px) {
  .home-buyer__hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* Highlight tagline */
.highlight {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, #10b981, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 20px 0;
}

.cta-tagline {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 30px;
}

/* FINAL CTA */
.final-cta {
  text-align: center;
  margin: 100px auto 0;
  padding: 80px 40px;
  max-width: 900px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(24px);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.final-cta:hover {
  transform: translateY(-10px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}

html[data-theme="light"] .final-cta {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.final-cta__main {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
  background: linear-gradient(90deg, var(--white), #e2e8f0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="light"] .final-cta__main {
  background: linear-gradient(90deg, #1a1a1a, #3a3a3a);
}

.final-cta__sub {
  font-size: 1.3rem;
  opacity: 0.9;
  color: var(--black);
}

html[data-theme="light"] .final-cta__sub {
  color: #333;
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 991px) {
  .timeline-step {
    width: 100%;
    text-align: center !important;
    padding: 20px 20px;
  }

  .timeline-step.left,
  .timeline-step.right {
    left: 0;
  }

  .timeline-step .step-number-circle {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
  }

  .step-card {
    display: block;
    max-width: 100%;
  }

  .home-buyer__hero {
    flex-direction: column;
  }
}

/* ============================== MEDIA QUERIES ============================== */
@media (max-width: 992px) {
  .home-buyer__hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }

  .home-buyer__intro {
    text-align: center;
  }

  .steps-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .home-buyer {
    padding: 0px 20px;
  }

  .step-detail {
    text-align: left;
    align-items: flex-start;
  }

  .step-header {
    justify-content: center;
    text-align: center;
    flex-direction: column;
  }

  .step-number-circle {
    margin: 0;
  }
}

/* ============================== TEAM SECTION ============================== */
.team-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  max-width: 1300px;
  margin: 40px auto 20px;
}

/* ============================== TEAM CARD ============================== */
.team-card {
  display: flex;
  align-items: stretch;
  gap: 28px;
  background: rgba(18, 18, 18, 0.55);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0;
  backdrop-filter: blur(18px) saturate(1.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3), inset 0 2px 6px rgba(255, 255, 255, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), inset 0 2px 8px rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
}

/* ============================== TEAM IMAGE ============================== */
.team-card .team-image {
  flex: 0 0 40%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  align-content: center;
  border-radius: 20px 0 0 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}


.team-card:hover .team-image {
  box-shadow: 0 0 35px rgba(78, 205, 196, 0.6);
  transform: scale(1.03);
}

.team-card .team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.team-card:hover .team-image img {
  transform: scale(1.1);
}

/* Email button wrapper */
.team-email-overlay {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease;
  z-index: 3;
  cursor: pointer;
}

/* Reveal only on card hover (does NOT affect image hover effects) */
.team-card:hover .team-email-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Email button matches contact card styling */
.team-email-overlay .icon-box {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(120, 120, 120, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

/* Hover effect matching contact card */
.team-email-overlay:hover .icon-box {
  background: var(--accent);
  color: #000;
  transform: scale(1.15) rotate(8deg);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}


/* ============================== TEAM INFO ============================== */
.team-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  justify-content: center;
}

.team-text h3 {
  margin: 0 0 6px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
}

.team-text h4 {
  font-size: 0.92rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin-bottom: 12px;
  font-weight: 600;
}

/* ============================== LIGHT MODE ============================== */
html[data-theme="light"] .team-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.15),
    inset 0 1px 5px rgba(255, 255, 255, 0.4);
}

html[data-theme="light"] .team-card:hover {
  border-color: var(--accent);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.22),
    inset 0 2px 8px rgba(255, 255, 255, 0.5);
}

html[data-theme="light"] .team-card .team-image {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* Light mode support */
html[data-theme="light"] .team-email-overlay .icon-box {
  background: rgba(255, 255, 255, 0.7);
  color: #111;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .team-email-overlay:hover .icon-box {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* ============================== SAFE ANIMATION DEFAULT ============================== */
.animate-on-scroll {
  opacity: 1;
  transform: none;
}

.js .animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================== MOBILE ============================== */
@media (max-width: 768px) {
  .team-card {
    flex-direction: column;
    gap: 0;
    text-align: center;
  }

  .team-card .team-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px 16px 0 0;
  }

  .team-text {
    padding: 32px 28px 40px;
    justify-content: flex-start;
  }

  .team-text h3 {
    font-size: 1.4rem;
  }

  .team-text h4 {
    font-size: 0.88rem;
  }
}

/* Rest of your styles (about-cta etc.) remain unchanged */


.glass-panel h2 {
  font-size: var(--h2-size);
  color: var(--accent);
  margin-bottom: 30px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.glass-panel p {
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.about-cta {
  margin-top: 20px;
  padding: 20px 20px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.about-cta p {}

.about-cta p:last-of-type {
  opacity: 0.9;
}

.about-cta .btn--accent {
  padding: 1rem 2.8rem;
  font-size: 1.1rem;
}

/* ============================== ABOUT PALAWAN ============================== */
.about-palawan {
  padding: 120px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-title h1 {
  margin-bottom: 10px;
  -webkit-font-smoothing: antialiased;
}

.section-title h2 {
  font-weight: 500;
  opacity: 0.85;
  -webkit-font-smoothing: antialiased;
}

.palawan-content {
  display: block;
  /* Removed grid */
  margin: 0 auto 40px;
  text-align: center;
  /* Center content */
}

/* CRITICAL: allow grid children to shrink on mobile */
.palawan-content>* {
  min-width: 0;
}

.palawan-text {
  max-width: none;
  /* Full width */
  margin-bottom: 20px;
  min-width: 0;
  /* defensive, explicit */
}


/* ============================== PALAWAN ACCORDION ============================== */
.palawan-accordion {
  margin-top: 2rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.4s cubic-bezier(.2, .9, .2, 1);
  position: sticky;
  top: 40px;
}

.palawan-accordion:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.accordion-heading {
  margin: 0;
  padding: 1.4rem 1.8rem;
  font-weight: 700;
  color: var(--white);
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}

html[data-theme="light"] .palawan-accordion {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

html[data-theme="light"] .palawan-accordion:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.accordion-item {
  border-bottom: 1px solid var(--glass-border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-trigger {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.8rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  position: relative;
  user-select: none;
}

.accordion-trigger:hover {
  background: var(--glass-hover);
  color: var(--accent);
}

html[data-theme="light"] .accordion-trigger {
  background: transparent;
  color: #222;
}

html[data-theme="light"] .accordion-trigger:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.accordion-trigger::-webkit-details-marker,
.accordion-trigger::marker {
  display: none;
}

.accordion-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.35s var(--transition);
  flex-shrink: 0;
  color: var(--accent);
}

details[open] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  padding: 0 1.8rem 1.6rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--black);
  animation: slideDown 0.4s ease-out;
}

html[data-theme="light"] .accordion-panel {
  color: #333;
}

.accordion-panel p {
  margin: 0;
}

details {
  overflow: hidden;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }

  to {
    opacity: 1;
    max-height: 500px;
  }
}

/* ============================== PALAWAN GALLERY ============================== */
/* ============================== PALAWAN GALLERY (HORIZONTAL SCROLL) ============================== */
.palawan-gallery-wrapper {
  position: relative;
  width: calc(100% + 80px);
  margin-left: -40px;
  margin-right: -40px;
  max-width: none;
  /* Breakout of container-glass padding */
  --card-width: 200px;
  --card-height: 300px;
  --gap: 24px;
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.palawan-gallery {
  display: flex !important;
  /* Force flex over grid */
  overflow-x: auto;
  /* Horizontal scroll */
  overflow-y: hidden;
  overflow-y: hidden;
  gap: var(--gap);
  /* Start items 40px from edge, but allow scrolling to edges */
  padding: 40px 20px 0px 20px;
  scroll-padding-left: 40px;
  /* scroll-snap-type removed to fix jitter/flicker during infinite loop jumps */
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */
  /* Momentum scrolling */
  -webkit-overflow-scrolling: touch;
}

/* Fallback for smaller screens regarding padding */
@media (max-width: 1240px) {
  .palawan-gallery {
    padding: 40px 20px 60px 20px;
  }
}

.palawan-gallery:active {}

/* Custom Scroll Cursors - Scroll Icons */
.palawan-gallery.cursor-prev {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));"><circle cx="12" cy="12" r="10"></circle><polyline points="12 8 8 12 12 16"></polyline><line x1="16" y1="12" x2="8" y2="12"></line></svg>') 24 24, w-resize;
}

.palawan-gallery.cursor-next {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));"><circle cx="12" cy="12" r="10"></circle><polyline points="12 16 16 12 12 8"></polyline><line x1="8" y1="12" x2="16" y2="12"></line></svg>') 24 24, e-resize;
}

.palawan-gallery .gallery-item {
  cursor: inherit;
}

.palawan-gallery .gallery-item img {
  cursor: inherit;
}

.palawan-gallery::-webkit-scrollbar {
  display: none;
}

.palawan-gallery .gallery-item {
  flex: 0 0 var(--card-width);
  height: var(--card-height);
  width: var(--card-width);
  /* scroll-snap-align removed to fix jitter */
  scroll-snap-align: none;
  position: relative;
  border-radius: 20px;
  /* Slightly softer curve like Apple */
  overflow: hidden;
  background: var(--glass-bg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  /* Apple easing */

  /* Reset grid properties just in case */
  grid-column: auto !important;
  grid-row: auto !important;
}

/* Hover Effect - Lift & Scale */
.palawan-gallery .gallery-item:hover {
  transform: scale(1.04) translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.palawan-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.palawan-gallery .gallery-item:hover img {
  transform: scale(1.08);
  /* Subtle zoom */
}

/* Overlay gradient refined [BLACK OVERLAY] */
.palawan-gallery .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.95) 0%,
      rgba(0, 0, 0, 0.8) 40%,
      rgba(0, 0, 0, 0.4) 70%,
      rgba(0, 0, 0, 0) 100%);
  /* Darker gradient for better contrast */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  color: white !important;
  /* Force white text */
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.palawan-gallery .gallery-overlay h3 {
  font-size: 1.6rem;
  font-weight: 700;
  transform: translateY(10px);
  transition: transform 0.4s ease;
  color: var(--white) !important;
  /* Force white */
  opacity: 1 !important;
  margin-bottom: 4px;
}

.palawan-gallery .gallery-overlay p {
  font-size: 1rem;
  transform: translateY(10px);
  transition: transform 0.4s ease 0.05s;
  color: var(--white) !important;
  /* Force white */
  opacity: 1 !important;
  margin-top: 0;
}

.palawan-gallery .gallery-item:hover .gallery-overlay h3,
.palawan-gallery .gallery-item:hover .gallery-overlay p {
  transform: translateY(0);
}

/* ============================== SCROLL NAVIGATION (ARROWS) ============================== */
.scroll-arrow {
  position: absolute;
  top: 50%;
  /* Vertically centered relative to wrapper */
  transform: translateY(-50%) scale(0.9);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(40, 40, 40, 0.6);
  /* Semi-transparent dark for contrast */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.scroll-arrow i {
  font-size: 1.2rem;
}

.scroll-arrow.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.scroll-arrow:hover {
  background: rgba(60, 60, 60, 0.8);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.scroll-prev {
  left: 30px;
}

.scroll-next {
  right: 30px;
}

/* ============================== RESPONSIVE = [MODIFIED] ============================== */
@media (max-width: 768px) {
  .palawan-gallery-wrapper {
    width: calc(100% + 80px);
    margin-left: -40px;
    margin-right: -40px;
    --card-width: 280px;
    --card-height: 400px;
    --gap: 16px;
  }

  .palawan-gallery {
    padding: 20px 0 40px 40px;
    scroll-padding-left: 40px;
  }

  /* Hide navigation arrows on mobile */
  .scroll-arrow {
    display: none !important;
  }
}

/* Mobile Breakpoint for container-glass padding (22px) */
@media (max-width: 640px) {
  .palawan-gallery-wrapper {
    width: calc(100% + 44px);
    margin-left: -22px;
    margin-right: -22px;
  }

  .palawan-gallery {
    padding-left: 42px;
    padding-right: 42px;
    scroll-padding-left: 42px;
  }
}

.palawan-gallery .gallery-item {
  scroll-snap-align: start;
  /* Standard mobile snapping */
}

/* Hide arrows on mobile */
.scroll-arrow {
  display: none !important;
}

.palawan-gallery .gallery-overlay {
  opacity: 1;
  /* Always show overlay text on mobile */
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
}

.palawan-gallery .gallery-overlay h3,
.palawan-gallery .gallery-overlay p {
  transform: none;
}
}


/* ============================== LIGHT MODE ============================== */
/* Consolidated Palawan gallery styles into a single high-contrast design for both themes. */

/* ============================== PALAWAN LIGHTBOX FULLSCREEN ============================== */
#palawan-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--glass-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 99999;
  /* VERY high to overlay header/nav */
  overflow: hidden;
  /* prevents scrollbars */
}

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

/* Centered image */
#palawan-lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 20px;
  box-shadow: 0 60px 120px rgba(0, 0, 0, 0.95);
  transform: scale(0.95);
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1);
}

#palawan-lightbox.open #palawan-lightbox-img {
  transform: scale(1);
}

/* Caption */
.lightbox-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  text-align: center;
  max-width: 80%;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#palawan-lightbox.open .lightbox-caption,
#inspections-lightbox.open .lightbox-caption {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
  overflow: hidden;
}

/* Light mode */
html[data-theme="light"] #palawan-lightbox {
  background: var(--glass-bg);
}

html[data-theme="light"] #palawan-lightbox-img {
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .lightbox-caption h3,
html[data-theme="light"] .lightbox-caption p {
  color: #111;
  text-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
  #palawan-lightbox-img {
    max-width: 95%;
    max-height: 80%;
  }

  .lightbox-caption {
    font-size: 0.9rem;
    padding: 0 20px;
  }

  .lightbox-caption h3 {
    font-size: 1.2rem;
  }
}

/* Lightbox arrows (desktop only, theme-aware) */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(40, 40, 40, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  display: none;
  /* default hidden for mobile */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-arrow i {
  font-size: 1.2rem;
}

/* Arrow hover effect */
.lightbox-arrow:hover {
  background: rgba(60, 60, 60, 0.8);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

/* Positioning */
.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Show arrows on desktop */
@media (min-width: 769px) {
  .lightbox-arrow {
    display: flex;
  }
}

/* Light mode theme */
html[data-theme="light"] .lightbox-arrow {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.15);
  color: #111;
}

html[data-theme="light"] .lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

/* Dark mode theme */
html[data-theme="dark"] .lightbox-arrow {
  /* Uses default dark styles */
}

/* ============================== WORKS LIGHTBOX FULLSCREEN ============================== */
#works-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--glass-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 99999;
  overflow: hidden;
}

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

/* Centered image */
#works-lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 20px;
  box-shadow: 0 60px 120px rgba(0, 0, 0, 0.95);
  transform: scale(0.95);
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1);
}

#works-lightbox.open #works-lightbox-img {
  transform: scale(1);
}

/* Caption */
#works-lightbox .lightbox-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  text-align: center;
  max-width: 80%;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

#works-lightbox.open .lightbox-caption {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Prevent body scroll */
body.lightbox-open {
  overflow: hidden;
}

/* ============================== LIGHT MODE ============================== */
html[data-theme="light"] #works-lightbox {
  background: var(--glass-bg);
}

html[data-theme="light"] #works-lightbox-img {
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] #works-lightbox .lightbox-caption h3,
html[data-theme="light"] #works-lightbox .lightbox-caption p {
  color: #111;
  text-shadow: none;
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 768px) {
  #works-lightbox-img {
    max-width: 95%;
    max-height: 80%;
  }

  #works-lightbox .lightbox-caption {
    font-size: 0.9rem;
    padding: 0 20px;
  }

  #works-lightbox .lightbox-caption h3 {
    font-size: 1.2rem;
  }
}

/* ============================== ARROWS ============================== */
#works-lightbox .lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(40, 40, 40, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100000;
  user-select: none;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#works-lightbox .lightbox-arrow i {
  font-size: 1.2rem;
}

#works-lightbox .lightbox-arrow:hover {
  background: rgba(60, 60, 60, 0.8);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

#works-lightbox .lightbox-prev {
  left: 20px;
}

#works-lightbox .lightbox-next {
  right: 20px;
}

@media (min-width: 769px) {
  #works-lightbox .lightbox-arrow {
    display: flex;
  }
}

/* Theme-aware arrows */
html[data-theme="light"] #works-lightbox .lightbox-arrow {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.15);
  color: #111;
}

html[data-theme="light"] #works-lightbox .lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] #works-lightbox .lightbox-arrow {
  /* Uses default dark styles */
}




/* ============================== OUR WORK – MIXED GRID GALLERY ============================== */
.mixed-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 300px;
  gap: 20px !important;
  max-width: 1600px;
  grid-auto-flow: row;
  justify-content: start;
}


.mixed-gallery .gallery-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  will-change: transform, opacity;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(.2, .8, .2, 1), box-shadow 0.45s cubic-bezier(.2, .8, .2, 1);
}

.mixed-gallery .gallery-item:hover {
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.7);
  transform: none;
}

/* Image */
.mixed-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.mixed-gallery .gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.08) saturate(1.1);
}

/* ------------------------------------------------
   IMAGE WRAPPER FOR HOVER / FLIP ISOLATION
------------------------------------------------ */
.mixed-gallery .gallery-item .img-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  /* inherit rounding from gallery-item */
  will-change: transform;
  /* optimize for hover animation */
  transition: transform 0.8s ease;
  /* same as before */
}

.mixed-gallery .gallery-item .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(.2, .8, .2, 1), filter 0.5s ease;
}

/* Hover effect isolated to wrapper */
.mixed-gallery .gallery-item:hover .img-wrap {
  transform: none;
}

.mixed-gallery .gallery-item:hover .img-wrap img {
  transform: scale(1.06);
  filter: brightness(1.08) saturate(1.1);
}


/* Mixed layout */
.mixed-gallery .tall {
  grid-row: span 2;
}

.mixed-gallery .wide {
  grid-column: span 2;
}

/* ------------------------------------------------
   OVERLAY – CRITICAL FIX: pointer-events: none
------------------------------------------------ */
.gallery-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 20px;
  color: var(--white) !important;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  transform: translateY(10px);
}

/* Force white text even in light mode for all gallery overlays with high specificity */
.mixed-gallery .gallery-overlay h3,
.mixed-gallery .gallery-overlay p,
.mixed-gallery .gallery-overlay span,
.palawan-gallery .gallery-overlay h3,
.palawan-gallery .gallery-overlay p,
.palawan-gallery .gallery-overlay span {
  color: var(--white) !important;
}

.mixed-gallery .gallery-overlay h3,
.mixed-gallery .gallery-overlay p {
  color: var(--white) !important;
  margin: 0;
}

.mixed-gallery .gallery-item:hover .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}


/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 768px) {
  .mixed-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 280px;
  }

  .gallery-overlay {
    opacity: 1;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 70%, transparent 100%);
  }

  .mixed-gallery .gallery-item:hover img,
  .mixed-gallery .gallery-item:hover {
    transform: none;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .mixed-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .mixed-gallery .wide {
    grid-column: span 2;
  }

  .mixed-gallery .tall {
    grid-row: span 2;
  }
}

/* ============================== LIGHT MODE ============================== */

html[data-theme="light"] .mixed-gallery .gallery-item {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .mixed-gallery .gallery-item:hover {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .mixed-gallery img {
  filter: brightness(0.95) contrast(1.05) saturate(1.1);
  transition: transform 0.8s ease, filter 0.6s ease;
}

/* ============================== LIGHTBOX ============================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.lightbox.open {
  /* ← Changed from .active to .open (matches JS) */
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 94%;
  max-height: 94vh;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: zoomIn 0.4s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.85);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================================================
   FLIP-SAFE HIDDEN STATE — APPLE-GRADE
   ========================================================= */

.property-card.flip-hidden,
.gallery-item.flip-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* Keep geometry during FLIP */
  position: absolute;
  transform: scale(0.98);
}

/* =========================================================
   GRID CONTAINERS — REQUIRED FOR FLIP ABSOLUTE MODE
   ========================================================= */

.property-grid,
.mixed-gallery {
  position: relative;
  contain: layout style;
  min-height: 300px;
}


/* ============================== CONTACT + NEWSLETTER + MAP ============================== */
.contact-newsletter-section {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  background-image: url('../../images/contact-background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

#contact.container-glass {
  max-width: 1400px;
  margin: 40px auto;
  width: calc(100% - 80px);
}

.contact-newsletter-container {
  position: relative;
  z-index: 2;
  padding: 60px;
  background: var(--glass-bg);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.7),
    inset 0 4px 10px rgba(255, 255, 255, 0.05);
  transition: background 0.6s ease;
  overflow: hidden;
}

.contact-newsletter-container::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  pointer-events: none;
  background: linear-gradient(145deg,
      rgba(255, 255, 255, 0.06) 0%,
      transparent 40%,
      rgba(255, 255, 255, 0.03) 100%);
  z-index: 1;
}

html[data-theme="light"] .contact-newsletter-container {
  background: rgba(255, 255, 255, 0.35);
  filter: brightness(0.92) contrast(1.05) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .contact-newsletter-container::after {
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%,
      rgba(255, 255, 255, 0.2) 100%);
}

.newsletter-body {
  padding: 20px;
}

/* ============================== CONTACT CARDS ============================== */
.contact-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 18, 18, 0.55);
  backdrop-filter: blur(22px) saturate(1.8);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow:
    0 25px 80px rgba(0, 0, 0, 0.65),
    inset 0 3px 9px rgba(255, 255, 255, 0.05);
  transition: all 0.5s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.newsletter-card {
  padding: 0 !important;
}

/* MailerLite Blend Overrides */
.newsletter-card .ml-form-embedWrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

.newsletter-card .ml-form-embedHeader {
  display: block !important;
}

.newsletter-card .ml-form-embedHeader img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.newsletter-card .ml-form-embedBody,
.newsletter-card .ml-form-successBody {
  padding: 24px 30px !important;
}

.newsletter-card .ml-form-embedContent h2 {
  color: #fff !important;
  font-family: inherit !important;
  font-size: 1.5rem !important;
  margin-bottom: 15px !important;
  line-height: 1.3 !important;
  font-weight: 600 !important;
}

/* Success Message Styling */
.newsletter-card .ml-form-successContent h2 {
  color: var(--accent) !important;
  font-family: inherit !important;
  font-size: 1.8rem !important;
  margin-bottom: 10px !important;
  font-weight: 700 !important;
}

.newsletter-card .ml-form-successContent h3 {
  color: #fff !important;
  font-family: inherit !important;
  font-size: 1.2rem !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}

html[data-theme="light"] .newsletter-card .ml-form-successContent h3,
html[data-theme="light"] .newsletter-card .ml-form-embedContent h2 {
  color: #1e293b !important;
}

/* Match MailerLite button to .btn style */
#mlb2-34337454.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button[type="submit"],
.newsletter-card .ml-form-embedSubmit button.btn,
.newsletter-card .ml-form-embedSubmit button.primary {
  background: var(--accent) !important;
  padding: 0.9rem 2.2rem !important;
  border-radius: 20px !important;
  text-transform: uppercase !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  cursor: pointer !important;
  transition: transform 0.25s ease, background 0.35s ease, box-shadow 0.35s ease !important;
  width: 100% !important;
  height: auto !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Ensure loading button is absolutely hidden unless active */
#mlb2-34337454.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button.loading,
.newsletter-card .ml-form-embedSubmit button.loading {
  display: none !important;
}

.newsletter-card .ml-form-embedSubmit button:hover {
  transform: translateY(-2px) !important;
  background: var(--accent-hover, #ffae00) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

/* Theme Awareness for Newsletter Text */
html[data-theme="light"] .newsletter-card .ml-form-successContent h3,
html[data-theme="light"] .newsletter-card .ml-form-embedContent h2,
html[data-theme="light"] .newsletter-card .ml-form-embedContent p {
  color: #1e293b !important;
}

html[data-theme="light"] .contact-card {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(244, 196, 48, 0.28);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px);
}

.contact-card:not(.contact-card-premium):not(.contact-map):hover {
  transform: none;
  box-shadow: var(--shadow-lg);
}

html[data-theme="light"] .contact-card:not(.contact-card-premium):not(.contact-card-map):hover {
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

/* ============================== MAP ============================== */
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 480px;
  display: block;
  border: 0;
}

/* ============================== NEWSLETTER CARD — TRANSITION EFFECTS ============================== */
.newsletter-card {
  display: flex;
  flex-direction: column;
  background: rgba(18, 18, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0;
  backdrop-filter: blur(18px) saturate(1.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3), inset 0 2px 6px rgba(255, 255, 255, 0.1);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  overflow: hidden;
}

.newsletter-card:hover {
  transform: none;
  box-shadow: var(--shadow-lg);
}

.newsletter-card .ml-form-embedWrapper {
  background: transparent !important;
  border-radius: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
}

.newsletter-card .ml-form-embedHeader,
.newsletter-card .ml-form-embedContent {
  display: none !important;
}

.newsletter-card .ml-form-embedImage {
  display: none !important;
}

.newsletter-card .ml-form-embedHeader img {
  border-radius: 20px 20px 0 0;
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.95;
  transition: transform 0.6s ease, box-shadow 0.4s ease;
}

.newsletter-card:hover .ml-form-embedHeader img {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(78, 205, 196, 0.1);
}

.newsletter-card .ml-form-embedBody,
.newsletter-card .ml-form-successBody {
  padding: 24px 24px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.4s ease;
}

.newsletter-card input.form-control {
  width: 100% !important;
  padding: 22px 26px !important;
  box-sizing: border-box;
  font-size: 18px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #fff !important;
  margin-bottom: 10px !important;
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease, transform 0.4s ease;
}

html[data-theme="light"] .newsletter-card input.form-control {
  background: rgba(255, 255, 255, 0.75) !important;
  color: #111 !important;
  border-color: var(--accent) !important;
}

.newsletter-card button.primary {
  position: relative;
  width: 100% !important;
  padding: 0.9rem 2.2rem !important;
  border-radius: 8px !important;
  text-transform: uppercase;
  background: var(--accent) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: white !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.35s ease, box-shadow 0.35s ease;
  backdrop-filter: blur(18px);
}

.newsletter-card button.primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%);
  opacity: 0.55;
  pointer-events: none;
}

.newsletter-card button.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(120% 190% at 50% -50%, rgba(255, 255, 255, 0.45), transparent 60%);
  pointer-events: none;
  opacity: 0.4;
}

.newsletter-card button.primary:hover {
  transform: translateY(-2px) scale(1.015) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.40), inset 0 1px 2px rgba(255, 255, 255, 0.45), inset 0 -2px 4px rgba(0, 0, 0, 0.28) !important;
  background: var(--accent) !important;
}

.newsletter-card button.primary:active {
  transform: translateY(1px) scale(0.98) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 -2px 6px rgba(255, 255, 255, 0.25) !important;
}

/* ============================== PREMIUM CARD ============================== */
.contact-card-premium {
  padding: 0 10px 0 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  text-align: left !important;
  background: rgba(20, 20, 20, 0.60);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 35px 100px rgba(0, 0, 0, 0.75),
    inset 0 3px 9px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(26px) saturate(1.9);
}

/* ============================== CONTACT ROW LAYOUT (3 Cards Grid) ============================== */
.contact-cards-grid {
  display: grid;
  gap: 40px;
  margin: 40px;
  align-items: stretch;
}

/* Desktop: 3 columns */
@media (min-width: 992px) {
  .contact-cards-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
  .contact-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================== CONTACT ROW (Individual Contact Item: Icon + Text) ============================== */
.contact-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px;
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.contact-row:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .contact-row:hover {
  background: rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.contact-row:hover .icon-box {
  background: var(--accent);
  color: #000;
  transform: scale(1.15) rotate(8deg);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* ============================== ICON BOX ============================== */
.icon-box {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 26px;
  color: #fff;
  transition: all 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .icon-box {
  background: rgba(255, 255, 255, 0.7);
  color: #111;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ============================== TEXT CONTENT (Label + Value) ============================== */
.contact-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 6px;
  flex: 1;
}

.contact-text .label {
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

html[data-theme="light"] .contact-text .label {
  color: #666;
}

.contact-text .value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  word-break: break-word;
}

html[data-theme="light"] .contact-text .value {
  color: #111;
}

.contact-text .value a {
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.contact-text .value a:hover {
  color: var(--accent);
}

/* Special styling for hours */
.contact-row .hours p {
  margin: 4px 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

html[data-theme="light"] .contact-row .hours p {
  color: #333;
}

.contact-row .hours .closed {
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.5px;
}

/* ============================== RESPONSIVE TWEAKS ============================== */
@media (max-width: 768px) {
  .contact-newsletter-container {
    padding: 40px 24px;
  }

  .contact-row {
    padding: 18px;
    gap: 20px;
  }

  .icon-box {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .contact-text .value {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .contact-newsletter-container {
    padding: 30px 20px;
  }

  .contact-text .value {
    font-size: 1rem;
  }

  .contact-text .label {
    font-size: 0.8rem;
  }
}

/* ============================== SOFT SILICONE LIQUID BUTTON ============================== */
.btn-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.modal-btn-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.modal-btn-grid .btn:last-child {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .modal-btn-grid {
    grid-template-columns: 1fr;
  }

  .modal-btn-grid .btn:last-child {
    grid-column: span 1;
  }
}

.btn {
  position: relative;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  /* Keep rectangular shape */
  text-transform: uppercase;

  /* Telegram-like Base Style */
  background: #7f0dfb;
  border: 3px solid rgba(255, 255, 255, 0.2);
  color: white !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.2, .9, .2, 1);
  /* Match var(--transition) */
  z-index: 1;
}

/* Force white text in buttons regardless of theme */
html[data-theme="light"] .btn,
html[data-theme="dark"] .btn {
  color: white !important;
}

/* Remove old glass gradients if we want purely flat/fab style, 
   but telegram-fab usually relies on solid color + border. 
   I will remove the old ::before/::after to be safe and clean. */
.btn::before,
.btn::after {
  display: none;
}

.btn:hover {
  background: #006699;
  transform: scale(1.08);
  box-shadow: 0 16px 40px rgba(0, 136, 204, 0.5);
  color: white !important;
}

.btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.btn--accent {
  border-color: rgba(244, 196, 48, 0.7);
  background: rgba(244, 196, 48, 0.12);
}

.btn--accent:hover {
  background: var(--accent);
  box-shadow:
    0 0 25px rgba(244, 196, 48, 0.45),
    0 10px 32px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.btn--accent:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 4px 15px rgba(0, 0, 0, 0.35),
    inset 0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 -2px 6px rgba(255, 255, 255, 0.25);
  background: rgba(244, 196, 48, 0.25);
}

.minimal-gloss {
  width: 200px;
  height: 200px;
  background: white;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.minimal-gloss::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 45%;
  background: linear-gradient(to bottom,
      rgba(255, 255, 255, 0.7),
      rgba(255, 255, 255, 0.05));
  pointer-events: none;
}

/* ============================== FOOTER ============================== */
footer {
  padding: 40px;
  background: var(--black);
}

@media (max-width: 640px) {
  footer {
    max-width: 100%;
  }
}

html[data-theme="light"] .footer {
  background: var(--white);
}

/* ============================== FOOTER CONTENT ============================== */
footer p {
  font-size: var(--h5-size);
  font-weight: 500;
}

/* ============================== FLOATING ACTION BUTTONS ============================== */
.fab-row {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  gap: 12px;
  z-index: 998;
}

.whatsapp-fab,
.messenger-fab,
.telegram-fab {
  right: 24px;
  bottom: 24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff !important;
  /* FORCE white */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: all var(--transition);
  z-index: 998;
  backdrop-filter: blur(10px);
}

.whatsapp-fab {
  background: #25D366;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.whatsapp-fab:hover {
  background: #128C7E;
  transform: scale(1.08);
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.5);
  color: #fff !important;
  /* Keep white on hover */
}

.messenger-fab {
  right: 96px;
  background: #0084FF;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.messenger-fab:hover {
  background: #0066CC;
  transform: scale(1.08);
  box-shadow: 0 16px 40px rgba(0, 132, 255, 0.5);
  color: #fff !important;
  /* Keep white on hover */
}

.telegram-fab {
  right: 168px;
  background: #0088cc;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.telegram-fab:hover {
  background: #006699;
  transform: scale(1.08);
  box-shadow: 0 16px 40px rgba(0, 136, 204, 0.5);
  color: #fff !important;
}

/* LIGHT THEME OVERRIDES */
html[data-theme="light"] .whatsapp-fab,
html[data-theme="light"] .messenger-fab,
html[data-theme="light"] .telegram-fab {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  color: #fff !important;
  /* enforce white in light mode */
}

html[data-theme="light"] .whatsapp-fab:hover {
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.4);
  color: #fff !important;
}

html[data-theme="light"] .messenger-fab:hover {
  box-shadow: 0 16px 40px rgba(0, 132, 255, 0.4);
  color: #fff !important;
}

/* MOBILE */
@media (max-width: 480px) {

  .whatsapp-fab,
  .messenger-fab,
  .telegram-fab {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  .messenger-fab {
    right: 84px;
  }
}

/* DONT SELECT TEXT */
.no-select {
  -webkit-user-select: none;
  /* Safari */
  -ms-user-select: none;
  /* old Edge */
  user-select: none;
}







/* Nav Avatar */
.nav-avatar,
.nav-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 20%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Subtle default border */
  transition: all 0.3s ease;
  cursor: pointer;
  color: var(--white);
  text-decoration: none;
  margin: 20px 0px;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.nav-avatar:hover,
.nav-icon-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.05);
}

.nav-avatar i {
  font-size: 18px;
  color: var(--white);
  transition: color 0.3s ease;
}

.nav-avatar:hover i {
  color: var(--accent);
}

html[data-theme="light"] .nav-avatar,
html[data-theme="light"] .nav-icon-link {
  color: #222;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .nav-avatar i,
html[data-theme="light"] .nav-icon-link i {
  color: #222;
}

html[data-theme="light"] .nav-avatar:hover i,
html[data-theme="light"] .nav-icon-link:hover i {
  color: var(--accent);
}

/* ============================== DASHBOARD STYLES ============================== */
:root {
  --dash-bg: #f4f6f8;
  --dash-card-bg: var(--white);
  --dash-text: #333333;
  --dash-border: #eeeeee;
  --dash-header-bg: var(--white);
}

[data-theme="dark"] {
  --dash-bg: #1a1f2c;
  --dash-card-bg: #2e3842;
  --dash-text: #eeeeee;
  --dash-border: #444444;
  --dash-header-bg: #2e3842;
}

body,
body.is-preload {
  transition: background-color 0.3s, color 0.3s;
}

body.dashboard-page::before {
  display: block;
  /* Ensure site background layer is active */
}

.dashboard-header {
  background: var(--dash-header-bg);
  padding: 1px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-sizing: border-box;
}

.dashboard-logo img {
  height: 60px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-logout {
  background: none;
  border: 1px solid var(--dash-border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--dash-text);
  transition: all 0.2s;
}

.btn-logout:hover {
  border-color: #ed786a;
  color: #ed786a;
}

.btn-add-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #4f46e5;
  color: white !important;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-right: 0.5rem;
}

.btn-add-nav:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-add-nav i {
  font-size: 1rem;
  color: white !important;
}

html[data-theme="light"] .btn-add-nav span {
  color: white !important;
}

@media (max-width: 768px) {
  .btn-add-nav span {
    display: none;
  }

  .btn-add-nav {
    padding: 8px;
    border-radius: 50%;
  }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  /* Dark glass */
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  padding: 0;
  color: inherit;
}

[data-theme="light"] .theme-toggle {
  background: rgba(0, 0, 0, 0.06);
  /* Light glass */
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.theme-toggle:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

[data-theme="light"] .theme-toggle:hover {
  background: rgba(78, 205, 196, 0.15);
}

.dashboard-content {
  margin-top: 80px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 2rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-header h2 {
  color: var(--dash-text);
}

.btn-add {
  background: var(--accent);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.btn-add:hover {
  background: #d65c4e;
}

/* Table Styles */
.listings-table-container {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--glass-radius, 12px);
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(255, 255, 255, 0.05), transparent 60%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
  background-clip: padding-box;
  backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.8);
  -webkit-backdrop-filter: blur(var(--glass-blur, 16px)) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.3),
    inset 0 1px 4px rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

html[data-theme="light"] .listings-table-container {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  color: var(--dash-text);
  table-layout: fixed;
}

/* Fixed column widths to prevent layout jumping */
.listings-table-container th:nth-child(1),
.listings-table-container td:nth-child(1) {
  width: 80px;
}

/* Property Name in Listings */
#listingsTableContainer th:nth-child(2),
#listingsTableContainer td:nth-child(2) {
  min-width: 200px;
  width: auto;
}

/* Details in Enquiries */
#enquiriesSection th:nth-child(3),
#enquiriesSection td:nth-child(3) {
  width: 180px;
  /* Email / Phone */
}

#enquiriesSection th:nth-child(4),
#enquiriesSection td:nth-child(4) {
  min-width: 300px;
  width: auto;
  /* Details */
}

/* Other columns */
.listings-table-container th:nth-child(5),
.listings-table-container td:nth-child(5) {
  width: 120px;
}

.listings-table-container th:nth-child(6),
.listings-table-container td:nth-child(6) {
  width: 100px;
}

/* Actions */

th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--dash-border);
}

th {
  background: var(--dash-header-bg);
  /* Slight contrast or same as card */
  font-weight: 600;
  color: var(--dash-text);
  opacity: 0.9;
}

td img {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--dash-text);
  opacity: 0.7;
  transition: color 0.2s;
}

.action-btn:hover {
  opacity: 1;
}

.action-btn.delete {
  color: #e74c3c;
  opacity: 0.7;
}

.action-btn.delete:hover {
  opacity: 1;
}

/* Status Badge */
.status-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Dashboard Table Refinements */
.listings-table-container table {
  table-layout: fixed;
  width: 100% !important;
}

.listings-table-container td:last-child {
  white-space: nowrap !important;
  text-align: right;
}

.source-icon {
  font-size: 1.25rem !important;
}

.featured-star {
  color: #d4af37 !important;
  font-size: 1.1rem;
}

.status-active {
  background: #e8f5e9;
  color: #2e7d32;
}

.status-sold {
  background: #ffebee;
  color: #c62828;
}

/* Base Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2147483647;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 2147483647 !important;
  pointer-events: auto !important;
}

.modal-content {
  background: var(--dash-card-bg);
  color: var(--dash-text);
  padding: 0;
  /* Remove padding to handle fixed footer/header better */
  border-radius: 12px;
  width: 90%;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  /* Contain footer/header */
}

/* Modal Body for scrolling content */
.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

/* Fixed Modal Footer */
.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: auto;
  position: sticky;
  bottom: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.form-group {
  margin-bottom: 1rem;
  border: none !important;
  /* Prevent dark mode spacer borders */
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--dash-border);
  border-radius: 4px;
  background: var(--dash-bg);
  color: var(--dash-text);
  box-sizing: border-box;
  /* Fix right margin overflow */
}

#closeModal,
.close-modal {
  position: relative;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--dash-text);
  line-height: 1;
  transition: transform 0.3s ease;
  z-index: 101;
}

.close-modal:hover {
  transform: scale(1.2);
}

.modal-header-premium {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(25, 25, 25, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 0;
  border-radius: 50px 50px 0 0;
}

html[data-theme="light"] .modal-header-premium {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* Premium Modal Aesthetics */
.premium-modal {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-modal.active {
  opacity: 1 !important;
}

.premium-modal .modal-content {
  background: rgba(25, 25, 25, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 90%;
  min-height: 400px;
  border-radius: 50px;
}

.premium-modal.wide .modal-content {
  max-width: 1100px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .modal-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.modal-section {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  height: fit-content;
}

html[data-theme="light"] .modal-section {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.05);
}

.modal-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-section-title i {
  color: inherit;
  opacity: 0.8;
}

.premium-modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 1rem !important;
}

html[data-theme="light"] .modal-title {
  background: none !important;
  -webkit-text-fill-color: inherit !important;
  color: inherit !important;
}

/* Gallery Thumbnails */
.thumb-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: thin;
}

.thumb-grid img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumb-grid img:hover {
  transform: translateY(-2px);
}

.thumb-grid img.active-thumb {
  border-color: #fff;
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .thumb-grid img.active-thumb {
  border-color: #000;
}

.premium-modal .modal-content {
  overflow-x: hidden !important;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

.chip {
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
}

/* Light Mode Chip Overrides */
html[data-theme="light"] .chip {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #444;
}

html[data-theme="light"] .chip:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

html[data-theme="light"] .chip.active {
  background: var(--accent);
  color: #fff;
  /* White text on accent for contrast */
  border-color: var(--accent);
}

.premium-modal .close-modal {
  position: absolute;
  right: 1.5rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ed786a;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff !important;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.premium-modal .close-modal:hover {
  transform: rotate(90deg);
}

/* ============================== EMAIL CHOICE MODAL ============================== */
#emailModalOverlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  /* Above top-bar (10001) */
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  /* Flex instead of grid for centering */
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#emailModalOverlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.email-modal-card {
  background: rgba(30, 30, 30, 0.85);
  /* Dark Glass */
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 32px;
  border-radius: 24px;
  width: min(90vw, 400px);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}

#emailModalOverlay.open .email-modal-card {
  transform: scale(1) translateY(0);
}

.email-modal-card h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
  color: #fff;
}

.email-modal-card p {
  margin-bottom: 24px;
  opacity: 0.7;
  font-size: 0.95rem;
  color: #ddd;
}

.email-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: var(--font-base, sans-serif);
}

/* Default App Button */
.btn-default-mail {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-default-mail:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Gmail Button */
.btn-gmail {
  background: #EA4335;
  color: #fff;
}

.btn-gmail:hover {
  background: #d33828;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
}

/* Copy Button */
.btn-copy {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  padding: 10px;
}

.btn-copy:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

/* Light Theme Overrides */
html[data-theme="light"] .email-modal-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .email-modal-card h3 {
  color: #111;
}

html[data-theme="light"] .email-modal-card p {
  color: #555;
}

html[data-theme="light"] .btn-default-mail {
  background: rgba(0, 0, 0, 0.05);
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .btn-default-mail:hover {
  background: rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .btn-copy {
  color: rgba(0, 0, 0, 0.5);
  border-color: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .btn-copy:hover {
  color: #111;
  border-color: rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.03);
}

/* Close Button (X) */
.email-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.5;
  padding: 4px;
}

.email-modal-close:hover {
  opacity: 1;
}

/* ============================== PALAWAN INNER CONTAINERS ============================== */
.palawan-row {
  display: flex;
  flex-direction: row;
  gap: 24px;
  width: 100%;
  margin-top: 40px;
}

.inner_container_palawan {
  flex: 1;
  min-height: 400px;
  padding: 40px;
  border-radius: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(15px) saturate(1.5);
  -webkit-backdrop-filter: blur(15px) saturate(1.5);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.inner_container_palawan:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.sunset-gradient:hover {
  background: #a9323d5c !important;
}

.ocean-gradient:hover {
  background: #2c4c915c !important;
}

.tropical-gradient:hover {
  background: #d4af375c !important;
}

/* Liquid Glass Backdrop Effect */
.inner_container_palawan::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

@keyframes liquid-glass-float {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.sunset-gradient {
  background: #a9323d36 !important;
  border-color: rgba(169, 50, 61, 0.3) !important;
}

.ocean-gradient {
  background: #2c4c9136 !important;
  border-color: rgba(44, 76, 145, 0.3) !important;
}

.tropical-gradient {
  background: #d4af3736 !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
}

.sun-icon {
  font-size: 2.5rem;
  color: #032359;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.tropical-gradient .sun-icon {
  color: #d4af37;
}

.ocean-gradient .sun-icon {
  color: #3db1bb;
}

.tropical-gradient .sun-icon {
  color: #78ffd6;
  filter: drop-shadow(0 0 10px rgba(120, 255, 214, 0.5));
}

.hero-logo-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  /* Start slightly lower */
  width: 75%;
  max-width: 320px;
  height: auto;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease-out, transform 0.3s ease;
}

.version-display {
  font-size: 0.8rem;
  opacity: 0.5;
  margin-top: 12px;
  font-family: var(--font-alt);
}

.hero-slide.active .hero-logo-overlay {
  opacity: 1;
  transform: translate(-50%, -50%);
}

@media (max-width: 991px) {
  .palawan-row {
    flex-direction: column;
  }

  .inner_container_palawan {
    min-height: auto;
  }
}

/* ============================== HALO SEPARATOR ============================== */
.halo-separator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  z-index: 5;
}

/* ============================== LOGO HALO — PREMIUM LIQUID GLASS ============================== */
.logo-halo {
  position: relative;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  overflow: visible;
  isolation: isolate;
  background: linear-gradient(122deg, #ff7e5fb8, #e6d1c0c9, #c61da1bd);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.1);
}

.halo-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.halo-content img {
  height: 240px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 15px rgba(0, 0, 0, 0.4));
}

/* ============================== DASHBOARD RESPONSIVENESS & FIXES ============================== */

/* 1. Horizontal Scroll for Tables */
.listings-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Smooth scroll on iOS */
  border-radius: 16px;
  background: var(--dash-card-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 20px;
  box-sizing: border-box;
}

.listings-table-container table {
  min-width: 800px;
  /* Force minimum width to trigger scroll on small screens */
  width: 100%;
}

/* Gallery Modal Specific */
#galleryModal {
  z-index: 2000 !important;
  display: none;
  /* Default hidden */
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 2. Modal Responsiveness */
.modal-content {
  width: 90% !important;
  margin: 10vh auto !important;
  max-height: 85vh;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .modal-content {
    margin: 5vh auto !important;
  }

  /* Prevent full-page overflow on mobile */
  .dashboard-content {
    padding: 20px 16px !important;
    overflow-x: hidden;
  }

  /* Stack form groups on mobile */
  .form-group[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* ---------------------------------------------------------
     MOBILE DASHBOARD CARD VIEW
     Transform table rows into cards for better UX
  --------------------------------------------------------- */
  .listings-table-container {
    background: inherit !important;
    /* Remove container background */
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .listings-table-container table {
    min-width: 0 !important;
    /* Prevent overflow */
  }

  .listings-table-container table,
  .listings-table-container thead,
  .listings-table-container tbody,
  .listings-table-container th,
  .listings-table-container td,
  .listings-table-container tr {
    display: block;
  }

  /* Hide Table Header */
  .listings-table-container thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  /* Hide logout text on mobile */
  .logout-text {
    display: none;
  }

  /* Allow wrapping for user email */
  #userEmail {
    white-space: normal;
    text-align: right;
    max-width: 120px;
    line-height: 1.2;
  }

  /* Dashboard Section Header (Flex + Wrapping) */
  .dashboard-section-header {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    /* Centering the title */
    gap: 20px;
    margin-top: 4rem;
    margin-bottom: 2rem;
    position: relative;
  }

  .dashboard-section-header h1 {
    margin: 0;
    line-height: 1;
    text-align: center;
  }

  @media (max-width: 600px) {
    .dashboard-section-header {
      flex-direction: column;
      justify-content: center;
      text-align: center;
      gap: 15px;
    }

    .dashboard-section-header .btn-add-icon {
      margin: 0 auto;
    }
  }

  /* Card Styling */
  .listings-table-container tbody tr {
    background: var(--dash-card-bg);
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    padding: 12px;
    width: auto !important;
    margin: 0 10px 12px 10px !important;
    box-sizing: border-box !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    display: grid;
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto auto;
    /* 3 Rows: Title, Meta, Actions/Chip */
    gap: 4px;
    /* Tighter gap */
    row-gap: 8px;
  }

  /* Light mode card override */
  html[data-theme="light"] .listings-table-container tbody tr {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  }

  /* Remove all inner borders */
  .listings-table-container td {
    border: none !important;
  }

  /* 1. Image (Thumbnail) - Spans Rows 1 & 2 on the Left */
  .listings-table-container td:nth-child(1) {
    grid-column: 1;
    grid-row: 1 / 3;
    /* Spans top two rows */
    padding: 0;
    height: 80px;
  }

  .listings-table-container td:nth-child(1) img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
  }

  /* 2. Title & Description - Row 1, Col 2 */
  .listings-table-container td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
    align-self: start;
    margin-bottom: 2px;
  }

  .listings-table-container td:nth-child(2) strong {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0px;
    color: var(--dash-text);
  }

  .listings-table-container td:nth-child(2) small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.1;
    opacity: 0.8;
  }

  /* 3. Meta Data Grid - Row 2, Col 2 */
  /* Combine Type, Price, Display, etc. */
  .listings-table-container td:nth-child(3),
  .listings-table-container td:nth-child(4),
  .listings-table-container td:nth-child(5):not(:has(.status-badge)),
  /* Exclude Listings Category Badge */
  .listings-table-container td:nth-child(6) {
    padding: 0;
    font-size: 0.8rem;
    color: var(--dash-text);
    opacity: 0.9;
    display: inline-block;
    margin-right: 8px;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  /* Special handling for Price (Listings table) */
  /* Listings: Image(1), Prop(2), Type(3), Price(4), Cat(5)... */
  #listingsSection td:nth-child(4) {
    font-weight: 600;
    color: var(--accent);
  }

  #listingsSection td:nth-child(3)::after {
    content: " •";
    opacity: 0.5;
  }

  /* 4. Category Badge & Actions - Row 3 */

  /* Category Badge - Position Bottom Left (Under Image) */
  /* Listings Table: Category is 5th child */
  #listingsSection td:nth-child(5) {
    grid-column: 1 / 3;
    /* Full width or share with actions? User said "left". */
    grid-row: 3;
    padding: 0;
    justify-self: start;
    align-self: center;
    margin-top: 4px;
    display: block !important;
    /* Ensure it overrides previous hiding rules if any */
  }

  /* Gallery Table: Category is 3rd child */
  #gallerySection td:nth-child(3) {
    grid-column: 1 / 3;
    grid-row: 3;
    padding: 0;
    justify-self: start;
    align-self: center;
    margin-top: 4px;
  }

  .status-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  /* Featured Star */
  .listings-table-container td:nth-child(6) {
    /* If this is "Featured" col, position absolutely on image */
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
    padding: 0 !important;
  }

  /* Hide if empty */
  .listings-table-container td:nth-child(6):empty {
    display: none;
  }

  /* Warning: Listings table has Featured at 6. Gallery has Display at 4? Palawan Display at 3? 
     Let's rely on standard logic - if it's the "Featured" star, it's absolute. 
     If it's "Display" checkmark (Row 2 meta), it falls into generic rule above.
  */

  /* 5. Actions - Bottom Right */
  .listings-table-container td:last-child {
    grid-column: 2;
    /* Right side of Row 3 */
    grid-row: 3;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    padding: 0 !important;
    border: none !important;
  }

  .listings-table-container .action-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    /* Restore subtle background for visibility */
    border-radius: 6px;
  }

  html[data-theme="light"] .listings-table-container .action-btn {
    background: rgba(0, 0, 0, 0.05);
  }

  /* Hide columns 7, 8 (Visits, Likes) on mobile */
  .listings-table-container td:nth-child(7),
  .listings-table-container td:nth-child(8) {
    display: none;
  }
}

/* 3. Modal Light/Dark Theme Polish */
.premium-modal .modal-content {
  background: #1a1f2c;
  /* Dark Default */
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

html[data-theme="light"] .premium-modal .modal-content {
  background: var(--white);
  border: 1px solid #e0e0e0;
  color: #333;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Inputs in Modals */
.form-control {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

html[data-theme="light"] .form-control {
  background: #f9f9f9 !important;
  border: 1px solid #ccc !important;
  color: #333 !important;
}

html[data-theme="light"] .form-control:focus {
  border-color: var(--accent) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

html[data-theme="light"] .modal-title {
  color: #111 !important;
}

html[data-theme="light"] .close-modal {
  color: #666;
}

html[data-theme="light"] .close-modal:hover {
  color: #000;
}

/* ================================================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ================================================================ */
@media (max-width: 768px) {

  /* 1. Reduce backdrop-filter intensity for smoother scrolling */
  .container-glass,
  .glass-panel,
  .modal-glass,
  .inner_container_palawan,
  .contact-newsletter-container,
  .listings-table-container {
    backdrop-filter: blur(8px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(8px) saturate(1.2) !important;
  }

  /* Remove border and shadow from container-glass on mobile */
  .container-glass {
    border: none !important;
    box-shadow: none !important;
  }

  /* Set margin for contact-cards-grid on mobile */
  .contact-cards-grid {
    margin: 10px !important;
  }

  /* 2. Disable expensive radial-gradient animations on mobile */
  .inner_container_palawan::before,
  .logo-halo::before,
  .hero-learn-more::before {
    animation: none !important;
  }

  /* 3. Simplify complex background gradients for faster paint */
  .listings-table-container {
    background: var(--dash-card-bg) !important;
  }

  /* 4. Optimize image rendering */
  img {
    content-visibility: auto;
  }
}

/* 5. Prevent "Sticky" hover states on touch devices */
@media (hover: none) {

  .btn:hover,
  .nav-btn:hover,
  .filter:hover,
  .action-btn:hover,
  .gallery-item:hover .gallery-overlay {
    transform: none !important;
    background: inherit !important;
    opacity: 1 !important;
  }
}

/* ============================== DARK MODE TEXT FIXES ============================== */
/* Force white text for dynamic card content in dark mode (Services & How It Works) */
html:not([data-theme="light"]) .services-display .card-content p,
html:not([data-theme="light"]) .services-display .card-content h2,
html:not([data-theme="light"]) .how-it-works-display .card-content p,
html:not([data-theme="light"]) .how-it-works-display .card-content h2,
html:not([data-theme="light"]) .card.full-width .card-content p,
html:not([data-theme="light"]) .card.full-width .card-content h2 {
  color: var(--white) !important;
  opacity: 1 !important;
}

/* Profile Page Specific Styles */
.profile-content-wrapper {
  margin-top: 100px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 100px);
}

.profile-card {
  width: 100%;
  max-width: 800px;
  background: var(--glass-bg, rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
  animation: fadeInDown 0.6s ease-out;
}

[data-theme="light"] .profile-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.avatar-upload-container {
  position: relative;
}

.profile-avatar-large {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent);
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 0.3s;
  cursor: pointer;
  font-size: 0.9rem;
  gap: 5px;
}

.avatar-overlay:hover {
  opacity: 1;
}

.avatar-overlay i {
  font-size: 1.5rem;
}

.profile-title-section h1 {
  /* Default font weights and sizes will apply */
}

[data-theme="light"] .profile-title-section h1 {
  color: var(--black);
}

.profile-title-section p {
  margin: 0;
}

[data-theme="light"] .profile-title-section p {
  color: var(--black);
}

.profile-form .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.profile-form label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
  opacity: 0.9;
  font-weight: 700;
  color: var(--white);
  /* White in dark mode */
}

[data-theme="light"] .profile-form label {
  color: var(--black);
}

.form-helper {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.6;
  color: var(--white);
}

[data-theme="light"] .form-helper {
  color: var(--black);
}

.profile-form .form-control {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.1rem;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s;
}

[data-theme="light"] .profile-form .form-control {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
}

.profile-form .form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb, 78, 205, 196), 0.15);
  outline: none;
}

.btn-save-profile {
  background: var(--accent);
  color: white;
  border: none;
  padding: 1.2rem 3rem;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 20px rgba(var(--accent-rgb, 78, 205, 196), 0.2);
}

.btn-save-profile:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(var(--accent-rgb, 78, 205, 196), 0.3);
}

.btn-save-profile:active {
  transform: translateY(0);
}

.status-message {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.95rem;
  min-height: 24px;
}

.status-message.success {
  color: #51cf66;
}

.status-message.error {
  color: #ff6b6b;
}

.btn-back-dash {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  width: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--dash-text);
  transition: all 0.3s;
}

.btn-back-dash:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .profile-header-main {
    flex-direction: column;
    text-align: center;
  }

  .profile-card {
    padding: 2rem 1.5rem;
  }
}

.profile-secondary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 3rem;
}

[data-theme="light"] .profile-secondary-grid {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.secondary-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
}

[data-theme="light"] .secondary-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.secondary-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.secondary-card h3 {
  margin: 0;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.secondary-card i {
  color: var(--accent);
  font-size: 1.2rem;
}

.asset-list .empty-msg {
  font-size: 0.85rem;
  opacity: 0.5;
  margin: 0;
  text-align: center;
  padding: 1rem;
}

/* ============================== SNACKBAR COMPONENT ============================== */
.snackbar-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.snackbar {
  pointer-events: auto;
  min-width: 280px;
  max-width: 450px;
  background: #1a1a1a;
  color: #ffffff;
  padding: 14px 16px 14px 22px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  animation: snackbar-slide-in 0.4s cubic-bezier(0.2, 0.9, 0.2, 1.25);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.snackbar.fade-out {
  opacity: 0;
  transform: translateX(40px);
}

@keyframes snackbar-slide-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.snackbar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
}

/* Status Types */
.snackbar.success::before {
  background: #4CAF50;
}

.snackbar.error::before {
  background: #F44336;
}

.snackbar.info::before {
  background: #2196F3;
}

.snackbar.warning::before {
  background: #FF9800;
}

.snackbar-content {
  flex: 1;
  margin-right: 15px;
  line-height: 1.4;
  font-weight: 500;
}

.snackbar-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
  line-height: 1;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.snackbar-close:hover {
  color: #ffffff;
  transform: scale(1.1);
}

@media (max-width: 480px) {
  .snackbar-container {
    right: 10px;
    left: 10px;
    top: 10px;
  }

  .snackbar {
    min-width: 0;
    max-width: none;
  }
}

/* Spinner Loader */
.loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-save-profile {
  position: relative;
  min-width: 200px;
  /* Ensure button doesn't jump */
  min-height: 54px;
  /* Fix vertical shrinking */
}

.btn-save-profile .loader {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -10px;
}

/* ============================== CLIENT DASHBOARD ============================== */
.client-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
  gap: 2rem;
}

.client-card {
  padding: 2.5rem;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}

/* Override container-glass layout for the dashboard grid */
.client-dash-grid .container-glass {
  width: 100%;
  margin: 0;
  max-width: none;
  border-radius: 16px;
  min-height: 100%;
}

.client-card h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-card h2 i {
  color: var(--accent);
}

/* Milestone Timeline */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
}

html[data-theme="light"] .timeline::before {
  background: rgba(0, 0, 0, 0.1);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.timeline-item.completed::before {
  background: #4CAF50;
  box-shadow: 0 0 10px #4CAF50;
}

.timeline-item h4 {
  margin: 0 0 0.2rem 0;
  font-size: 1rem;
}

.timeline-item p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.6;
}

/* Payment Table */
.payment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.payment-table th,
.payment-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  line-height: 1.4;
}

.payment-table td:first-child {
  padding-left: 0;
  max-width: 200px;
}

.payment-table td:last-child {
  text-align: left;
}

html[data-theme="light"] .payment-table th,
html[data-theme="light"] .payment-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.status-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 10px;
}

.status-paid {
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
}

.status-pending {
  background: rgba(255, 152, 0, 0.1);
  color: #FF9800;
}

/* --- Inspections Lightbox Customizations --- */
#inspections-lightbox .lightbox-caption {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  padding: 25px 35px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  min-width: min(90%, 500px);
  color: white;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
  z-index: 1001;
  opacity: 0;
}

#inspections-lightbox.open .lightbox-caption {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.caption-content h3 {
  margin: 0 0 10px 0;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.inspection-notes {
  margin: 0 0 15px 0;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.9;
}

.inspection-date {
  font-size: 0.8rem;
  opacity: 0.5;
  font-weight: 500;
  display: block;
}

@media (max-width: 768px) {
  .client-card {
    padding: 1.5rem;
  }

  .client-dash-grid {
    gap: 1.5rem;
  }

  #inspections-lightbox .lightbox-caption {
    width: 95%;
    bottom: 20px;
    padding: 20px;
  }
}

/* ============================== FLOATING SEARCH UI ============================== */
.search-fab {
  position: fixed;
  top: 140px;
  /* Below header */
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg-glass);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--white);
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 0.8;
}

.search-fab:hover {
  transform: scale(1.1);
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}

/* Hide search FAB on mobile */
@media (max-width: 1024px) {
  .search-fab {
    display: none !important;
  }
}

.search-container {
  position: fixed;
  top: 100px;
  right: 84px;
  /* Left of the FAB */
  background: var(--white) !important;
  /* High contrast white */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-container.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.search-input {
  background: #f0f0f0;
  /* Light grey input */
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  color: #333;
  /* Dark text */
  font-family: inherit;
  font-size: 14px;
  width: 200px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--accent);
  background: #fff;
}

.search-nav-btn {
  background: none;
  border: none;
  color: #666;
  /* Muted dark */
  cursor: pointer;
  padding: 5px;
  font-size: 14px;
  transition: color 0.2s;
}

.search-nav-btn:hover {
  color: var(--accent);
}

.search-close {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-close:hover {
  color: #ff4444;
  transform: scale(1.1);
}

.search-count {
  font-size: 12px;
  color: #666;
  /* Muted dark */
  min-width: 40px;
  text-align: center;
}

.search-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: 5px;
  font-size: 16px;
}

.search-close:hover {
  color: #ff4444;
}

/* Highlight Style */
mark.search-highlight {
  background: var(--accent);
  color: #fff;
  padding: 2px 0;
  border-radius: 2px;
}

mark.search-highlight.active {
  background: #fff;
  color: #000;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  font-weight: bold;
}

/* ============================== MODAL CAROUSEL ============================== */
.modal-image-carousel {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
}

.modal-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.modal-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.modal-carousel-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-carousel-prev {
  left: 16px;
}

.modal-carousel-next {
  right: 16px;
}

/* Hide nav on mobile touch devices usually unless requested, but left/right helps */
@media (max-width: 768px) {
  .modal-carousel-nav {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* ============================== FULL SCREEN LIGHTBOX ============================== */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--black);
  /* Solid black as requested */
  z-index: 2147483647;
  /* Highest possible */
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.open {
  display: flex;
  opacity: 1;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s;
  user-select: none;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--accent);
  border: none;
  color: var(--white);
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease;
  z-index: 10000;
}

.lightbox-close:hover {
  transform: rotate(90deg) scale(1.1);
}

/* ============================== DASHBOARD GALLERY PREVIEW ============================== */
.gallery-preview-grid {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  margin-top: 10px;
  padding-bottom: 8px;
  /* Space for scrollbar if visible */
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.gallery-preview-grid::-webkit-scrollbar {
  height: 6px;
}

.gallery-preview-grid::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-preview-grid::-webkit-scrollbar-thumb {
  background-color: var(--accent);
  border-radius: 10px;
}

.gallery-preview-grid .preview-item {
  flex: 0 0 100px;
  /* Fixed width for horizontal scrolling */
  width: 100px;
  height: 100px;
}

.modal-image-container {
  width: 100%;
  height: 400px;
  /* Fixed height for consistency */
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background-color: #000;
  /* Fallback */
}

.preview-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.preview-remove:hover {
  background: #ff4444;
}

/* ============================== PAGINATION ============================== */
.listings-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 15px 25px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--white);
  font-family: var(--font-base);
}

.pagination-info {
  font-size: 0.9rem;
  opacity: 0.8;
}

.pagination-info strong {
  color: var(--accent);
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-count {
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 80px;
  text-align: center;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  color: var(--white);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--black);
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.view-all-row {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Light mode overrides */
html[data-theme="light"] .pagination-container {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--black);
}

html[data-theme="light"] .pagination-btn {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: var(--black);
}

@media (max-width: 600px) {
  .pagination-container {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

/* ============================== UNIFIED MODAL CLOSE ============================== */
.closeModalDefault {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  background: var(--accent);
  color: var(--white) !important;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2147483647;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.closeModalDefault:hover {
  transform: rotate(90deg) scale(1.1);
  background: var(--primary);
}

/* ============================== 2-COLUMN MODAL REDESIGN (v2.89) ============================== */
/* ============================== 3-COLUMN MODAL REFINEMENTS (v2.90) ============================== */
/* Wider Modal container for desktop */
.premium-modal.wide .modal-content {
  max-width: 1100px;
  width: 95%;
}

/* Grid layout for modal content */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Modal columns */
.modal-column {
  display: flex;
  flex-direction: column;
  max-height: calc(95vh - 200px);
  /* Allow internal column scrolling if needed */
}

/* Modal sections for grouping related fields */
.modal-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
}

.modal-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  opacity: 1;
}

/* Comment System Refinements */
.comment-thread-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 1rem 0;
}

.comment-sticky-form {
  position: sticky;
  bottom: 0;
  background: var(--dash-card-bg);
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  margin-top: auto;
}

/* Collapsible Comments */
.comment-item.collapsed .comment-body,
.comment-item.collapsed .comment-replies,
.comment-item.collapsed .comment-actions {
  display: none;
}

.comment-item.collapsed {
  padding-bottom: 0.5rem;
}

.comment-collapse-btn {
  cursor: pointer;
  font-size: 0.8rem;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 4px;
}

.comment-collapse-btn:hover {
  opacity: 1;
}

/* Responsive: Stack columns on smaller screens */
@media (max-width: 850px) {
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .premium-modal.wide .modal-content {
    /* width handles it */
  }
}

/* Additional refinement for section content */
.modal-section .form-group:last-child {
  margin-bottom: 0;
}

/* FINAL OVERRIDE: Remove all width restrictions for premium wide modals on desktop */
@media (min-width: 851px) {
  .premium-modal.wide .modal-content {
    max-width: 1100px !important;
    width: 95% !important;
  }
}
