/* ==========================================================================
   ScarletKey - Modern Luxury Real Estate & Property Sales Portal
   Colors: Distinct Red Menu Bar, Crisp White Background, Gray Typography
   ========================================================================== */

:root {
  /* Menu Bar Distinct Red Palette */
  --scarlet-light: #ef4444;
  --scarlet-red: #dc2626;
  --scarlet-dark: #b91c1c;
  --scarlet-deep: #991b1b;
  --scarlet-wine: #7f1d1d;
  --gold-accent: #f59e0b;
  --gold-light: #fef08a;

  /* Background Palette (White) */
  --bg-white: #ffffff;
  --bg-slate: #f8fafc;
  --bg-subtle: #f9fafb;
  --bg-surface: #ffffff;

  /* Writings / Typography Palette (Gri / Gray) */
  --gray-900: #111827; /* Main Headings */
  --gray-800: #1f2937; /* Section Titles */
  --gray-700: #374151; /* Dark Gray Subheadings */
  --gray-600: #4b5563; /* Main Body Text (Gri) */
  --gray-500: #6b7280; /* Secondary Descriptions */
  --gray-400: #9ca3af; /* Meta / Hints */
  --gray-300: #d1d5db; /* Borders */
  --gray-200: #e5e7eb; /* Soft Dividers */
  --gray-100: #f3f4f6; /* Card Highlights */

  /* Shadows & Radius */
  --shadow-red: 0 10px 30px rgba(220, 38, 38, 0.28);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 45px rgba(220, 38, 38, 0.15);
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-full: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  background-color: var(--bg-white);
  color: var(--gray-600);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Distinct Red Menu Bar (Truly Unique Architecture)
   ========================================================================== */
.header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 24px;
  background: transparent;
}

.distinct-red-navbar {
  max-width: 1320px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--scarlet-light) 0%, var(--scarlet-red) 45%, var(--scarlet-dark) 85%, var(--scarlet-deep) 100%);
  border-radius: 20px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-red);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
}

.brand-key-badge {
  width: 42px;
  height: 42px;
  background: #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.nav-brand:hover .brand-key-badge {
  transform: rotate(-10deg) scale(1.05);
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.brand-text span {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: block;
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 30px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: var(--gold-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Dropdown in Distinct Red Bar */
.lang-select {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
}

.lang-select option {
  background: #ffffff;
  color: var(--gray-800);
}

/* Schedule Viewing Action Button */
.btn-vip-tour {
  background: #ffffff;
  color: var(--scarlet-red);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-vip-tour:hover {
  transform: translateY(-2px);
  background: var(--gold-light);
  color: var(--scarlet-dark);
}

/* Mobile Toggle Bar Button */
.mobile-toggle-btn {
  display: none;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
}

.mobile-toggle-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-toggle-btn.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.mobile-toggle-btn.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle-btn.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mobile Drawer (Expandable from distinct red bar) */
.mobile-nav-drawer {
  display: none;
  background: linear-gradient(180deg, var(--scarlet-dark) 0%, var(--scarlet-deep) 100%);
  border-radius: 16px;
  padding: 16px;
  margin-top: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.mobile-nav-drawer.open {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-drawer .nav-link {
  padding: 10px 14px;
  font-size: 14px;
}

/* ==========================================================================
   Hero Presentation Section (White Background, Gray Headings)
   ========================================================================== */
.hero-section {
  background: var(--bg-white);
  padding: 40px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: var(--scarlet-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 30px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 46px;
  font-weight: 900;
  color: var(--gray-900);
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero-title span {
  color: var(--scarlet-red);
  background: linear-gradient(135deg, var(--scarlet-red), var(--scarlet-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 17px;
  color: var(--gray-600);
  max-width: 720px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

/* ==========================================================================
   Unified Search Bar for ALL Categories
   ========================================================================== */
.search-hub-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--gray-200);
  border-top: 4px solid var(--scarlet-red);
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) 2fr auto;
  gap: 14px;
  align-items: end;
}

.search-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.search-field-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-select, .search-input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--gray-200);
  background: var(--bg-subtle);
  color: var(--gray-800);
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}

.search-select:focus, .search-input:focus {
  border-color: var(--scarlet-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.btn-search-submit {
  background: linear-gradient(135deg, var(--scarlet-light), var(--scarlet-red));
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-search-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.45);
}

.search-quick-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-tag-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-500);
}

.tag-pill {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.tag-pill:hover, .tag-pill.active {
  background: #fee2e2;
  color: var(--scarlet-dark);
  border-color: #fca5a5;
}

/* ==========================================================================
   Property Listings Grid (White background, Gri writings)
   ========================================================================== */
.section-wrapper {
  padding: 60px 24px;
  background: var(--bg-slate);
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-size: 32px;
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--gray-500);
  margin-top: 4px;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 28px;
}

/* Property Card */
.property-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(220, 38, 38, 0.3);
}

.card-media-wrap {
  position: relative;
  width: 100%;
  height: 250px;
  background: var(--gray-900);
  overflow: hidden;
}

.card-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .card-media-wrap img {
  transform: scale(1.04);
}

.card-price-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: linear-gradient(135deg, var(--scarlet-red), var(--scarlet-dark));
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.3px;
}

.card-category-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(17, 24, 39, 0.75);
  color: #ffffff;
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-location {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--scarlet-red);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 12px;
  line-height: 1.35;
}

.card-desc-snippet {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-specs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 18px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-700);
}

.card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.agent-mini {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-mini img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--scarlet-red);
}

.agent-mini span {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-800);
}

.btn-view-card {
  background: var(--gray-100);
  color: var(--gray-800);
  border: 1px solid var(--gray-300);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view-card:hover {
  background: var(--scarlet-red);
  color: #ffffff;
  border-color: var(--scarlet-red);
}

/* ==========================================================================
   Interactive Mortgage Calculator Widget
   ========================================================================== */
.calculator-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--gray-200);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.calc-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calc-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-700);
}

.calc-slider {
  width: 100%;
  accent-color: var(--scarlet-red);
  cursor: pointer;
}

.calc-display-box {
  background: linear-gradient(135deg, var(--gray-900), #1f2937);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #ffffff;
  text-align: center;
  border: 1px solid #374151;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.calc-monthly-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.calc-monthly-amount {
  font-size: 42px;
  font-weight: 900;
  color: #ffffff;
  margin: 10px 0;
}

.calc-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
  border-top: 1px solid #374151;
  padding-top: 16px;
  text-align: left;
  font-size: 12.5px;
}

.calc-breakdown-item {
  display: flex;
  justify-content: space-between;
  color: var(--gray-400);
}

.calc-breakdown-item strong {
  color: #ffffff;
}

/* ==========================================================================
   Modals (Inquiry & Property Details)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--gray-200);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-subtle);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gray-900);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray-500);
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--gray-300);
  font-size: 14px;
  color: var(--gray-800);
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--scarlet-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.btn-crimson {
  background: linear-gradient(135deg, var(--scarlet-red), var(--scarlet-dark));
  color: #ffffff;
  border: none;
  padding: 11px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-crimson:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  margin-top: auto;
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 40px 24px;
  border-top: 4px solid var(--scarlet-red);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Toggle Bar Behavior
   ========================================================================== */
@media (max-width: 1080px) {
  .search-grid {
    grid-template-columns: 1fr 1fr;
  }
  .btn-search-submit {
    grid-column: span 2;
    justify-content: center;
  }
  .calculator-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .desktop-only {
    display: none !important;
  }
  .header-wrapper {
    padding: 8px 10px;
  }
  .distinct-red-navbar {
    padding: 8px 12px;
  }
  .brand-text span {
    display: none !important;
  }
  .nav-menu {
    display: none !important;
  }
  .nav-actions > button,
  .nav-actions > .nav-link {
    display: none !important;
  }
  .btn-vip-tour {
    display: none !important;
  }
  .mobile-toggle-btn {
    display: flex !important;
  }
  .hero-title {
    font-size: 32px;
  }
  .search-grid {
    grid-template-columns: 1fr;
  }
  .btn-search-submit {
    grid-column: span 1;
  }
  .properties-grid {
    grid-template-columns: 1fr;
  }
}
