/* ===== CSS VARIABLES ===== */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary-color: #f97316;
  --dark-color: #1e293b;
  --light-color: #f8fafc;
  --white-color: #ffffff;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --text-white: #f1f5f9;
  --border-color: #e2e8f0;

  --font-family-primary: "Inter", sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.25rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 2.5rem;
  --space-4xl: 3rem;
  --space-5xl: 4rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-family-primary);
  background: var(--white-color);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
  border-bottom-color: var(--border-color);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
  text-decoration: none;
}
.logo-accent {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  gap: var(--space-2xl);
  list-style: none;
  align-items: center;
}
.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
  transform: translateX(-50%);
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.cta-btn {
  background: var(--primary-color);
  color: white;
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.cta-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

/* Mobile Menu */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 1px;
  transition: var(--transition);
  transform-origin: center;
}
/* Hamburger to X Animation */
.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
.hamburger,
.hamburger::before,
.hamburger::after {
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition);
  position: relative;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}
.hamburger::before {
  top: -7px;
}
.hamburger::after {
  top: 7px;
}
.menu-toggle.active .hamburger {
  background: transparent;
}
.menu-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}
.menu-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ===== HERO WITH CAROUSEL ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

.hero-carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(37, 100, 235, 0.267),
    rgba(118, 75, 162, 0.205)
  );
}

.hero-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: white;
  margin-bottom: var(--space-xl);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 600px;
  margin: 0 auto var(--space-4xl);
}

.search-card {
  background: white;
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 1000px;
  margin: 0 auto;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(20px);
  }
  50% {
    transform: translateY(0);
  }
}

.search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
  align-items: end;
}

.form-select {
  appearance: none;
  padding: var(--space-md) var(--space-md) var(--space-md) var(--space-2xl);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
  font-size: 1rem;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.form-group::after {
  content: "▼";
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-light);
}

.btn-search {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: var(--transition);
}

.btn-search:hover {
  background: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--space-5xl) var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
}

.rentals-section {
  background: var(--light-color);
}
.features-section,
.testimonials-section {
  background: white;
}
.how-it-works {
  background: var(--light-color);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-dark);
}
.divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  margin: var(--space-lg) auto;
  border-radius: var(--radius-full);
}
.section-subtitle {
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Property Grid */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-2xl);
}

.property-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.property-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.property-image {
  height: 200px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.property-body {
  padding: var(--space-xl);
}
.property-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}
.btn-contact {
  display: block;
  text-align: center;
  padding: var(--space-md);
  background: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}
.btn-contact:hover {
  background: var(--primary-color);
  color: white;
}

/* Contact Card */
.contact-card {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: white;
  border: none;
}
.contact-card .property-image {
  background: rgba(255, 255, 255, 0.15);
}
.contact-card .btn-contact {
  background: white;
  color: var(--primary-color);
}
.contact-card .btn-contact:hover {
  background: var(--secondary-color);
  color: white;
}

/* Features & Stats */
.features-grid,
.testimonials-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-2xl);
}

.feature-card,
.testimonial-card,
.stat-card {
  background: white;
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover,
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto var(--space-lg);
}

.testimonial-text {
  font-style: italic;
  color: var(--text-dark);
}
.testimonial-author {
  color: var(--primary-color);
  font-weight: 600;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
}
.stat-label {
  color: var(--text-light);
}

/* CTA */
.cta-section {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-hover)
  );
  padding: var(--space-5xl) var(--space-xl);
  text-align: center;
  color: white;
}

.cta-content h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
}
.cta-list {
  list-style: none;
  text-align: left;
  display: inline-block;
  margin: var(--space-2xl) 0;
}
.cta-list i {
  color: var(--secondary-color);
  margin-right: var(--space-md);
}
.btn-light {
  background: white;
  color: var(--primary-color);
  padding: var(--space-lg) var(--space-4xl);
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}
.btn-light:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: var(--text-white);
  padding: var(--space-5xl) var(--space-xl) var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-4xl);
  max-width: 1400px;
  margin: 0 auto var(--space-4xl);
}

.footer-section h3 {
  color: white;
  margin-bottom: var(--space-lg);
}
.footer-links {
  list-style: none;
}
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}
.footer-links a:hover {
  color: white;
  padding-left: var(--space-xs);
}

.social-links {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: var(--transition);
}
.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.newsletter-input {
  flex: 1;
  padding: var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
.btn-newsletter {
  background: var(--primary-color);
  color: white;
  padding: var(--space-md) var(--space-xl);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}
.btn-newsletter:hover {
  background: var(--primary-hover);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white-color);
    flex-direction: column;
    padding: var(--space-5xl) var(--space-xl);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
    overflow-y: auto;
    z-index: 1000;
  }
  .nav-menu.active {
    right: 0;
  }
  .mobile-overlay {
    display: block;
  }
  .nav-link, .cta-btn {
    font-size: 1.1rem;
    width: 100%;
    text-align: left;
    padding: var(--space-md) 0;
  }

  .cta-btn {
    margin-top: var(--space-lg);
    text-align: center;
  }
  .search-form {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 100px;
  }
}

@media (max-width: 480px) {
  .property-grid,
  .features-grid,
  .testimonials-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .newsletter-form {
    flex-direction: column;
  }
}
