@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary: #4F46E5;
  --color-primary-dark: #3730A3;
  --color-primary-light: #818CF8;
  --color-accent: #F59E0B;
  --color-bg: #FFFFFF;
  --color-bg-tint: #F4F5FA;
  --color-border: #E3E5EE;
  --color-text: #1B1D2A;
  --color-dark: #12131C;
  --color-muted: #676C82;
  --color-surface: #FFFFFF;
  --color-danger: #DC4C4C;
  --color-success: #16A34A;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 3px rgba(27, 29, 42, 0.07), 0 1px 2px rgba(27, 29, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(27, 29, 42, 0.10);
  --shadow-lg: 0 20px 48px rgba(27, 29, 42, 0.16);
  --shadow-glow: 0 10px 30px rgba(79, 70, 229, 0.38);
  --container-w: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--color-primary-light); color: #fff; }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--color-bg-tint); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 999px; border: 3px solid var(--color-bg-tint); }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary-light); }

img, svg { max-width: 100%; display: block; }

a { color: var(--color-primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { text-decoration: underline; color: var(--color-primary-dark); }

h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; color: var(--color-text); }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

.muted { color: var(--color-muted); }
.text-center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.32);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary)); box-shadow: var(--shadow-glow); }

.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-outline:hover { background: rgba(79, 70, 229, 0.08); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline-light:hover { background: rgba(255,255,255,0.14); border-color: #fff; }

.btn-ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn-ghost:hover { background: rgba(103, 108, 130, 0.12); }

.btn-danger { background: transparent; color: var(--color-danger); border-color: var(--color-danger); }
.btn-danger:hover { background: rgba(220, 76, 76, 0.08); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.brand svg { width: 30px; height: 30px; }
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a, .nav-links button.link {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.92rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover, .nav-links button.link:hover {
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .container { padding: 0 24px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 16px;
    display: none;
    gap: 2px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links button.link { text-align: left; padding: 12px 10px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(720px 480px at 85% -10%, rgba(124, 58, 237, 0.45), transparent 65%),
    radial-gradient(620px 500px at -5% 110%, rgba(79, 70, 229, 0.35), transparent 65%),
    var(--color-dark);
  padding: 88px 0 76px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero-copy h1 {
  color: #fff;
  background: linear-gradient(135deg, #fff, #C7D2FE);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-copy p.muted { color: rgba(228, 230, 236, 0.8); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-card {
  background: rgba(255, 255, 255, 0.97);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border-top: 4px solid transparent;
  border-image: linear-gradient(135deg, var(--color-primary), var(--color-accent)) 1;
  padding: 28px;
}

/* ---------- Cards / sections ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.section { padding: 56px 0; }
.section-alt { background: var(--color-bg-tint); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.feature-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 1.4rem;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.32);
}

.card-accent {
  border-top: 3px solid var(--color-primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-accent:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.callout {
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
}

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
  color: var(--color-text);
}
.field .hint { font-size: 0.8rem; color: var(--color-muted); margin-top: 4px; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="date"], input[type="time"], input[type="datetime-local"],
textarea, select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}
textarea { resize: vertical; min-height: 90px; }

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--color-text);
}
.checkbox-field input { width: auto; margin-top: 3px; }

.form-narrow { max-width: 440px; margin: 0 auto; }

/* ---------- Alerts / badges ---------- */
.alert {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-info { background: rgba(79, 70, 229, 0.1); border-color: rgba(79, 70, 229, 0.3); color: var(--color-primary-dark); }
.alert-warn { background: rgba(220, 76, 76, 0.08); border-color: rgba(220, 76, 76, 0.3); color: var(--color-danger); }
.alert-success { background: rgba(22, 163, 74, 0.1); border-color: rgba(22, 163, 74, 0.3); color: var(--color-success); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-active, .badge-confirmed { background: rgba(22, 163, 74, 0.15); color: var(--color-success); }
.badge-draft, .badge-pending_payment { background: rgba(103, 108, 130, 0.16); color: var(--color-muted); }
.badge-paused { background: rgba(245, 158, 11, 0.18); color: #92620A; }
.badge-cancelled, .badge-archived { background: rgba(220, 76, 76, 0.12); color: var(--color-danger); }
.badge-completed { background: rgba(79, 70, 229, 0.15); color: var(--color-primary-dark); }

/* ---------- Listing cards ---------- */
.listing-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.listing-card .thumb {
  height: 130px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-primary), #7C3AED);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.listing-card .thumb.thumb-photo { background-size: cover; background-position: center; }
.listing-price { font-size: 1.15rem; font-weight: 800; color: var(--color-text); }
.listing-meta { font-size: 0.85rem; color: var(--color-muted); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin-bottom: 24px; }
.tab-btn {
  padding: 12px 18px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-in 0.2s ease; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Map view ---------- */
.map-container {
  width: 100%;
  height: 480px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.leaflet-popup-content a { font-weight: 600; }

@media (max-width: 760px) {
  .map-container { height: 60vh; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--color-dark);
  padding: 32px 0;
  margin-top: 40px;
  color: rgba(228, 230, 236, 0.7);
  font-size: 0.85rem;
}
.site-footer a { color: rgba(228, 230, 236, 0.85); }
.site-footer a:hover { color: #fff; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-muted);
}

.divider { height: 1px; background: var(--color-border); border: none; margin: 24px 0; }
