/* Global styles */
:root {
  --bg: #f7f7f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --accent: #1f5f9a;
  --accent-soft: #e8f1fa;
  --gold: #c59d5f;
  --border: rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --shadow: 0 24px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
}

#popup-toggle {
  display: none;
}

.whatsapp-button {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 18px 32px rgba(37, 211, 102, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 36px rgba(37, 211, 102, 0.24);
}

.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.8);
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.32s ease;
}

#popup-toggle:not(:checked) + .popup-overlay {
  opacity: 0;
  pointer-events: none;
}

.popup-content {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: auto;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.popup-content {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.popup-content::-webkit-scrollbar {
  display: none;
}

.popup-content img {
  width: 100%;
  height: auto;
  min-height: 100vh;
  display: block;
}

.popup-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin: 0;
}

.popup-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  border: 1px solid rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, background 0.2s ease;
}

.popup-close:hover {
  transform: scale(1.05);
  background: #ffffff;
}

img {
  width: 100%;
  display: block;
  border-radius: 20px;
  object-fit: cover;
}

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.navbar a {
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s ease;
}

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

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.page-hero {
  min-height: 72vh;
  display: grid;
  place-items: center;
  padding: 120px 0 80px;
  color: #ffffff;
  text-align: center;
}

.page-hero .hero-copy {
  width: min(740px, 100%);
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 4vw, 4.4rem);
  margin: 0;
  line-height: 1.03;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin-top: 18px;
  line-height: 1.8;
}

.home-hero {
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.5), rgba(16, 24, 40, 0.5)), url('https://images.unsplash.com/photo-1505693416388-ac5ce068fe85?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
}

.about-hero {
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.75), rgba(16, 24, 40, 0.4)), url('https://images.unsplash.com/photo-1599423300746-b62533397364?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
}

.properties-hero {
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.6), rgba(16, 24, 40, 0.6)), url('https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
}

.services-hero {
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.7), rgba(16, 24, 40, 0.4)), url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
}

.contact-hero {
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.65), rgba(16, 24, 40, 0.65)), url('https://images.unsplash.com/photo-1505693416388-ac5ce068fe85?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
}

main {
  padding-top: 24px;
}

.home-search {
  background: var(--surface);
  margin-top: -80px;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.search-grid label {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.search-grid input,
.search-grid select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f7f7f9;
}

.btn-solid,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-solid {
  background: var(--accent);
  color: #ffffff;
}

.btn-solid:hover,
.btn-outline:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(31, 95, 154, 0.16);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(31, 95, 154, 0.18);
  color: var(--accent);
}

.featured-grid,
.property-grid,
.services-grid,
.team-grid {
  display: grid;
  gap: 24px;
}

.featured-grid,
.property-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-grid,
.services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.property-card,
.service-card,
.team-card,
.detail-card,
.mission-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card img,
.property-card img,
.team-card img {
  height: 260px;
}

.card-content,
.property-info,
.service-card,
.team-card,
.detail-card,
.mission-card {
  padding: 24px;
}

.card-content h3,
.property-info h3,
.service-card h3,
.team-card h3,
.mission-card h3 {
  margin: 0 0 14px;
}

.card-content p,
.property-info p,
.service-card p,
.team-card p,
.detail-card p,
.mission-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.featured-card {
  display: grid;
  gap: 18px;
}

.property-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.property-info {
  display: grid;
  gap: 12px;
}

.price {
  color: var(--accent);
  font-weight: 700;
}

.location {
  font-size: 0.95rem;
}

.section-header {
  text-align: left;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: clamp(2rem, 2.5vw, 2.9rem);
  margin: 8px 0 0;
}

.page-hero + .container {
  margin-top: 40px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  padding-bottom: 48px;
}

.stats-grid {
  display: grid;
  gap: 18px;
}

.stat-card {
  padding: 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(31, 95, 154, 0.12);
}

.stat-card h3 {
  margin: 0 0 10px;
  font-size: 2rem;
  color: var(--accent);
}

.team-section,
.mission-vision,
.contact-grid,
.services-grid,
.properties-list {
  padding: 48px 0;
}

.team-card {
  display: grid;
  gap: 18px;
}

.team-card img {
  height: 320px;
}

.mission-vision {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.mission-card {
  padding: 32px;
}

.services-grid {
  padding: 48px 0;
}

.service-card {
  min-height: 290px;
  display: grid;
  gap: 18px;
}

.service-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--accent-soft);
  font-size: 1.8rem;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 34px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.cta-panel h2 {
  margin: 0 0 12px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 28px;
  padding-bottom: 40px;
}

.contact-form-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.contact-form-card form {
  display: grid;
  gap: 18px;
}

.contact-form-card label {
  font-weight: 600;
}

.contact-form-card input,
.contact-form-card textarea {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f7f7f9;
}

.contact-form-card button {
  width: fit-content;
  border: none;
}

.contact-details {
  display: grid;
  gap: 18px;
}

.detail-card {
  padding: 26px;
}

.map-section iframe {
  width: 100%;
  min-height: 420px;
  border: none;
}

.site-footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.75);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
  color: #ffffff;
}

@media (max-width: 980px) {
  .intro-grid,
  .mission-vision,
  .contact-grid,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .search-grid {
    grid-template-columns: 1fr 1fr;
  }

  .featured-grid,
  .property-grid,
  .team-grid,
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100%, calc(100% - 24px));
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .page-hero {
    padding: 100px 0 60px;
  }

  .search-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid,
  .property-grid,
  .team-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .contact-details,
  .mission-vision,
  .cta-panel {
    gap: 20px;
  }

  .btn-solid,
  .btn-outline {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
