/* ===== Variables ===== */
:root {
  --primary: #1f638e;
  --primary-light: #2a7aad;
  --accent: #d4af37;
  --accent-hover: #c9a227;
  --bg: #f8f9fb;
  --white: #ffffff;
  --text: #1a202c;
  --text-muted: #718096;
  --border: #e2e8f0;
  --shadow: 0 4px 24px rgba(26, 54, 93, 0.08);
  --shadow-lg: 0 12px 48px rgba(26, 54, 93, 0.12);
  --radius: 0;
  --radius-lg: 0;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Anasayfa: şeffaf logo filigranı (body arka planı) */
body.home {
  position: relative;
  isolation: isolate;
}

body.home::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url('/images/logo.png') center 48% / min(72vw, 540px) no-repeat;
  opacity: 0.26;
}

body.home > *:not(.header):not(.floating-contacts):not(#floatingContacts) {
  position: relative;
  z-index: 1;
}

body.home .header {
  z-index: 100;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 128px;
  gap: 16px;
}

.header-inner .nav {
  flex: 1;
  justify-content: center;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.logo img,
.logo-img {
  height: 104px;
  width: auto;
  display: block;
  object-fit: contain;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.2rem;
}

.nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.lang-switcher-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.home .lang-switcher-label {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.home .header.header-scrolled .lang-switcher-label {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: none;
}

.lang-switcher select {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 10px;
  height: 36px;
  cursor: pointer;
  min-width: 110px;
}

.home .lang-switcher select {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.home .header.header-scrolled .lang-switcher select {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.home .lang-switcher select option {
  color: var(--text);
  background: var(--white);
}

.nav a {
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav a:hover, .nav a.active {
  color: var(--primary);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary);
}

/* Ana sayfa: menü üstte saydam, kaydırınca solid */
.home .header {
  background: transparent;
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}

.home .showcase {
  margin-top: -128px;
}

.home .logo {
  color: var(--white);
}

.home .logo img,
.home .logo-img {
  height: 128px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.home .logo-icon {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--accent);
}

.home .nav a {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.home .nav a:hover,
.home .nav a.active {
  color: var(--white);
}

.home .menu-toggle {
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.home .header.header-scrolled {
  background: var(--primary);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.home .header.header-scrolled .nav a {
  text-shadow: none;
}

.home .header.header-scrolled .menu-toggle {
  text-shadow: none;
}

/* ===== Showcase (Vitrin) ===== */
.showcase {
  position: relative;
  width: 100%;
  height: min(72vh, 640px);
  min-height: 380px;
  overflow: hidden;
  background: var(--primary);
}

.showcase-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.6s ease;
  will-change: transform;
  touch-action: pan-y;
}

.showcase-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}

.showcase-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 54, 93, 0.35) 0%, rgba(26, 54, 93, 0.15) 40%, rgba(26, 54, 93, 0.45) 100%);
}

.showcase-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(26, 54, 93, 0.35);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.showcase-btn:hover {
  background: rgba(26, 54, 93, 0.7);
}

.showcase-btn-prev { left: 16px; }
.showcase-btn-next { right: 16px; }

.showcase-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.showcase-dot {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition);
}

.showcase-dot.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ===== Search under vitrin ===== */
.search-section {
  background: var(--bg);
  padding: 36px 0 48px;
  position: relative;
  z-index: 2;
}

.home .search-section {
  background: transparent;
}

.search-intro {
  text-align: center;
  margin-bottom: 24px;
}

.search-intro h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.search-intro p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== Hero (legacy unused) ===== */
.hero {
  color: var(--white);
  padding: 140px 0 110px;
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 40px;
}

/* ===== Search Box ===== */
.search-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  align-items: end;
}

.search-box .field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-box select,
.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.3;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  background: var(--bg);
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}

.search-box select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23718096' d='M1.4 0.6L6 5.2 10.6 0.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--bg);
  cursor: pointer;
}

.search-box input::placeholder {
  color: #a0aec0;
}

.search-box select:hover,
.search-box input:hover {
  border-color: #cbd5e0;
  background-color: var(--white);
}

.search-box select:focus,
.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(31, 99, 142, 0.12);
}

.search-box .btn {
  height: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-dark {
  background: var(--primary);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--primary-light);
}

.btn-danger {
  background: #e53e3e;
  color: var(--white);
}

.btn-danger:hover { background: #c53030; }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ===== Stats ===== */
.stats-section {
  background: var(--bg);
  padding-top: 60px;
}

.home .stats-section {
  background: transparent;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card .number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .label {
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ===== Sections ===== */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.section-header .badge {
  display: inline-block;
  background: rgba(201, 162, 39, 0.15);
  color: var(--accent-hover);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.home-listing-group {
  margin-top: 36px;
}

.home-listing-group:first-of-type {
  margin-top: 8px;
}

.home-listing-group + .home-listing-group {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}

.home-listing-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.home-listing-group-header h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--primary);
  font-weight: 800;
}

.home-listing-link {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-listing-link:hover {
  color: var(--primary-light);
}

/* ===== Property Cards ===== */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

.property-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border-top: 4px solid transparent;
}

.property-card--satilik {
  background: #eef4fb;
  border-top-color: #1f638e;
}

.property-card--kiralik {
  background: #f8f4e8;
  border-top-color: #c9a227;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.property-card {
  cursor: pointer;
}

.property-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.property-card .image-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.property-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.25s ease;
  background: #e8eef3;
}

.property-card img.js-lazy-img:not(.is-loaded) {
  opacity: 0.55;
}

.property-card img.js-lazy-img.is-loaded {
  opacity: 1;
}

.gallery-item img.js-lazy-img:not(.is-loaded) {
  opacity: 0.45;
  background: #e8eef3;
}

.gallery-item img.js-lazy-img.is-loaded {
  opacity: 1;
}

.property-card:hover img {
  transform: scale(1.05);
}

.property-card .badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.property-card .property-code {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary);
  border: 1px solid rgba(31, 99, 142, 0.25);
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.badge-tag {
  padding: 4px 12px;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-sale { background: var(--primary); color: var(--white); }
.badge-rent { background: var(--accent); color: var(--primary); }
.badge-featured { background: #38a169; color: var(--white); }

.property-card .price {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(26, 54, 93, 0.9);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.05rem;
}

.property-card .body {
  padding: 20px;
}

.property-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary);
}

.property-card .location {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.property-card .meta {
  display: flex;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.property-card .meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.feature-card:hover { transform: translateY(-4px); }

.feature-card .icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--primary);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Detail Page ===== */
.detail-hero {
  height: 480px;
  position: relative;
  overflow: hidden;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,54,93,0.8), transparent);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  margin-top: -80px;
  position: relative;
  z-index: 2;
  padding-bottom: 80px;
}

.detail-main {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.detail-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  height: fit-content;
  position: sticky;
  top: 96px;
}

.detail-main h1 {
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.detail-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-hover);
  margin: 16px 0;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.meta-item {
  text-align: center;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}

.meta-item .value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
}

.meta-item .label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.feature-tag {
  background: rgba(26, 54, 93, 0.08);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 500;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: opacity var(--transition), transform 0.3s ease;
}

.gallery-item:hover img {
  opacity: 0.9;
  transform: scale(1.03);
}

.detail-hero {
  cursor: pointer;
}

.hero-gallery-hint {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.hidden {
  display: none !important;
}

.lightbox-stage {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 85vh;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  margin: 0 auto;
}

.lightbox-counter {
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 12px;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 2;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-nav:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 700px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== Filters ===== */
.filters-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 18px;
  align-items: end;
}

.filters-bar .field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filters-bar label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.2;
}

.filters-bar select,
.filters-bar input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  font-size: 0.92rem;
  font-family: inherit;
  line-height: 1.3;
  background: var(--bg);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.filters-bar select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23718096' d='M1.4 0.6L6 5.2 10.6 0.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--bg);
  cursor: pointer;
}

.filters-bar input::placeholder {
  color: #a0aec0;
}

.filters-bar select:hover,
.filters-bar input:hover {
  border-color: #cbd5e0;
  background-color: var(--white);
}

.filters-bar select:focus,
.filters-bar input:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(31, 99, 142, 0.12);
}

.filters-bar select:disabled,
.search-box select:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  background-color: #edf2f7;
}

.filters-bar .btn {
  height: 48px;
  min-width: 120px;
  padding: 0 22px;
  white-space: nowrap;
}

.filters-bar .btn-primary {
  background: var(--accent);
  color: var(--text);
}

.filters-bar .btn-primary:hover {
  background: var(--accent-hover);
}

.filters-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

@media (max-width: 1100px) {
  .filters-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .filters-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
    gap: 14px;
  }

  .filters-actions .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .filters-bar {
    grid-template-columns: 1fr;
  }
}

/* ===== About / Contact ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 400px;
  position: sticky;
  top: 140px;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.about-content p {
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.75;
}

.about-body-wrap {
  margin-bottom: 8px;
}

.about-body {
  position: relative;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-body.is-collapsed {
  max-height: 12.5em;
  overflow: hidden;
}

.about-body.is-collapsed::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.2em;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(248, 249, 251, 0), var(--bg) 90%);
}

.about-more-btn {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-more-btn:hover {
  color: var(--primary-light);
}

.about-more-btn.hidden {
  display: none;
}

.property-code-detail {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 4px 12px;
  background: rgba(31, 99, 142, 0.08);
  color: var(--primary);
  border: 1px solid rgba(31, 99, 142, 0.2);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-info-item .icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--accent);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.whatsapp-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  transition: transform var(--transition);
}

.whatsapp-link:hover {
  transform: translateX(4px);
}

.whatsapp-icon {
  width: 48px;
  height: 48px;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.whatsapp-hint {
  color: #25D366;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
}

.email-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  transition: transform var(--transition);
}

.email-link:hover {
  transform: translateX(4px);
}

.email-hint {
  color: #ea4335;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
}

.map-link {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  transition: transform var(--transition);
}

.map-link:hover {
  transform: translateX(4px);
}

.map-hint {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
}

/* ===== Floating contact buttons ===== */
.floating-contacts {
  position: fixed;
  left: 20px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.floating-btn {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: transform var(--transition), box-shadow var(--transition);
}

.floating-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.floating-btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.floating-btn-gmail {
  background: #fff;
}

@media (max-width: 600px) {
  .floating-contacts {
    left: 12px;
    bottom: 16px;
  }

  .floating-btn {
    width: 48px;
    height: 48px;
  }
}

.contact-form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* ===== Footer ===== */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer a {
  display: block;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
  transition: color var(--transition);
}

.footer a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== Admin ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background: var(--primary);
  color: var(--white);
  padding: 24px;
}

.admin-sidebar h2 {
  font-size: 1.2rem;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-nav a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius);
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
  transition: all var(--transition);
  cursor: pointer;
}

.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.admin-main {
  padding: 32px;
  background: var(--bg);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-table {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table .btn-outline,
.admin-header .btn-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}

.admin-table .btn-outline:hover,
.admin-header .btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 8px;
}

.login-card p {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert-success { background: #c6f6d5; color: #22543d; }
.alert-error { background: #fed7d7; color: #742a2a; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  margin-bottom: 24px;
  color: var(--primary);
}

.hidden { display: none !important; }

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.dashboard-stat {
  background: var(--white);
  padding: 24px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.dashboard-stat .num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.dashboard-stat .lbl {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

.dashboard-stat.sale { border-top-color: #1f638e; }
.dashboard-stat.rent { border-top-color: #d4af37; }
.dashboard-stat.msg { border-top-color: #25D366; }

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.property-description {
  color: var(--text-muted);
  line-height: 1.8;
}

.property-description p,
.property-description div {
  margin: 0 0 0.75em;
}

.property-description p:last-child,
.property-description div:last-child {
  margin-bottom: 0;
}

.property-description ul,
.property-description ol {
  margin: 0.5em 0 0.75em 1.25em;
}

.property-description li {
  margin-bottom: 0.25em;
}

.content-lang-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.content-lang-tab {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.content-lang-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.content-lang-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.lang-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--bg);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}

.rich-editor {
  border: 2px solid var(--border);
  background: var(--white);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.rich-toolbar button {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  min-width: 36px;
  height: 34px;
  padding: 0 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rich-toolbar button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.rich-toolbar button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.rich-toolbar button.is-active:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: #fff;
}

.rich-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 4px;
}

.rich-toolbar select {
  padding: 4px 6px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.85rem;
  background: var(--white);
  height: 34px;
  color: var(--text);
  cursor: pointer;
  flex: 0 0 auto;
  max-width: 100%;
}

.rich-toolbar .font-family-select {
  width: 110px;
}

.rich-toolbar #titleFontSize,
.rich-toolbar #descFontSize {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  height: 28px;
  padding: 0 2px 0 4px;
  font-size: 0.75rem;
}

.rich-editor-body {
  min-height: 180px;
  padding: 14px;
  outline: none;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

.rich-editor-body:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}

.rich-editor-body-title {
  min-height: 52px;
  font-size: 1.15rem;
  font-weight: 700;
}

.property-card h3,
.property-title {
  font-weight: 700;
}

.rich-editor-title .rich-toolbar {
  padding: 8px 10px;
}

.toast-host {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(440px, calc(100% - 32px));
  pointer-events: none;
}

.toast {
  padding: 14px 18px;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
}

.toast-success {
  background: #22543d;
  color: #fff;
}

.toast-error {
  background: #742a2a;
  color: #fff;
}

.admin-tabs-bar {
  display: none;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-tabs-bar button {
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-tabs-bar button.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.image-preview .preview-item {
  position: relative;
  width: 120px;
  height: 96px;
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  background: #111;
}

.image-preview .preview-item.is-cover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}

.image-preview .preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview .preview-item .cover-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent);
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
}

.image-preview .preview-item .cover-select-btn {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border: none;
  background: rgba(26, 54, 93, 0.85);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 4px;
  cursor: pointer;
  font-family: inherit;
}

.image-preview .preview-item.is-cover .cover-select-btn {
  background: rgba(212, 175, 55, 0.95);
  color: var(--primary);
}

.video-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.video-preview-item {
  position: relative;
  background: #0f172a;
  border: 1px solid var(--border);
  overflow: hidden;
}

.video-preview-item video {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #000;
}

.video-preview-item .video-file-name {
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: rgba(185, 28, 28, 0.92);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

.property-videos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.property-video-item video {
  width: 100%;
  max-height: 420px;
  background: #000;
  display: block;
}

.property-video-label {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 108px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 24px;
    box-shadow: var(--shadow);
    gap: 16px;
  }

  .home .nav.open {
    background: var(--primary);
  }

  .home .nav.open a {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: none;
  }

  .menu-toggle { display: block; }

  .lang-switcher-label {
    display: none;
  }

  .lang-switcher {
    margin-left: auto;
    margin-right: 10px;
  }

  .logo img,
  .logo-img {
    height: 88px;
  }

  .home .logo img,
  .home .logo-img {
    height: 102px;
  }

  .header-inner {
    height: 108px;
  }

  .home .showcase {
    margin-top: -108px;
  }

  .showcase {
    height: min(55vh, 420px);
    min-height: 280px;
  }

  .showcase-btn {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }

  .detail-layout,
  .about-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    position: static;
    top: auto;
    height: 260px;
    z-index: auto;
  }

  .about-content {
    position: relative;
    z-index: 1;
  }

  .detail-sidebar { position: static; }

  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-tabs-bar { display: flex; }

  .form-row { grid-template-columns: 1fr; }
  .properties-grid { grid-template-columns: 1fr; }
}
