/* ===========================================================================
   Ever Trust Investment - Real Estate Solutions
   Palette: Bottle Green + Golden + White
   =========================================================================== */

:root {
  --green-900: #022016;
  --green-800: #04301f;
  --green-700: #06402b;
  --green-600: #0a5138;
  --green-500: #12674a;
  --green-050: #f2f7f4;

  --gold-600: #a8801f;
  --gold-500: #c9a227;
  --gold-400: #dcb843;
  --gold-200: #f0dda3;

  --white: #ffffff;
  --paper: #fbfaf7;
  --line: #e3e8e4;
  --ink: #06402b;
  --ink-soft: #4a6155;

  --radius: 12px;
  --shadow-sm: 0 2px 10px rgba(2, 32, 22, 0.06);
  --shadow-md: 0 12px 34px rgba(2, 32, 22, 0.12);
  --font-head: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --max: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-600); text-decoration: none; }
a:hover { color: var(--gold-600); }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--green-700);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--tint { background: var(--green-000); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--ink-soft); }
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-600);
  font-weight: 700;
  margin-bottom: 10px;
}

/* --------------------------------------------------------------- Top bar */
.topbar {
  background: var(--green-900);
  color: var(--gold-200);
  font-size: 0.82rem;
  padding: 8px 0;
}
.topbar .container { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; align-items: center; }
.topbar a { color: var(--gold-200); }
.topbar a:hover { color: var(--white); }

/* --------------------------------------------------------------- Header */
.site-header {
  background: var(--white);
  color: var(--green-700);
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--green-700); }
.brand:hover { color: var(--green-700); }
.brand-logo {
  height: 46px; width: 46px; flex: 0 0 46px;
  display: block;
  object-fit: contain;
  background: var(--white);
  border-radius: 50%;
  padding: 3px;
}
.footer-logo {
  height: 54px; width: 54px; display: block; margin-bottom: 14px;
  object-fit: contain;
  background: var(--white);
  border-radius: 50%;
  padding: 5px;
}
.brand-mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 50%;
  border: 2px solid var(--gold-500);
  display: grid; place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--gold-500);
  letter-spacing: 0.02em;
}
.brand-text strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.06rem;
  color: var(--green-700);
  line-height: 1.2;
}
.brand-text span {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-600);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--green-700);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
}

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
  display: block;
  color: var(--green-700);
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
}
.main-nav a:hover, .main-nav a.is-active {
  color: var(--gold-600);
  background: var(--green-050);
}
.main-nav .btn--gold, .main-nav .btn--gold:hover { color: var(--green-900); }
.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: 0.7rem; color: var(--gold-600); }
.submenu {
  position: absolute;
  left: 0; top: 100%;
  min-width: 250px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold-500);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  padding: 8px;
  display: none;
  flex-direction: column;
}
.has-sub:hover .submenu, .has-sub.is-open .submenu { display: flex; }
.submenu a { color: var(--green-700); font-size: 0.88rem; padding: 9px 12px; }
.submenu a:hover { background: var(--green-050); color: var(--gold-600); }


/* --------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); }
.btn--gold { background: var(--gold-500); color: var(--green-900); }
.btn--gold:hover { background: var(--gold-400); color: var(--green-900); box-shadow: var(--shadow-md); }
.btn--green { background: var(--green-700); color: var(--white); }
.btn--green:hover { background: var(--green-600); color: var(--white); }
.btn--outline { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn--outline:hover { background: var(--green-700); color: var(--white); }
.btn--ghost-light { border-color: rgba(255, 255, 255, 0.6); color: var(--white); }
.btn--ghost-light:hover { background: var(--white); color: var(--green-700); }
.btn--sm { padding: 7px 15px; font-size: 0.82rem; }
.btn--block { width: 100%; }
.btn--danger { background: #8d2020; color: #fff; }

/* --------------------------------------------------------------- Hero */
.hero {
  position: relative;
  color: var(--white);
  background: var(--green-800);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(2, 32, 22, 0.94) 0%, rgba(4, 48, 31, 0.85) 45%, rgba(6, 64, 43, 0.55) 100%);
}
.hero__inner { position: relative; padding: 104px 0 96px; max-width: 720px; }
.hero h1 { color: var(--white); }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero p.lead { font-size: 1.08rem; color: rgba(255, 255, 255, 0.88); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 46px; }
.hero__stats div strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.7rem;
  color: var(--gold-400);
}
.hero__stats div span { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }

/* --------------------------------------------------------------- Grids */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* Intent cards */
.intent-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold-500);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.intent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.intent-card h3 { margin-bottom: 8px; }
.intent-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* Category pill list */
.cat-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-pill {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--green-700);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.87rem;
  font-weight: 500;
}
.cat-pill:hover, .cat-pill.is-active { background: var(--green-700); color: var(--white); border-color: var(--green-700); }

/* --------------------------------------------------------------- Property cards */
.property-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.property-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--green-050); }
.property-card__media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
}
.badge--intent { position: absolute; top: 12px; left: 12px; background: var(--green-700); color: var(--white); }
.badge--featured { position: absolute; top: 12px; right: 12px; background: var(--gold-500); color: var(--green-900); }
.badge--muted { background: var(--green-050); color: var(--ink-soft); }
.badge--pending { background: var(--gold-200); color: var(--green-800); }
.badge--approved { background: var(--green-700); color: var(--white); }
.badge--rejected { background: #f2dede; color: #8d2020; }
.badge--hidden { background: #e6e6e6; color: #555; }

.property-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.property-card__body h3 { font-size: 1.06rem; margin: 0; }
.property-card__body h3 a { color: var(--green-700); }
.property-card__meta { font-size: 0.85rem; color: var(--ink-soft); }
.property-card__price {
  font-family: var(--font-head);
  font-size: 1.22rem;
  color: var(--gold-600);
  font-weight: 700;
}
.property-card__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--ink-soft); }
.property-card__foot { margin-top: auto; padding-top: 12px; }

/* --------------------------------------------------------------- Filter bar */
.filter-bar {
  background: var(--green-050);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 30px;
}
.filter-bar form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.filter-bar label { display: block; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); font-weight: 700; margin-bottom: 5px; }

/* --------------------------------------------------------------- Forms */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { display: block; }
.field--full { grid-column: 1 / -1; }
.field > label { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-700); font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 5px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="password"], input[type="date"], input[type="url"], input[type="file"],
select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.94rem;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}
.check { display: flex; align-items: center; gap: 9px; font-size: 0.92rem; }
.check input { width: auto; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card--panel { border-top: 4px solid var(--gold-500); }

/* --------------------------------------------------------------- Alerts */
.alert {
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: 0.93rem;
  border-left: 4px solid var(--gold-500);
  background: var(--green-050);
  color: var(--green-800);
}
.alert-success { border-left-color: var(--green-600); }
.alert-error { border-left-color: #8d2020; background: #fbf1f1; color: #6f1a1a; }

/* --------------------------------------------------------------- Page hero */
.page-hero { background: var(--green-700); color: var(--white); padding: 58px 0; }
.page-hero h1 { color: var(--white); margin-bottom: 6px; }
.page-hero p { color: var(--gold-200); margin: 0; }
.breadcrumb { font-size: 0.8rem; color: rgba(255, 255, 255, 0.75); margin-bottom: 10px; }
.breadcrumb a { color: var(--gold-400); }

/* --------------------------------------------------------------- Ads */
.ad-slot { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 26px 0; }
.ad-card {
  display: block;
  border: 1px solid var(--gold-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}
.ad-card img { width: 100%; height: auto; }
.ad-card .ad-body { padding: 14px 16px; }
.ad-card h4 { margin: 0 0 4px; font-size: 1rem; }
.ad-card p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); }

/* --------------------------------------------------------------- Detail page */
.detail-layout { display: grid; gap: 34px; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.detail-gallery img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.spec-table th { width: 42%; color: var(--ink-soft); font-weight: 600; }

.contact-box { background: var(--green-700); color: var(--white); border-radius: var(--radius); padding: 24px; }
.contact-box h3 { color: var(--white); }
.contact-box a { color: var(--gold-400); }
.contact-box .price { font-family: var(--font-head); font-size: 1.7rem; color: var(--gold-400); }

/* --------------------------------------------------------------- Tables (admin) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; min-width: 760px; }
table.data th, table.data td { padding: 12px 14px; text-align: left; font-size: 0.89rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data thead th { background: var(--green-700); color: var(--white); font-weight: 600; letter-spacing: 0.04em; }
table.data tbody tr:hover { background: var(--green-050); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.thumb { width: 68px; height: 50px; object-fit: cover; border-radius: 6px; }

/* --------------------------------------------------------------- Admin shell */
.admin-body { background: var(--paper); }
.admin-header { background: var(--green-800); color: var(--white); }
.admin-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; flex-wrap: wrap; }
.admin-header a { color: var(--white); }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-nav a { padding: 8px 13px; border-radius: 8px; font-size: 0.88rem; }
.admin-nav a:hover, .admin-nav a.is-active { background: rgba(255, 255, 255, 0.1); color: var(--gold-400); }
.stat-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 30px; }
.stat {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold-500);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
}
.stat strong { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--green-700); }
.stat span { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.login-shell { min-height: 100vh; display: grid; place-items: center; background: var(--green-800); padding: 30px 16px; }
.login-card { width: 100%; max-width: 420px; background: var(--white); border-radius: 16px; padding: 34px; box-shadow: var(--shadow-md); border-top: 5px solid var(--gold-500); }

/* --------------------------------------------------------------- Footer */
.site-footer { background: var(--green-900); color: rgba(255, 255, 255, 0.8); padding: 56px 0 0; margin-top: 20px; }
.site-footer h4 { color: var(--white); font-size: 1rem; }
.site-footer a { color: rgba(255, 255, 255, 0.8); }
.site-footer a:hover { color: var(--gold-400); }
.footer-grid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 0.9rem; }
.footer-bottom {
  margin-top: 40px; border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 18px 0; font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: 18px; }
.mb-0 { margin-bottom: 0; }
.flex-between { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 12px;
    box-shadow: var(--shadow-md);
    max-height: 74vh;
    overflow-y: auto;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .submenu { position: static; box-shadow: none; border-radius: 8px; margin: 4px 0 8px 12px; }
  .site-header .container { position: relative; flex-wrap: wrap; }
  .hero__inner { padding: 72px 0 64px; }
}

/* --------------------------------------------------------------- Property media */
.media-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 14px; }
.media-tab {
  border: 1px solid var(--line); background: var(--white); color: var(--green-900);
  border-radius: 999px; padding: 8px 18px; font-size: 0.88rem; font-weight: 600; cursor: pointer;
}
.media-tab:hover { border-color: var(--green-700, var(--green-900)); }
.media-tab.is-active { background: var(--green-900); color: var(--white); border-color: var(--green-900); }
.media-panel { display: none; }
.media-panel.is-active { display: block; }

.media-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.media-grid img { width: 100%; height: 170px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.media-figure { margin: 0; }
.media-figure figcaption { font-size: 0.8rem; color: var(--ink-soft); margin-top: 6px; }
.media-plan img { height: auto; max-height: 520px; object-fit: contain; background: var(--white); }

.media-frame {
  position: relative; width: 100%; padding-top: 56.25%;
  border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000;
}
.media-frame iframe, .media-frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.media-frame--social { padding-top: 125%; background: var(--white); }
.media-stack { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.map-frame { padding-top: 62%; }
.media-link { font-size: 0.86rem; word-break: break-all; }

.admin-media-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.admin-media-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 0.8rem; }
.admin-media-item img, .admin-media-item video { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; }
