/* 
  Propera India - Global Design System & Foundational Architecture
  Prioritizing performance, lightweight UI, and a premium feel.
*/

:root {
  /* Foundational Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-primary); /* Use primary sans-serif fallback for consistency */
  
  /* Text Colors */
  --text-primary: #23262F;
  --text-secondary: #606870;
  --text-light: #FFFFFF;
  
  /* Background Colors */
  --bg-white: #FFFFFF;
  --bg-off-white: #F8F9FA;
  
  /* Spacing Rhythm */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-xxl: 5rem;
  --space-section: 8rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows for Premium Depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
  --shadow-floating: 0 24px 48px rgba(0, 0, 0, 0.16);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   COLOR SYSTEM PLACEHOLDERS
   DO NOT finalize colors. Inject globally later.
   ========================================================================== */
.first-color { background: #F8F9FA; }
.second-color { background: #d3d6db; }
.third-color { background: #2B5C8F; }
.fourth-color { background: #2B5C8F; }

/* Variables referencing the color palette for component usage */
.theme-root {
  --color-1: #F8F9FA;
  --color-2: #d3d6db;
  --color-3: #2B5C8F;
  --color-4: #2B5C8F;
  --color-5: #f5f5f4;
  --color-border: #e5e5e5;
  --color-text: #23262F;
  --color-text-muted: #606870;
  --space-2xl: 4rem;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background-color: var(--bg-off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  zoom: 0.9;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.text-display { font-size: clamp(2.5rem, 5vw, 4.5rem); letter-spacing: -0.02em; }
.text-h1 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.01em; }
.text-h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.text-h3 { font-size: clamp(1.5rem, 2vw, 2rem); }
.text-body-lg { font-size: 1.125rem; }
.text-body { font-size: 1rem; }
.text-body-sm { font-size: 0.875rem; }
.text-muted { color: var(--text-secondary); }

/* ==========================================================================
   LAYOUT SYSTEM
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1440px; /* Spacious */
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container { padding: 0 var(--space-xl); }
}

.section {
  padding: var(--space-xxl) 0;
}

@media (min-width: 1024px) {
  .section { padding: var(--space-section) 0; }
}

.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-cols-2 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 768px) {
  .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-4, #2B5C8F);
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--color-3, #2B5C8F);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-1, #F8F9FA);
  color: var(--color-4, #2B5C8F);
}

.btn-secondary:hover {
  background-color: var(--color-2, #d3d6db);
}

.btn-outline {
  border: 1px solid var(--color-4, #2B5C8F);
  color: var(--color-4, #2B5C8F);
}

.btn-outline:hover {
  background-color: var(--color-4, #2B5C8F);
  color: var(--text-light);
}

/* Cards (Property Cards) */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

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

.card:hover .card-img {
  transform: scale(1.05); /* Minimal animation */
}

.card-content {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Floating UI / Modals / Floating Search */
.floating-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-floating);
  padding: var(--space-lg);
  z-index: 10;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px); /* Minimal performance hit */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  width: 90%;
  max-width: 600px;
  transform: translateY(20px);
  transition: var(--transition-smooth);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* Form Inputs & Search Bars */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.input-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-field {
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-2, #d3d6db);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 1rem;
  background: var(--bg-white);
  transition: var(--transition-fast);
}

.input-field:focus {
  outline: none;
  border-color: var(--color-3, #2B5C8F);
  box-shadow: 0 0 0 3px rgba(65, 95, 157, 0.1);
}

.search-bar {
  display: flex;
  background: var(--bg-white);
  border-radius: var(--radius-full);
  padding: 0.5rem;
  box-shadow: var(--shadow-md);
  align-items: center;
}

.search-input {
  flex: 1;
  border: none;
  padding: 0.5rem 1rem;
  background: transparent;
  font-size: 1rem;
}

.search-input:focus {
  outline: none;
}



/* Carousel Container Placeholder */
.carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: var(--space-lg);
  padding-bottom: var(--space-md);
  scrollbar-width: none; /* Firefox */
}

.carousel-container::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.carousel-item {
  scroll-snap-align: start;
  flex: 0 0 85%;
}

@media (min-width: 768px) {
  .carousel-item {
    flex: 0 0 45%;
  }
}
@media (min-width: 1024px) {
  .carousel-item {
    flex: 0 0 30%;
  }
}

/* CTA Section */
.cta-section {
  background-color: var(--color-4, #2B5C8F);
  color: var(--text-light);
  padding: var(--space-xxl) 0;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
}
