/* --------------------------------------------------
   Apple-Inspired Styles for Blue Sky Property
   -------------------------------------------------- */

/* 🎨 Variables */
:root {
  --bg: #fff;
  --fg: #1d1d1f;
  --muted: #8e8e93;
  --light-grey: #f5f5f7;
  --accent: #0071e3; /* Apple blue */
  --radius: 10px;
  --max-width: 1200px;
}

/* 📝 Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: 0.2s ease;
}
a:hover {
  opacity: 0.8;
}

/* 📦 Layout */
.container {
  max-width: var(--max-width);
  margin: auto;
  padding: 0 20px;
}

/* 🔝 Header */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--light-grey);
  position: sticky;
  top: 0;
  z-index: 999;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--fg);
}
.logo {
  height: 32px;
}
.main-nav {
  display: flex;
  gap: 24px;
}
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--fg);
}
.mobile-nav-toggle {
  display: none;
}

/* 🎯 Hero Section */
.hero {
  display: flex;
  align-items: center;
  padding: 80px 0;
  background: var(--light-grey);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-content p {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 30px;
}
.hero-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* 🔘 Buttons */
.btn {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: 0.2s ease;
}
.btn:hover {
  background: #0077ed;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn-ghost:hover {
  background: var(--accent);
  color: #fff;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

/* 🌟 Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  text-align: center;
  padding: 80px 0;
}
.feature h3 {
  font-size: 22px;
  margin-bottom: 10px;
}
.feature p {
  color: var(--muted);
}

/* 🏠 Featured Listings */
.featured {
  padding: 80px 0;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
}
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.card-body {
  padding: 20px;
}
.card-body h4 {
  font-size: 18px;
  margin-bottom: 8px;
}
.card-body .muted {
  color: var(--muted);
  margin-bottom: 12px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.price {
  font-weight: 700;
  font-size: 16px;
}

/* 📩 Contact CTA */
.contact-cta {
  background: var(--light-grey);
  text-align: center;
  padding: 80px 20px;
}
.contact-cta h3 {
  font-size: 28px;
  margin-bottom: 12px;
}
.contact-cta p {
  color: var(--muted);
  margin-bottom: 20px;
}

/* 🔻 Footer */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--light-grey);
  padding-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  padding-bottom: 20px;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 14px;
  color: var(--fg);
}
.site-bottom {
  border-top: 1px solid var(--light-grey);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 36px;
  }
  .header-inner {
    flex-wrap: wrap;
  }
  .main-nav {
    display: none; /* hide desktop nav */
  }
  .mobile-nav-toggle {
    display: block;
    font-size: 24px;
    background: none;
    border: none;
  }
}

/* =========================
   Apple-Inspired Design
   ========================= */

:root {
  --bg: #fff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --radius: 12px;
  --max-width: 1200px;
  --transition: 0.3s ease;
  --shadow: 0 2px 10px rgba(0,0,0,0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  color: var(--accent);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== HEADER ===== */
.site-header {
  background: rgba(255,255,255,0.8);
  backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #e5e5e7;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo {
  height: 28px;
}

.brand-text {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.main-nav a {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--accent);
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.btn-ghost {
  border: 1px solid #d2d2d7;
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.mobile-nav-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
}

/* ===== SEARCH PANEL ===== */
.search-panel {
  margin: 2rem 0;
}

.search-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-row input,
.search-row select {
  padding: 0.75rem 1rem;
  border: 1px solid #d2d2d7;
  border-radius: var(--radius);
  flex: 1;
  min-width: 180px;
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-row input:focus,
.search-row select:focus {
  border-color: var(--accent);
  outline: none;
}

/* ===== LISTINGS ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.cards .card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 1rem;
}

.card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(29,29,31,0.8);
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: var(--radius);
  width: min(90%, 600px);
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow);
  animation: fadeIn var(--transition);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: none;
  font-size: 1.25rem;
  cursor: pointer;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #f5f5f7;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid #e5e5e7;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-nav-toggle { display: block; }
}

/* ===== CONTACT PAGE ===== */
.contact-page {
  padding: 3rem 0;
}

.contact-page h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-page .lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  gap: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem 1rem;
  border: 1px solid #d2d2d7;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: border var(--transition), box-shadow var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.2);
  outline: none;
}

.contact-form button {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.contact-form button:hover {
  background: #005bb5;
}

#form-msg {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Contact info sidebar */
.contact-info {
  background: #f5f5f7;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.contact-info p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

/* Responsive layout */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-form button {
    width: 100%;
    text-align: center;
  }
}

/* ===== SERVICES PAGE ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.service-card {
  background: #f5f5f7;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.service-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .service-card {
    padding: 1.5rem;
  }

  .service-card h3 {
    font-size: 1.1rem;
  }

  .service-card p {
    font-size: 0.9rem;
  }
}

/* ===== ABOUT PAGE ===== */
.about-intro {
  padding: 3rem 0;
  text-align: center;
}

.about-intro h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.about-intro .lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 650px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* Grid for mission, vision, team */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  text-align: left;
}

.about-grid h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.about-grid p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Values list */
.values {
  padding: 3rem 0;
  text-align: center;
}

.values h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.values-list {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
}

.values-list li {
  background: #f5f5f7;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.values-list li:hover {
  transform: translateY(-3px);
}

/* =========================
   Mobile Enhancements
   ========================= */

/* Small devices (phones) */
@media (max-width: 600px) {
  /* Reduce padding for smaller screens */
  .container {
    padding: 0 1rem;
  }

  /* Hero section */
  .hero {
    padding: 60px 0;
    text-align: center;
  }
  .hero-content h1 {
    font-size: 28px;
    line-height: 1.3;
  }
  .hero-content p {
    font-size: 16px;
  }
  .hero-image img {
    max-width: 90%;
    margin: 20px auto 0;
    display: block;
  }

  /* Cards */
  .cards {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .card img {
    height: 160px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Medium devices (tablets) */
@media (min-width: 601px) and (max-width: 991px) {
  .hero-content h1 {
    font-size: 34px;
  }
  .hero-image img {
    max-width: 100%;
  }
  .cards {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Mobile Navigation */
.mobile-nav-toggle {
  display: block;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  background: #fff;
  padding: 1rem 0;
  border-top: 1px solid #e5e5e7;
}

.mobile-menu a {
  font-size: 1rem;
  padding: 0.5rem 1.25rem;
  color: var(--fg);
}

.mobile-menu a:hover {
  background: #f5f5f7;
}

/* Show mobile menu when active */
.mobile-menu.active {
  display: flex;
}


/* --- Property detail enhancements --- */
.property-detail.enhanced{
  --gap: 24px;
  margin-top: 24px;
  margin-bottom: 48px;
  display: grid;
  gap: var(--gap);
}
.property-gallery img{
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.property-layout{
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gap);
}
.property-title{
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  line-height: 1.2;
  margin: 0 0 6px;
}
.property-meta{
  margin: 0 0 18px;
}
.property-section + .property-section{ margin-top: 24px; }

/* chips */
.spec-chips{
  list-style: none;
  padding: 0; margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.spec-chips li{
  background: #f5f5f7;
  border: 1px solid #e8e8ee;
  border-radius: 999px;
  padding: 8px 12px;
  text-align: center;
  font-size: 0.95rem;
}

/* aside card */
.property-aside.card{
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 16px;
  border: 1px solid #ececf0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(0,0,0,.06);
}
.property-aside .price-large{
  margin-top: 0;
}
.property-aside .block{
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
}
.property-aside .aside-small{
  margin-top: 12px;
  font-size: .9rem;
}

/* Responsive */
@media (max-width: 1000px){
  .property-layout{ grid-template-columns: 1.4fr 1fr; }
  .spec-chips{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .property-layout{ grid-template-columns: 1fr; }
  .property-aside.card{ position: static; }
  .spec-chips{ grid-template-columns: 1fr; }
}



/* --- Property quick-view modal --- */
.modal-root{ position: fixed; inset: 0; display: none; z-index: 1000; }
.modal-root.open{ display: block; }
.modal-backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
.modal-panel{ position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; }
.modal-content{ width: min(100vw - 24px, 880px); max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.2); }
.modal-header{ display:flex; justify-content:flex-end; }
.modal-close{ appearance:none; border:0; background: transparent; font-size: 22px; line-height: 1; padding: 10px; cursor: pointer; }
.modal-body{ padding: 16px; }
.modal-grid{ display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.modal-grid img{ width:100%; height: 240px; object-fit: cover; border-radius: 10px; }
@media (max-width: 720px){ .modal-grid{ grid-template-columns: 1fr; } .modal-grid img{ height: auto; max-height: 45vh; } }

/* --- Properties grid --- */
.cards-grid{
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0 32px;
}
@media (max-width: 900px){ .cards-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px){ .cards-grid{ grid-template-columns: 1fr; } }

.cards-grid .card{ border: 1px solid #e5e7eb; border-radius: 14px; overflow: hidden; background: #fff; }
.cards-grid .card img{ width: 100%; height: 180px; object-fit: cover; display: block; }
.cards-grid .card .card-body{ padding: 12px 14px; }
.cards-grid .card .card-actions{ margin-top: 10px; }

/* --- Filters bar --- */
.filters{ margin-top: 16px; }
.filters-row{
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  align-items: center;
}
.filters-row input, .filters-row select{
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
@media (max-width: 700px){
  .filters-row{ grid-template-columns: 1fr; }
}


/* --- Mobile nav visibility & layout (fixed) --- */
/* Hide the toggle on desktop by default */
.mobile-nav-toggle{ display: none; }

/* Desktop nav: ensure visible and inline */
@media (min-width: 769px){
  .main-nav{
    display: flex !important;
    gap: 1rem;
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
}

/* Mobile: show toggle, hide menu until opened */
@media (max-width: 768px){
  header, .site-header { position: relative; z-index: 10; }
  .mobile-nav-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border: 0; border-radius: 8px;
    background: transparent; /* transparent as requested */
    cursor: pointer;
    font-size: 22px;
  }
  .main-nav{
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    padding: 12px 16px;
  }
  .main-nav.open{ display: block; }
  .main-nav a{
    display: block;
    padding: 10px 8px;
    text-decoration: none;
  }
  body.nav-open{ overflow: hidden; }
}


/* --- Center main navigation on desktop --- */
@media (min-width: 769px){
  .main-nav{
    width: 100%;
    display: flex;
    justify-content: center; /* center the group of links */
  }
}
/* Keep mobile menu left-aligned inside the dropdown */
@media (max-width: 768px){
  .main-nav a{ text-align: left; }
}

/* --- Legal pages --- */
.legal{ margin: 24px auto 48px; max-width: 900px; }
.legal h1{ margin: 0 0 8px; }
.legal h2{ margin: 20px 0 8px; font-size: 1.2rem; }
.legal p, .legal li{ line-height: 1.7; }
.legal ul{ padding-left: 1.2rem; }


/* --- Brand (logo + text) --- */
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand .logo{
  height: 36px;
  width: auto;
  display: block;
}
@media (max-width: 768px){
  .brand .logo{ height: 30px; }
  .brand-text{ font-size: 0.95rem; }
}


/* --- Force brand text to one line --- */
.brand{
  white-space: nowrap;      /* keep logo + text on one line */
  flex-wrap: nowrap;
}
.brand .brand-text{
  white-space: nowrap;      /* prevent "Blue Sky Property" from wrapping */
}
/* Optional: keep footer copyright + links on one line */
.site-footer .container small{ white-space: nowrap; }

/* Added date on property cards */
.added-date{ font-size: .9rem; margin-top: 6px; opacity: .85; }


/* --- Property gallery (multi-image) --- */
.gallery-main{
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
}
.gallery-main img{
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.gallery-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.45);
  color: #fff; border: 0; border-radius: 999px;
  cursor: pointer;
}
.gallery-nav.prev{ left: 10px; }
.gallery-nav.next{ right: 10px; }

.gallery-thumbs{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.gallery-thumbs .thumb{
  padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: transparent;
}
.gallery-thumbs .thumb img{
  width: 100%; height: 66px; object-fit: cover; display: block;
}
.gallery-thumbs .thumb.active{ border-color: #0ea5e9; }
@media (max-width: 720px){
  .gallery-thumbs .thumb img{ height: 56px; }
}


/* Latest Units subhead row */
.section-subhead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:0.75rem;
  margin-top:0.25rem;
}
.section-subhead .muted{ margin:0; }
.section-subhead .see-all{ white-space:nowrap; }



/* Space between features and Latest Units */
.features.container{ margin-bottom: 40px; }
.featured.container{ margin-top: 40px; }
@media (min-width: 768px){
  .features.container{ margin-bottom: 56px; }
  .featured.container{ margin-top: 56px; }
}



/* Latest Units header with right-aligned See all */
.section-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:0.75rem;
}
.section-head .see-all{ white-space:nowrap; }



/* Status pill styles */
.status-line{ margin:6px 0 0; }
.status-pill{
  display:inline-block;
  padding:2px 8px;
  border-radius:999px;
  font-size:.8rem;
  font-weight:600;
  border:1px solid transparent;
}
.status-available{ background:#eaf7ee; color:#18643c; border-color:#cdebd6; }
.status-unavailable{ background:#f5f5f5; color:#555; border-color:#e5e5e5; }
.status-sold{ background:#fff0f0; color:#c92a2a; border-color:#ffc9c9; }
.status-rented{ background:#fff6e0; color:#9a6b00; border-color:#ffe3a3; }

/* De-emphasize unavailable/sold/rented cards */
.card.is-inactive{ opacity:.78; }
.card.is-inactive .price-large{ text-decoration:line-through; opacity:.85; }



/* Status badge overlay on images */
.card .card-media{ position: relative; }
.gallery-main{ position: relative; }
.status-badge{
  position:absolute;
  top:10px;
  left:10px;
  z-index:2;
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:.8rem;
  font-weight:600;
  border:1px solid transparent;
  background:#fff;
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}
/* Color tokens reuse from status pills */
.status-available{ background:#eaf7ee; color:#18643c; border-color:#cdebd6; }
.status-unavailable{ background:#f5f5f5; color:#555; border-color:#e5e5e5; }
.status-sold{ background:#fff0f0; color:#c92a2a; border-color:#ffc9c9; }
.status-rented{ background:#fff6e0; color:#9a6b00; border-color:#ffe3a3; }



/* === Status overlay: 90% opacity background + white text === */
.status-badge{
  color:#fff !important;
  border-color:transparent !important;
  box-shadow:0 6px 16px rgba(0,0,0,.08);
}
.status-badge.status-available{ background:rgba(24,100,60,.9) !important; }      /* deep green */
.status-badge.status-unavailable{ background:rgba(85,85,85,.9) !important; }     /* dark gray */
.status-badge.status-sold{ background:rgba(201,42,42,.9) !important; }           /* red */
.status-badge.status-rented{ background:rgba(154,107,0,.9) !important; }         /* amber */



/* Improve Invoice subtitle readability */
section#invoice p.muted{
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg);
  opacity: 0.85;
  margin: 8px 0 16px;
  font-weight: 400;
}


/* --- Invoice styling to match Receipt Voucher --- */
section#invoice .contact-form {
  gap: 1rem;
}

section#invoice label {
  font-weight: 600;
}

section#invoice .items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--light-grey);
  border-radius: var(--radius);
  padding: 12px;
}

section#invoice .item-row {
  display: grid;
  grid-template-columns: minmax(220px,2fr) 0.6fr 0.8fr auto auto;
  gap: 0.5rem;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

section#invoice .item-row .desc,
section#invoice .item-row .qty,
section#invoice .item-row .price {
  width: 100%;
}

section#invoice .item-row .amount {
  font-variant-numeric: tabular-nums;
  justify-self: end;
  min-width: 72px;
}

section#invoice .item-row .remove {
  justify-self: end;
}

section#invoice .totals {
  display: grid;
  gap: 6px;
  background: var(--light-grey);
  border-radius: var(--radius);
  padding: 12px;
}

section#invoice .actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 4px;
}

/* Inputs inside invoice for consistency with receipt */
section#invoice input[type="text"],
section#invoice input[type="number"],
section#invoice input[type="date"],
section#invoice textarea,
section#invoice select {
  border: 1px solid #e5e5ea;
  border-radius: 8px;
  padding: 10px 12px;
}

/* Make the "Line Items" label consistent spacing-wise */
section#invoice .field > label + .items {
  margin-top: 6px;
}


/* --- Invoice line item sizing tweaks --- */
section#invoice .item-row{
  /* Description | Qty | Unit Price | Amount | Remove */
  grid-template-columns: minmax(280px, 3fr) minmax(70px, 0.6fr) minmax(130px, 1.1fr) minmax(90px, 0.9fr) auto;
}

section#invoice .item-row .desc{
  flex: 1;
  min-width: 280px;
}

section#invoice .item-row .qty{
  max-width: 120px;
  text-align: right;
}

section#invoice .item-row .price{
  max-width: 180px;
  text-align: right;
}

section#invoice .item-row .amount{
  min-width: 90px;
  text-align: right;
  justify-self: end;
  font-variant-numeric: tabular-nums;
}

/* Ensure all inputs stretch within their grid cell */
section#invoice .item-row input{
  width: 100%;
}

/* Responsive: stack neatly on very small screens */
@media (max-width: 560px){
  section#invoice .item-row{
    grid-template-columns: 1fr 1fr;
  }
  section#invoice .item-row .desc{
    grid-column: 1 / -1;
    min-width: unset;
  }
  section#invoice .item-row .amount{
    justify-self: start;
  }
}


/* ===== Enhanced styles: Invoice & Receipt Voucher ===== */
section#invoice h2,
section#receipt-voucher h2{
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

section#invoice .contact-form,
section#receipt-voucher .contact-form{
  background: #fff;
  border: 1px solid #ececee;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

section#invoice .field > label,
section#receipt-voucher .field > label{
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
  display: block;
}

section#invoice input[type="text"],
section#invoice input[type="number"],
section#invoice input[type="date"],
section#invoice select,
section#invoice textarea,
section#receipt-voucher input[type="text"],
section#receipt-voucher input[type="number"],
section#receipt-voucher input[type="date"],
section#receipt-voucher select,
section#receipt-voucher textarea{
  width: 100%;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 10px 12px;
  transition: box-shadow .15s ease, border-color .15s ease;
}

section#invoice input:focus,
section#invoice select:focus,
section#invoice textarea:focus,
section#receipt-voucher input:focus,
section#receipt-voucher select:focus,
section#receipt-voucher textarea:focus{
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

/* Subtext position (now below buttons) spacing */
section#invoice p.muted,
section#receipt-voucher p.muted{
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

/* Actions row */
section#invoice .actions,
section#receipt-voucher .actions{
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Buttons polish */
section#invoice .btn,
section#receipt-voucher .btn{
  border-radius: 10px;
  padding: 10px 14px;
}

section#invoice .btn.btn-primary,
section#receipt-voucher .btn.btn-primary{
  background: var(--accent);
  color: #fff;
}

/* Grid responsiveness for both sections */
@media (max-width: 920px){
  section#invoice .contact-grid,
  section#receipt-voucher .contact-grid{
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Totals emphasis for Invoice */
section#invoice .totals{
  display: grid;
  gap: 6px;
  background: var(--light-grey);
  border-radius: var(--radius);
  padding: 12px;
}

section#invoice .totals #grand{
  font-weight: 700;
}

/* Print-friendly: keep cards clean */
@media print {
  header, nav, footer { display: none !important; }
  section#invoice .contact-form,
  section#receipt-voucher .contact-form{
    box-shadow: none;
    border-color: #ddd;
  }
  .btn, .actions { display: none !important; }
  body { background: #fff; }
}


/* Make Receipt Voucher form full-width and place title above form */
section#receipt-voucher.contact-grid{
  grid-template-columns: 1fr;
}

section#receipt-voucher h2{
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

section#receipt-voucher .contact-form{
  grid-column: 1 / -1;
}


/* Make Invoice form full-width and title above form */
section#invoice.contact-grid{
  grid-template-columns: 1fr;
}

section#invoice h2{
  grid-column: 1 / -1;
  margin-bottom: 8px;
}

section#invoice .contact-form{
  grid-column: 1 / -1;
}


/* ---- Forms page mobile enhancements ---- */

/* Generic 2-col utility used across forms */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Comfortable inputs across all contact forms */
.contact-form input,
.contact-form select,
.contact-form textarea {
  min-height: 44px;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}

/* Improve action rows */
section#invoice .actions,
section#receipt-voucher .actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Buttons feel better on touch */
section#invoice .btn,
section#receipt-voucher .btn {
  border-radius: 10px;
  padding: 10px 14px;
}

/* Invoice item rows tighten on desktop a bit */
section#invoice .item-row {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) 0.6fr 1fr auto auto; /* desc | qty | price | amount | remove */
  gap: 8px;
  align-items: center;
}

/* Mobile breakpoints */
@media (max-width: 960px){
  .container {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  section#invoice .actions,
  section#receipt-voucher .actions {
    flex-direction: column;
    align-items: stretch;
  }
  section#invoice .btn,
  section#receipt-voucher .btn {
    width: 100%;
    padding: 12px 14px;
  }
}

/* Very small screens: stack invoice line items cleanly */
@media (max-width: 560px){
  section#invoice .item-row {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  section#invoice .item-row .desc {
    grid-column: 1 / -1; /* full width row */
  }
  section#invoice .item-row .qty {
    justify-self: stretch;
  }
  section#invoice .item-row .price {
    justify-self: stretch;
  }
  section#invoice .item-row .amount {
    grid-column: 1 / -1;
    justify-self: end;
    min-width: 72px;
  }
  section#invoice .item-row .remove {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .fee-context .grid-2 {
    grid-template-columns: 1fr;
  }
}


/* ===== Forms page: screen-size tuning ===== */

/* Improve fee context details for touch */
details.fee-context{
  border: 1px solid #ececee;
  border-radius: 10px;
  padding: 8px 12px;
  background: #fafafa;
}
details.fee-context[open]{ background:#fff; }
details.fee-context > summary{
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  margin: -8px -12px 8px;
  padding: 10px 12px;
  border-bottom: 1px dashed #e5e5ea;
}
details.fee-context > summary::-webkit-details-marker{ display:none; }

/* Tablet landscape and down */
@media (max-width: 1024px){
  section#invoice .item-row{
    grid-template-columns: minmax(220px, 2fr) 0.7fr 1fr auto auto;
    gap: 8px;
  }
  section#invoice .contact-form,
  section#receipt-voucher .contact-form{
    padding: 16px;
  }
}

/* Tablet portrait */
@media (max-width: 820px){
  .grid-2{ grid-template-columns: 1fr; gap: 10px; }
  section#invoice .item-row{
    grid-template-columns: 1fr 1fr;
  }
  section#invoice .item-row .desc{
    grid-column: 1 / -1;
    min-width: unset;
  }
  section#invoice .totals{ padding: 10px; }
}

/* Large phones / small tablets */
@media (max-width: 640px){
  .container{
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  /* Prevent iOS zoom on focus */
  .contact-form input,
  .contact-form select,
  .contact-form textarea{ font-size: 16px; }
  section#invoice h2, section#receipt-voucher h2{
    font-size: clamp(1.1rem, 4vw, 1.35rem);
  }
  section#invoice .actions,
  section#receipt-voucher .actions{
    flex-direction: column;
    align-items: stretch;
  }
  section#invoice .btn,
  section#receipt-voucher .btn{
    width: 100%;
    padding: 12px 14px;
  }
}

/* Small phones */
@media (max-width: 480px){
  section#invoice .item-row{
    grid-template-columns: 1fr;
    gap: 8px;
  }
  section#invoice .item-row .amount,
  section#invoice .item-row .remove{
    justify-self: end;
  }
  section#invoice .item-row .qty,
  section#invoice .item-row .price{
    justify-self: stretch;
  }
}

/* Only vertical space when Hero and Features are adjacent */
.hero + .features,
.features + .hero {
  margin-top: clamp(24px, 4vw, 56px);
}

/* Neutralize any generic spacing elsewhere */
.features.container { margin-bottom: 0; }
.featured.container { margin-top: 0; }

@media (min-width: 768px){
  .features.container { margin-bottom: 0; }
  .featured.container { margin-top: 0; }
}

/* Safety: ensure these sections aren't adding extra margins */
.hero { margin-bottom: 0; }
.features { margin-top: 0; }


/* Only vertical space when Features is followed by Latest Units (.featured) */
.features.container + .featured.container {
  margin-top: clamp(24px, 4vw, 56px);
}


/* --- Desert Farm banner --- */
.banner-link { 
  margin-top: clamp(24px, 4vw, 56px); /* space below the Featured section */
}

.banner-card {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.banner-card img {
  width: 100%;
  display: block;
  aspect-ratio: 21/9;       /* nice wide pano */
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.5s ease;
}

.banner-card:hover img {
  transform: scale(1.03);
}

.banner-card::after {
  /* subtle gradient for text legibility */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 55%);
  pointer-events: none;
}

.banner-text {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: #fff;
  font-weight: 600;
  font-size: clamp(14px, 2.2vw, 18px);
  line-height: 1.45;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
}

/* More space above the Desert Farm banner when it follows Featured */
.featured.container + .banner-link {
  margin-top: clamp(48px, 7vw, 120px);
}

/* Center the Desert Farm banner text */
.banner-card { position: relative; }

.banner-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: min(92%, 900px);   /* keeps lines readable */
  font-size: clamp(16px, 2.2vw, 24px);
  line-height: 1.45;
}

/* Optional: even overlay for better legibility in the center */
.banner-card::after {
  background: linear-gradient(0deg, rgba(0,0,0,.38), rgba(0,0,0,.38));
}

/* Inline logo in the banner caption */
.banner-text .inline-logo {
  height: 22px;            /* adjust to match text size */
  width: auto;
  margin: 0 6px;
  vertical-align: middle;
  display: inline-block;
  filter: brightness(0) invert(1); /* makes dark logos appear white on dark overlays */
}
/* If your SVG logo is already light/white, remove the filter line above. */

/* Match homepage logo sizing when used inside the banner text */
.banner-text .logo {
  height: 36px;            /* same visual size as header's .brand .logo */
  width: auto;
  margin: 0 6px;
  vertical-align: middle;
  filter: none;            /* keep original colors (no inversion) */
}

/* Force small brand mark size in inline lockups */
.op-by .inline-logo,
img.inline-logo {
  height: 14px !important;  /* tweak to 12–16px if you like */
  width: auto !important;
  display: block;            /* no baseline wobble */
  flex: 0 0 auto;
}

/* Optional: let it scale slightly on wider screens */
@media (min-width: 640px) {
  .op-by .inline-logo,
  img.inline-logo {
    height: 16px !important;
  }
}
/* Align text and logo perfectly in one line */
.operated-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;             /* space between words and logo */
  white-space: nowrap;  /* keeps it on one line */
}

.operated-by .inline-logo {
  height: 14px;         /* small, consistent size */
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-top: -1px;     /* perfect optical alignment */
}
/* Base inline alignment */
.operated-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Small centered variant */
.center-line {
  display: flex;              /* switch to flex for centering */
  justify-content: center;    /* center horizontally */
  align-items: center;        /* align vertically */
  text-align: center;
  width: 100%;                /* allow full width */
  margin: 0 auto;             /* ensure centered placement */
}

.inline-logo {
  height: 14px;
  width: auto;
  vertical-align: middle;
  margin-top: -1px;
}

/* Optional: slightly larger logo on wide screens */
@media (min-width: 640px) {
  .inline-logo {
    height: 16px;
  }
}


.property-gallery-main {
  margin-bottom: 32px;
}

.main-image-container {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.main-image-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.thumbnail-item {
  border: 3px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  background: none;
}

.thumbnail-item:hover {
  border-color: #ddd;
  transform: scale(1.02);
}

.thumbnail-item.active {
  border-color: #007bff;
}

.thumbnail-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}


