  /* ========== RESET & BASE ========== */
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background: #0b0b0c;
    color: #f3f4f6;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
  }
  a { color: inherit; text-decoration: none; }
  img { display:block; max-width:100%; height:auto; }

/* === HEADER === */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(18, 18, 18, 0.98);
  backdrop-filter: blur(8px);
  padding: 0.8rem 0;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 90%;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 90px;
  width: auto;
  margin-right: 12px;
}

.brand-text h1 {
  font-weight: 700;
  font-size: 1.6rem;
  color: #ffb400;
}

.brand-text .staria {
  font-weight: 600;
  color: #ffd700;
}

.brand-text .dot {
  color: #ff8c00;
  font-weight: 800;
}

.brand-text p {
  font-size: 0.85rem;
  color: #ffcc66;
  letter-spacing: 1px;
  font-weight: 500;
  margin-top: 4px;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

nav a {
  color: #f3f3f3;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #ffb400;
}

.calendar-btn, .cta-btn {
  border: none;
  outline: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.calendar-btn {
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  color: #000;
}

.cta-btn {
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  color: #000;
}

.calendar-btn:hover, .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 180, 0, 0.4);
}

/* === Appointment Modal === */
.appointment-modal {
  z-index: 10000; /* ✅ ensures it overlays all property modals */
}

.appointment-modal .appointment-card {
  background: #fff;
  color: #000;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.4);
  position: relative;
  z-index: 2;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal.show .appointment-modal .appointment-card {
  transform: scale(1);
}


/* 🔸 Enhanced close (X) button */
.appointment-card .card-close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 32px;            /* larger and easier to see */
  font-weight: 900;
  color: #ff8c00;             /* bright orange */
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease, color 0.2s ease;
}
.appointment-card .card-close:hover {
  transform: scale(1.2);
  color: #ffd700;             /* gold glow on hover */
}

/* 🔸 Vibrant “Book an Appointment” title */
.appointment-card .card-title {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #FFD700, #FF8C00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 10px rgba(255, 140, 0, 0.4);
}

.appointment-form label {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  color: #333;
}
.appointment-form input, .appointment-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
}
.appointment-form .submit-btn {
  background: linear-gradient(to right, #ffcc00, #ff8c00);
  border: none;
  color: #000;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  margin-top: 20px;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s ease, transform 0.2s ease;
}
.appointment-form .submit-btn:hover {
  background: linear-gradient(to right, #ffd700, #ff6a00);
  transform: translateY(-1px);
}

/* ------------------------------------------- */
/* 🚀 APPOINTMENT FORM BUTTONS & ACTIONS 🚀 */
/* ------------------------------------------- */

/* Container for buttons: use Flexbox to put them side-by-side */
.appointment-form .form-actions {
  display: flex;
  gap: 15px; /* Space between the two buttons */
  margin-top: 20px;
}

/* Make both buttons take up equal space */
.appointment-form .form-actions button {
  flex: 1;
  width: auto; /* Override the previous 100% width */
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

/* Style for the Clear All button (Secondary/Outline Style) */
.appointment-form .clear-btn {
  /* Use a transparent background with an orange border */
  background: transparent;
  border: 2px solid #ff8c00; /* Bright orange border */
  color: #ff8c00; /* Matching text color */
}

.appointment-form .clear-btn:hover {
  /* On hover, fill it with a lighter orange/gold and change text color */
  background: #ff8c00;
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 140, 0, 0.4);
}

/* Optional: Adjust the submit-btn to fit the flex container */
.appointment-form .submit-btn {
  margin-top: 0; /* Remove the top margin since it's now on the parent .form-actions */
  /* Inherits styles from .appointment-form .form-actions button */
}

/* Mobile Adjustment for buttons */
@media (max-width: 480px) {
  .appointment-form .form-actions {
    flex-direction: column; /* Stack buttons vertically on small screens */
    gap: 10px;
  }
}

.success-message {
  text-align: center;
  padding: 20px;
  color: #000;
}
.success-message h3 {
  color: #ff8c00;
  margin-bottom: 10px;
}

  /* ========== HERO / BANNER ========== */
  .hero { position:relative; height:360px; overflow:hidden; }
  .hero-banner { width:100%; height:100%; object-fit:cover; display:block; filter:brightness(0.5) contrast(1.05); }
  .hero-overlay { position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.45)); pointer-events:none; }
  .hero-inner { position:absolute; inset:0; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:0 28px; z-index:2; color:#ffd66a; text-align:center; }
  .hero h1 { font-size:34px; margin-bottom:6px; color:#ffd66a; letter-spacing:1px; }
  .hero p { color:#fff; opacity:0.9; margin-top:6px; font-weight:600; }

  /* ========== SECTIONS & HEADINGS ========== */
  section { padding:44px 0; }
  h2 { margin-bottom:18px; font-size:22px; color:#ffd66a; text-align:left; letter-spacing:0.6px; }
  h3 { color:#fff; }
  .fade-in-up { animation: fadeUp .45s ease both; }
  @keyframes fadeUp { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }

  /* ========== GRID & CARDS ========== */
  .grid { display:grid; grid-template-columns: repeat(3, 1fr); gap:22px; align-items:stretch; }
  @media (max-width: 1100px) { .grid { grid-template-columns: repeat(2,1fr); } }
  @media (max-width: 680px) { .grid { grid-template-columns: 1fr; } .hero { height:260px; } .hero h1 { font-size:22px; } }

  .property-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-radius:14px;
    overflow:hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    transition: transform .25s ease, box-shadow .25s ease;
    position:relative;
    display:flex;
    flex-direction:column;
    border: 1px solid rgba(255,255,255,0.03);
  }
  .property-card:hover { transform: translateY(-8px); box-shadow: 0 20px 50px rgba(0,0,0,0.7); }

/* Card thumbnail — image fills the whole area (no letterboxing) */
.property-thumb {
  height: 200px;               /* adjust to desired card height */
  overflow: hidden;
  position: relative;
  background: #111;            /* fallback while image loads */
  display: block;
}

/* Make the image cover the container fully, centered and cropped as needed */
.property-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;           /* ✅ fills area, crops if needed */
  object-position: center;     /* center the focal point */
  display: block;
}

/* Card thumbnail — image fills the whole area (no letterboxing) */
.property-thumb {
  height: 200px;               /* adjust to desired card height */
  overflow: hidden;
  position: relative;
  background: #111;            /* fallback while image loads */
  display: block;
}

/* Make the image cover the container fully, centered and cropped as needed */
.property-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;           /* ✅ fills area, crops if needed */
  object-position: center;     /* center the focal point */
  display: block;
}

  .price-badge {
    position:absolute; left:14px; bottom:14px;
    background: linear-gradient(90deg,#ffd966,#ff8a00);
    color:#071018; padding:10px 14px; border-radius:10px; font-weight:800;
    box-shadow: 0 8px 28px rgba(0,0,0,0.45);
    font-size:15px;
  }

  .card-top-right { position:absolute; right:12px; top:12px; z-index:4; }
  
.details-btn {
  background: linear-gradient(90deg, #ffd700, #ff8c00);
  color: #0b0b0b;
  border: none;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(255, 180, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.details-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 180, 0, 0.35);
  filter: brightness(1.05);
}
.details-btn:focus-visible {
  outline: 2px solid #ffd700;
  outline-offset: 2px;
}


  .card-body { padding:16px; display:flex; flex-direction:column; gap:10px; }
  .card-body h3 { font-size:18px; color:#fff; margin-bottom:4px; }
  .meta { display:flex; justify-content:space-between; align-items:center; gap:10px; color:#d1d5db; font-size:14px; }
  .specs { display:flex; gap:12px; align-items:center; color:#d1d5db; font-weight:600; flex-wrap:wrap; }

  .spec-pill { display:flex; gap:8px; align-items:center; padding:8px 12px; border-radius:999px; background: rgba(255,255,255,0.02); font-size:13px; color:#e5e7eb; }
  .spec-pill i { opacity:0.95; }

  /* ========== DARK LIGHTBOX MODAL ========== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;                  /* start hidden */
  transition: opacity 0.3s ease;
}
.modal.show {
  display: flex;
  opacity: 1;                  /* fade in */
}


  .modal-backdrop {
    position:absolute; inset:0; background: rgba(0,0,0,0.82); backdrop-filter: blur(6px);
    opacity:0; animation: modalFadeIn .18s forwards;
  }
  @keyframes modalFadeIn { to { opacity:1; } }

  .modal-content-large {
    position:relative; width:min(980px, 98%); max-height:90vh; overflow:auto;
    background: linear-gradient(180deg, rgba(8,8,9,0.99), rgba(6,6,7,0.99));
    border-radius:14px; padding:18px; z-index:5; transform: scale(.96); opacity:0;
    color:#fff;
    animation: zoomIn .22s forwards;
    border: 1px solid rgba(255,255,255,0.03);
  }
  @keyframes zoomIn { to { transform: scale(1); opacity:1; } }

  .modal .close { position:absolute; right:12px; top:10px; font-size:28px; color:#fff; cursor:pointer; background:transparent; border:none; }
  .modal-grid { display:grid; grid-template-columns: 1fr 360px; gap:14px; align-items:start; }
  @media (max-width:980px) { .modal-grid { grid-template-columns: 1fr; } }

.modal-photo {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: transparent; /* ✅ removed dark background */
  min-height: 260px;
}

.modal-photo img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* ✅ supports any image ratio */
  display: block;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.3); /* optional polish */
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 6px;
}

.modal-info h3 {
  font-size: 20px;
  margin-bottom: 6px;
  color: #ffd66a;
}

.modal-info .price {
  font-size: 20px;
  font-weight: 800;
  color: #ffdca6;
}

.modal-info p {
  color: rgba(255,255,255,0.92);
}

.modal-specs {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.modal-specs .spec-pill {
  background: rgba(255,255,255,0.03);
  padding: 10px 12px;
  color: #fff;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(90deg,#ffd966,#ff8a00);
  color: #071018;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255,180,0,0.35);
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
}

/* ===== MODAL GALLERY (enhanced for dynamic images) ===== */
.gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gallery-main {
  flex: 1;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent; /* ✅ removed dark background */
}

.gallery-main img {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.gallery-thumbs img {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.78;
  transition: all .18s ease;
  border: 2px solid transparent;
}

.gallery-thumbs img:hover {
  opacity: 1;
  transform: scale(1.05);
  border-color: #ffd66a;
}

/* smaller screens */
@media (max-width:980px) {
  .gallery-main { height: 260px; }
  .gallery-thumbs img { width: 58px; height: 46px; }
}


/* === FOOTER (New unified style) === */
.about-footer-section {
  padding: 40px 0;
  background: #111;
  border-top: 1px solid #222;
}

.about-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

.about-block, .footer-block {
  flex: 1;
  min-width: 250px;
}

.about-block h3 {
  color: #ffd66a;
  margin-bottom: 10px;
}

.about-block p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-block {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.copyright {
  font-size: 0.8rem;
  color: #666;
  padding-top: 15px;
  border-top: 1px solid #333;
  margin-top: 20px;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-icons a {
  color: #ccc;
  font-size: 1.2rem;
  transition: color 0.3s ease, transform 0.2s ease;
}

.social-icons a:hover {
  color: #ffb400;
  transform: translateY(-2px);
}

  /* === MUTE BUTTON === */
  #muteToggle {
    position: absolute;
    bottom: 25px;
    right: 25px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  #muteToggle:hover { background: rgba(211, 47, 47, 0.8); }

  @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

  /* PROPERTY CARD BUTTON + MODAL (kept) */
  .property-thumb { position: relative; }
  
.card-top-right .details-btn {
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
}

  .modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8); justify-content: center; align-items: center; z-index: 1000; }
  .modal-content { background: #111; padding: 20px; border-radius: 12px; max-width: 500px; text-align: center; animation: zoom-in 0.3s ease; position: relative; }
  @keyframes zoom-in { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .close-btn { position: absolute; top: 10px; right: 20px; background: transparent; color: #fff; border: none; font-size: 26px; cursor: pointer; }

  /* SCROLL TO TOP BUTTON */
  #scrollTopBtn {
    position: fixed;
    bottom: 26px;
    right: 26px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd966, #ff8a00);
    color: #0b0b0b;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.3s ease;
  }
  #scrollTopBtn:hover { transform: translateY(-4px); box-shadow: 0 12px 35px rgba(0,0,0,0.6); }
  #scrollTopBtn.show { opacity: 1; visibility: visible; transform: translateY(0); }
  #scrollTopBtn::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 12px rgba(255, 200, 50, 0.6); opacity: 0; transition: opacity 0.5s ease; }
  #scrollTopBtn.show::after { opacity: 1; }

/* VIDEO FIX */

.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.5));
  z-index: 1;
}
.hero .hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffd66a;
}

@media (max-width: 820px) {
  .nav {
    flex-direction: column;
    gap: 0.8rem;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .calendar-btn, .cta-btn {
    margin-top: 4px;
  }
}

/* ======================= MODAL: white cards to match screenshots ======================= */

/* backdrop + centering */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.modal.show {
  display: flex;
  pointer-events: auto;
}

/* dark backdrop */
.modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.86);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: modalFade .16s ease forwards;
}

/* shared card close button (black '×' on white card) */
.card-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: #111;
  cursor: pointer;
  z-index: 40;
}

/* reduce padding and widget height for compact look */
.calendly-inner {
  background: #fff;
  padding: 4px 18px 18px;
  box-sizing: border-box;
  overflow: hidden;
}

.calendly-widget-wrap {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(15,15,15,0.05);
}

/* smaller widget height */
.calendly-card .calendly-inline-widget {
  width: 100% !important;
  height: 500px !important;
}

/* ===== List modal (compact white card) ===== */
.list-card {
  position: relative;
  width: min(380px, 94%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  border: 1px solid rgba(17,17,17,0.06);
  padding: 18px 20px 22px;
  animation: zoomCard .22s cubic-bezier(.2,.9,.2,1) both;
  pointer-events: auto;
}

/* title = big gold uppercase on list card */
.list-card .card-title {
  margin: 0 0 14px;
  text-align: left;
  color: #f6b01e;
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 22px;
  text-transform: uppercase;
}

/* form inputs styling like screenshot */
.list-form label {
  display: block;
  font-weight: 700;
  margin-top: 8px;
  color: #0b0b0c;
}
.list-form input,
.list-form textarea {
  width: 100%;
  padding: 12px 12px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(15,15,15,0.08);
  background: #fff;
  color: #111;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.02);
}

/* submit button full width gold-orange gradient */
.list-form .submit-btn {
  margin-top: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(90deg,#ffd200,#ff7b00);
  color: #111;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255,150,20,0.12);
}
.list-form .submit-btn:hover { transform: translateY(-2px); }

/* small accessibility / visuals */
.modal .card-title { display: block; }

/* animations */
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomCard { from { transform: translateY(6px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }

/* prevent body scroll while modal open */
body.modal-open { overflow: hidden !important; }

/* responsive tweaks */
@media (max-width: 540px) {
  .calendly-card { width: 94%; height: 92vh; }
  .calendly-inline-widget { height: 56vh !important; }
  .list-card { width: 92%; }
}

/* Allow modal to stretch and fit all inner content */
.modal-content-large {
  max-height: none !important;   /* remove the 90vh height limit */
  height: auto !important;       /* allow full height based on content */
  overflow: visible !important;  /* prevent inner content from being clipped */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* keeps content balanced */
}

/* === FIX: Make gallery stretch full height of modal === */
.modal-grid {
  display: grid !important;
  grid-template-columns: 1fr 360px !important;
  align-items: stretch !important; /* ensures both sides match height */
}

.modal-photo,
.gallery {
  height: 100% !important;       /* fill available vertical space */
  display: flex;
  flex-direction: column;
}

.gallery-main {
  flex: 1;                        /* expands main image area */
  height: auto;
}

.gallery-thumbs {
  margin-top: 8px;
  flex-shrink: 0;                 /* thumbnails stay visible below main image */
}

/* ✅ Ensure appointment modal stacks above property modals */
.modal.appointment-modal {
  z-index: 10000 !important;
}

/* ==========================================================
   📱 MOBILE MODAL SCROLL FIX — SAFE & WORKING
   ========================================================== */
@media (max-width: 680px) {

  /* Lock background scroll safely */
  body.modal-open {
    position: fixed;
    inset: 0;
    overflow: hidden;
    width: 100%;
  }

  /* Modal itself never scrolls; scroll happens only in the card */
  .modal,
  .modal.show {
    overflow: visible !important;
  }

  /* ✅ Scrollable container inside modal */
  .modal-content-large,
  .list-card,
  .appointment-card {
    max-height: 90svh !important;          /* prevent modal from exceeding viewport */
    overflow-y: auto !important;           /* enable scroll */
    -webkit-overflow-scrolling: touch;     /* smooth iOS scrolling */
    display: flex;
    flex-direction: column;
  }

  /* Stack modal content naturally */
  .modal-grid {
    grid-template-columns: 1fr !important;
    align-items: flex-start !important;
  }

  /* Gallery tweaks */
  .gallery {
    margin-top: 0 !important;
    flex: 1 1 auto;                         
    display: flex;
    flex-direction: column;
  }

  .gallery-main {
    min-height: 260px;
    max-height: 65svh;
    flex: 1 1 auto;
  }

  .gallery-main img {
    width: 100%;
    height: auto;
    max-height: 65svh;
    object-fit: contain;
  }

  /* Thumbnails scroll horizontally only */
  .gallery-thumbs {
    overflow-x: auto;
    overflow-y: hidden;
    max-height: 96px;
    flex-shrink: 0;
  }

  /* Prevent inner elements from blocking scroll on iOS */
  .modal-content-large * {
    touch-action: pan-y;
  }
}

/* ======================= FIXED CLOSE BUTTON STACKING ======================= */
.card-close,
.appointment-card .card-close,
.list-card .card-close,
.modal .close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 28px;
  font-weight: 900;
  color: #ff8c00;          /* bright orange for visibility */
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 99999 !important;  /* ✅ ensures always on top */
  pointer-events: auto;
  transition: transform 0.2s ease, color 0.2s ease;
}
.card-close:hover,
.appointment-card .card-close:hover,
.list-card .card-close:hover,
.modal .close:hover {
  transform: scale(1.2);
  color: #ffd700;           /* gold on hover */
}

