/* =====================================================================
   SHREE SANWARIYA HOMES - REFINED LUXURY REAL ESTATE STYLESHEET
   Mobile-First Architecture (Guaranteed Responsive 320px - 4K)
   ===================================================================== */

:root {
  --primary-navy: #0a192f;
  --secondary-navy: #112240;
  --light-navy: #1d3356;
  --surface-navy: #0e1e38;

  --accent-gold: #c5a880;
  --accent-gold-hover: #b3956e;
  --accent-gold-light: #f7f3ed;
  --accent-gold-glow: rgba(197, 168, 128, 0.25);

  --text-dark: #1e293b;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-white: #ffffff;

  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --border-subtle: #e2e8f0;
  --border-gold: rgba(197, 168, 128, 0.45);

  --shadow-sm: 0 2px 6px rgba(10, 25, 47, 0.06);
  --shadow-md: 0 10px 20px rgba(10, 25, 47, 0.08);
  --shadow-lg: 0 18px 30px rgba(10, 25, 47, 0.12);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-pill: 9999px;

  --font-main: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --transition: all 0.25s ease-in-out;
}

/* ---------------------------------------------------------------------
   1. Reset & Global Viewport Safety
   --------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, picture, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-navy);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-gold);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-navy);
  font-family: var(--font-heading);
  line-height: 1.25;
  word-break: break-word;
}

p {
  word-break: break-word;
}

/* ---------------------------------------------------------------------
   2. Containers & Layout Grids
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 4vw, 24px);
  padding-right: clamp(16px, 4vw, 24px);
}

.section-padding {
  padding: clamp(40px, 6vw, 75px) 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-gold { color: var(--accent-gold) !important; }
.text-white { color: var(--text-white) !important; }
.text-muted { color: var(--text-muted) !important; }

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-grow-1 { flex-grow: 1; }

.gap-1 { gap: 6px; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

/* ---------------------------------------------------------------------
   3. Top Contact Bar
   --------------------------------------------------------------------- */
.top-bar {
  background: var(--surface-navy);
  color: #94a3b8;
  font-size: 0.825rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar-contact {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
  flex-wrap: wrap;
}

.top-bar-contact a {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar-contact a:hover {
  color: var(--accent-gold);
}

/* ---------------------------------------------------------------------
   4. Header & Drawer Navigation
   --------------------------------------------------------------------- */
.site-header {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-subtle);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand-logo {
  display: flex;
  flex-direction: column;
}

.brand-logo .brand-title {
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  font-weight: 700;
  color: var(--primary-navy);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.1;
}

.brand-logo .brand-subtitle {
  font-size: clamp(0.65rem, 1.5vw, 0.725rem);
  color: var(--accent-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-navy);
  padding: 6px 0;
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-gold);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent-gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
  color: var(--primary-navy);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-close-btn {
  display: none;
}

/* ---------------------------------------------------------------------
   5. Buttons & Badges
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-gold);
  color: var(--primary-navy);
  border-color: var(--accent-gold);
}

.btn-primary:hover {
  background-color: var(--accent-gold-hover);
  color: var(--primary-navy);
}

.btn-outline-gold {
  background-color: transparent;
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.btn-outline-gold:hover {
  background-color: var(--accent-gold);
  color: var(--primary-navy);
}

.btn-navy {
  background-color: var(--primary-navy);
  color: var(--text-white);
  border-color: var(--primary-navy);
}

.btn-navy:hover {
  background-color: var(--secondary-navy);
  color: var(--accent-gold);
}

.btn-whatsapp {
  background-color: #25d366;
  color: #ffffff;
  border-color: #25d366;
}

.btn-whatsapp:hover {
  background-color: #20bd5a;
  color: #ffffff;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.8rem;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-xs);
}

.badge-gold { background: var(--accent-gold); color: var(--primary-navy); }
.badge-navy { background: var(--primary-navy); color: #fff; }
.badge-success { background: #10b981; color: #fff; }

/* ---------------------------------------------------------------------
   6. Hero Slider
   --------------------------------------------------------------------- */
.hero-slider {
  position: relative;
  background-color: var(--primary-navy);
  width: 100%;
}

.hero-slide {
  position: relative;
  width: 100%;
  min-height: clamp(440px, 60vh, 600px);
  display: flex;
  align-items: center;
}

.hero-slide picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-slide picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10,25,47,0.5) 0%, rgba(10,25,47,0.85) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  color: #ffffff;
  max-width: 680px;
  padding: 40px 0;
}

.hero-title {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-subtitle {
  color: #cbd5e1;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  margin-bottom: 24px;
}

/* ---------------------------------------------------------------------
   7. Cards, Forms & Properties
   --------------------------------------------------------------------- */
.filter-card {
  background: var(--bg-card);
  padding: clamp(18px, 3vw, 28px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 16px;
  width: 100%;
}

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--primary-navy);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-control, .form-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.95rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  background-color: #ffffff;
  color: var(--text-dark);
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--accent-gold-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.section-header {
  margin-bottom: clamp(28px, 4vw, 42px);
}

.section-tag {
  color: var(--accent-gold);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: inline-block;
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--primary-navy);
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(18px, 3vw, 30px);
}

.property-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);
}

.property-thumbnail {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--secondary-navy);
}

.property-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.property-price-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(10, 25, 47, 0.92);
  color: var(--accent-gold);
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  font-weight: 700;
  font-size: 1rem;
  z-index: 2;
  border: 1px solid var(--border-gold);
}

.property-body {
  padding: clamp(16px, 2.5vw, 22px);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-type-label {
  font-size: 0.725rem;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 700;
  letter-spacing: 1px;
}

.property-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 6px 0 10px;
}

.property-location {
  color: var(--text-muted);
  font-size: 0.885rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.property-specs {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  margin-bottom: 16px;
  gap: 6px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.spec-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.spec-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-navy);
}

.property-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* ---------------------------------------------------------------------
   8. Footer
   --------------------------------------------------------------------- */
.site-footer {
  background-color: var(--primary-navy);
  color: #94a3b8;
  padding: clamp(45px, 6vw, 65px) 0 25px;
  margin-top: clamp(45px, 6vw, 65px);
  border-top: 1px solid rgba(197, 168, 128, 0.25);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: clamp(24px, 4vw, 40px);
  margin-bottom: 35px;
}

.footer-title {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 8px;
}

.footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--accent-gold);
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: #94a3b8;
  font-size: 0.925rem;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-contact li {
  margin-bottom: 12px;
  font-size: 0.925rem;
  display: flex;
  gap: 8px;
}

.footer-contact a {
  color: #cbd5e1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------------------------------------------------------------------
   9. Mobile Responsiveness & Drawer Engine (<= 768px)
   --------------------------------------------------------------------- */
@media (max-width: 991px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  /* Fixed slide-out drawer on the HIGHEST layer (z-index: 100000) */
  .nav-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    width: 290px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background-color: #0a192f !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 80px 24px 30px !important;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6) !important;
    z-index: 100000 !important;
    gap: 16px !important;
    overflow-y: auto !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: auto !important;
  }

  .nav-menu.active {
    transform: translateX(0) !important;
  }

  .nav-menu .nav-link {
    color: #ffffff !important;
    font-size: 1.05rem !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 12px 0 !important;
    pointer-events: auto !important;
    display: block !important;
  }

  .nav-menu .nav-link.active,
  .nav-menu .nav-link:hover {
    color: var(--accent-gold) !important;
  }

  .nav-menu .btn {
    width: 100% !important;
    margin-top: 14px !important;
    pointer-events: auto !important;
  }

  /* Close button clearly visible and clickable */
  .nav-close-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: var(--radius-xs) !important;
    color: #ffffff !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    z-index: 100001 !important;
    pointer-events: auto !important;
  }

  .nav-close-btn:hover {
    background: rgba(197, 168, 128, 0.2) !important;
    color: var(--accent-gold) !important;
  }

  /* Backdrop: dims ONLY the background, sitting UNDER the drawer */
  .nav-backdrop {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(10, 25, 47, 0.65) !important;
    z-index: 99990 !important; /* Under .nav-menu (100000) */
  }

  .nav-backdrop.active {
    display: block !important;
  }

  /* Force single column for properties and contact layouts */
  .properties-grid {
    grid-template-columns: 1fr;
  }

  div[style*="grid-template-columns: 1fr 1.3fr"],
  div[style*="grid-template-columns: 1fr 1.35fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  div[style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}

@media (max-width: 414px) {
  .top-bar-content {
    justify-content: center;
    text-align: center;
  }
  .top-bar-contact {
    justify-content: center;
    gap: 8px;
  }
  .property-card-footer {
    flex-direction: column;
    width: 100%;
  }
  .property-card-footer .btn {
    width: 100%;
  }
}