/* =====================================================================
   Phetora Estate — custom theme layered over Bootstrap 5
   Palette: deep navy + estate blue, generous whitespace, soft shadows.
   ===================================================================== */

:root {
  /* Blue colour scheme */
  --navy-900: #071b33;
  --navy-800: #0b2545;
  --navy-700: #12345e;
  --blue-700: #14539a;
  --blue-600: #1a68c4;
  --blue-500: #2a7de1;
  --blue-300: #7fb2f0;
  --blue-100: #dbe9fb;
  --blue-050: #f2f7fe;

  --ink: #10233c;
  --ink-muted: #5a6b81;
  --line: #e3eaf3;
  --surface: #ffffff;
  --surface-alt: #f6f9fd;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 8px rgba(11, 37, 69, .06);
  --shadow: 0 12px 30px rgba(11, 37, 69, .09);
  --shadow-lg: 0 24px 60px rgba(11, 37, 69, .16);

  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ------------------------------ Base ------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

h1, h2, h3, h4, .brand-text {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  color: var(--navy-800);
}

a { text-decoration: none; }
img { max-width: 100%; }

::selection { background: var(--blue-100); color: var(--navy-900); }

:focus-visible {
  outline: 3px solid var(--blue-300);
  outline-offset: 2px;
  border-radius: 6px;
}

.section { padding: 5.5rem 0; }
@media (max-width: 767.98px) { .section { padding: 3.5rem 0; } }

/* ---------------------------- Buttons ------------------------------ */
.btn {
  --bs-btn-font-weight: 600;
  border-radius: 999px;
  padding: .7rem 1.5rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .2s var(--ease), color .2s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.btn-lg { padding: .9rem 1.9rem; font-size: 1rem; }
.btn-sm { padding: .4rem 1rem; font-size: .85rem; }

.btn-brand {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-700));
  border: 1px solid transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(26, 104, 196, .28);
}
.btn-brand:hover, .btn-brand:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(26, 104, 196, .34);
}
.btn-brand:active { transform: translateY(0); }

.btn-outline-brand {
  border: 1.5px solid var(--blue-600);
  color: var(--blue-700);
  background: transparent;
}
.btn-outline-brand:hover { background: var(--blue-600); color: #fff; }

.btn-ghost {
  border: 1.5px solid var(--line);
  color: var(--navy-800);
  background: var(--surface);
}
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--blue-300); color: var(--navy-900); }

.btn-danger { border-radius: 999px; }

/* ---------------------------- Navbar ------------------------------- */
/* Solid blue — no gradient */
.site-header {
  background: var(--navy-800);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  transition: box-shadow .3s var(--ease);
  z-index: 1030;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }

.site-header .navbar { padding: .85rem 0; }

.navbar-brand { font-size: 1.15rem; font-weight: 800; }
.brand-text { color: #fff; }
.brand-text-accent { color: var(--blue-300); font-weight: 600; }

.brand-mark {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--navy-800));
  box-shadow: 0 6px 16px rgba(7, 27, 51, .35);
}
.brand-mark--footer { background: rgba(255, 255, 255, .12); box-shadow: none; }

.site-header .nav-link {
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  padding: .55rem .95rem;
  border-radius: 999px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.site-header .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.site-header .nav-link.active { color: #fff; background: rgba(255, 255, 255, .18); }

.navbar-toggler { border: 1px solid rgba(255, 255, 255, .4); border-radius: 10px; padding: .35rem .6rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(127, 178, 240, .5); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Discord button in the navbar */
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1.5px solid rgba(255, 255, 255, .55);
  background: transparent;
  color: #fff;
  font-weight: 600;
  font-size: .88rem;
  border-radius: 999px;
  padding: .48rem 1.15rem;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .2s var(--ease);
}
.btn-discord:hover {
  background: #5865F2;
  border-color: #5865F2;
  color: #fff;
  transform: translateY(-1px);
}
.btn-discord svg { flex-shrink: 0; }

/* ----------------------------- Flash ------------------------------- */
.flash-stack { padding-top: 1.25rem; }
.flash-stack .alert {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

/* ------------------------- Compact hero ---------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--navy-800);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.hero__media {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  z-index: -2;
}
.hero__overlay {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 27, 51, .82) 0%, rgba(7, 27, 51, .55) 50%, rgba(7, 27, 51, .86) 100%),
    radial-gradient(100% 100% at 20% 30%, rgba(26, 104, 196, .35) 0%, transparent 60%);
}

.hero__inner {
  position: relative;
  padding: 4.5rem 0 3.5rem;      /* compact */
  max-width: 820px;
  color: #fff;
}
@media (max-width: 767.98px) { .hero__inner { padding: 3.5rem 0 2.75rem; } }

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--blue-300);
  margin-bottom: .75rem;
}

.hero__title {
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.1;
  margin-bottom: .9rem;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}

.hero__subtitle {
  color: rgba(255, 255, 255, .88);
  font-size: clamp(.98rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 1.75rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__cta { box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }

/* -------------------------- Value strip ---------------------------- */
.value-strip { background: var(--surface-alt); padding: 4rem 0; border-bottom: 1px solid var(--line); }

.value-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.value-icon {
  width: 46px; height: 46px;
  display: inline-grid; place-items: center;
  border-radius: 14px;
  background: var(--blue-100);
  color: var(--blue-700);
  margin-bottom: 1.1rem;
}
.value-title { font-size: 1.1rem; margin-bottom: .5rem; }
.value-text { color: var(--ink-muted); font-size: .95rem; margin: 0; line-height: 1.65; }

/* ------------------------- Section headings ------------------------ */
.section-head { max-width: 660px; margin: 0 auto 3rem; text-align: center; }
.section-eyebrow {
  text-transform: uppercase; letter-spacing: .16em;
  font-size: .74rem; font-weight: 700; color: var(--blue-600); margin-bottom: .6rem;
}
.section-title { font-size: clamp(1.85rem, 3.4vw, 2.6rem); font-weight: 800; margin-bottom: .75rem; }
.section-lead { color: var(--ink-muted); font-size: 1.02rem; margin: 0; }

/* -------------------------- Property cards ------------------------- */
.property-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.property-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-100);
}

/* Fixed 4:3 ratio + object-fit => consistent crops, zero distortion */
.property-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--blue-050);
}
.property-card__media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  transition: transform .6s var(--ease);
}
.property-card:hover .property-card__media img { transform: scale(1.06); }

.property-card__badge {
  position: absolute; top: 1rem; left: 1rem;
  background: rgba(255, 255, 255, .94);
  color: var(--blue-700);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .38rem .75rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.property-card__body {
  display: flex; flex-direction: column; flex: 1 1 auto;
  padding: 1.5rem 1.5rem 1.6rem;
}
.property-card__title {
  font-size: 1.15rem; font-weight: 700; line-height: 1.35;
  margin-bottom: .4rem;
}
.property-card__price {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 800; color: var(--blue-700);
  margin-bottom: 1.35rem;
}

/* --------------------------- Empty state --------------------------- */
.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  border: 1px dashed var(--blue-100);
  border-radius: var(--radius-lg);
  background: var(--blue-050);
}
.empty-state__icon {
  width: 62px; height: 62px; margin: 0 auto 1.1rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff; color: var(--blue-600);
  box-shadow: var(--shadow-sm);
}
.empty-state__title { font-size: 1.25rem; margin-bottom: .5rem; }
.empty-state__text { color: var(--ink-muted); }

/* ------------------------- Property detail ------------------------- */
.page-lead { padding: 2rem 0 1.5rem; background: var(--surface-alt); border-bottom: 1px solid var(--line); }
.page-breadcrumb { margin: 0; font-size: .9rem; }
.page-breadcrumb a { color: var(--ink-muted); }
.page-breadcrumb a:hover { color: var(--blue-700); }
.page-breadcrumb .breadcrumb-item.active { color: var(--navy-800); font-weight: 600; }
.page-lead + .section { padding-top: 3rem; }

.detail-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--blue-050);
  aspect-ratio: 4 / 3;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.detail-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  position: sticky; top: 100px;
}
@media (max-width: 991.98px) { .detail-panel { position: static; } }

.detail-badge {
  display: inline-block;
  background: var(--blue-100); color: var(--blue-700);
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .75rem; border-radius: 999px; margin-bottom: 1rem;
}
.detail-title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: .5rem; }
.detail-price {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 800; color: var(--blue-700); margin: 0;
}
.detail-rule { border-color: var(--line); margin: 1.5rem 0; }
.detail-note { color: var(--ink-muted); font-size: .95rem; line-height: 1.7; margin-bottom: 1.5rem; }

.detail-section-title { font-size: 1.45rem; font-weight: 800; margin-bottom: 1rem; }
.detail-description { color: #33445c; font-size: 1.03rem; line-height: 1.85; }
.detail-description p { margin-bottom: 1.15rem; }
.detail-description p:last-child { margin-bottom: 0; }

/* ----------------------------- Auth ------------------------------- */
.auth-wrap {
  padding: 5rem 0;
  background:
    radial-gradient(80% 60% at 50% 0%, var(--blue-050) 0%, transparent 70%),
    var(--surface);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.auth-card__head { text-align: center; margin-bottom: 1.75rem; }
.auth-icon {
  width: 52px; height: 52px; margin: 0 auto 1rem;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-600), var(--navy-800));
  color: #fff;
  box-shadow: 0 10px 24px rgba(11, 37, 69, .22);
}
.auth-title { font-size: 1.6rem; font-weight: 800; margin-bottom: .35rem; }
.auth-subtitle { color: var(--ink-muted); font-size: .95rem; margin: 0; }
.auth-footnote { color: var(--ink-muted); font-size: .85rem; text-align: center; }
.link-muted { color: var(--ink-muted); font-weight: 500; }
.link-muted:hover { color: var(--blue-700); }

/* ---------------------------- Staff UI ---------------------------- */
.staff-head {
  padding: 3rem 0 1.5rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}
.staff-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.staff-subtitle { color: var(--ink-muted); font-size: .95rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panel-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .5rem; }
.panel-text { color: var(--ink-muted); font-size: .9rem; }

.staff-table { --bs-table-hover-bg: var(--blue-050); }
.staff-table thead th {
  background: var(--surface-alt);
  color: var(--ink-muted);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
  white-space: nowrap;
}
.staff-table tbody td { padding: 1rem 1.25rem; border-color: var(--line); vertical-align: middle; }
.staff-table .col-thumb { width: 120px; }

.table-thumb {
  width: 96px; height: 68px;
  object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--blue-050);
}
.staff-table__name { font-weight: 700; color: var(--navy-800); }
.staff-table__name:hover { color: var(--blue-700); }
.staff-table__id { font-size: .78rem; color: var(--ink-muted); margin-top: .15rem; }

.preview-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--blue-050);
}
.preview-media img { width: 100%; height: 100%; object-fit: cover; }

/* --------------------------- Forms -------------------------------- */
.form-label { font-weight: 600; color: var(--navy-800); font-size: .92rem; }
.form-control, .input-group-text {
  border-radius: var(--radius-sm);
  border-color: var(--line);
  padding: .7rem .9rem;
  font-size: .97rem;
}
.form-control:focus {
  border-color: var(--blue-300);
  box-shadow: 0 0 0 .22rem rgba(42, 125, 225, .16);
}
.input-group-text { background: var(--surface-alt); color: var(--ink-muted); font-weight: 600; }
.input-group .form-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group .input-group-text:first-child {
  border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.form-text { color: var(--ink-muted); font-size: .84rem; }
textarea.form-control { min-height: 160px; }

/* --------------------- Delete confirmation ------------------------ */
.danger-icon {
  width: 58px; height: 58px; margin: 0 auto 1.25rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fdecec; color: #c0392b;
}
.confirm-title { font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 800; margin-bottom: .5rem; }
.confirm-text { color: var(--ink-muted); margin-bottom: 1.75rem; }
.confirm-summary {
  display: flex; align-items: center; gap: 1rem;
  justify-content: center; flex-wrap: wrap;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.confirm-thumb {
  width: 110px; height: 78px; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--line);
}
.confirm-summary__name { font-weight: 700; color: var(--navy-800); }
.confirm-summary__meta { font-size: .88rem; color: var(--ink-muted); }

/* --------------------------- Error pages -------------------------- */
.error-page {
  padding: 7rem 0;
  background:
    radial-gradient(70% 60% at 50% 0%, var(--blue-050) 0%, transparent 70%),
    var(--surface);
}
.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--blue-500), var(--navy-800));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: .5rem;
}
.error-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-bottom: .75rem; }
.error-text { color: var(--ink-muted); max-width: 480px; margin: 0 auto 2rem; }

/* ----------------------------- Footer ----------------------------- */
.site-footer {
  background: linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: rgba(255, 255, 255, .78);
  padding: 4rem 0 2rem;
  margin-top: auto;
}
.site-footer .brand-text { color: #fff; }
.site-footer .brand-text-accent { color: var(--blue-300); }
.footer-brand { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.footer-copy { color: rgba(255, 255, 255, .70); font-size: .94rem; line-height: 1.75; max-width: 46ch; }
.footer-heading {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .14em;
  color: #fff; font-weight: 700; margin-bottom: 1rem;
}
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: .6rem; }
.footer-list a { color: rgba(255, 255, 255, .72); font-size: .94rem; transition: color .2s var(--ease); }
.footer-list a:hover { color: #fff; }
.footer-rule { border-color: rgba(255, 255, 255, .14); margin: 2.5rem 0 1.5rem; opacity: 1; }
.footer-legal { color: rgba(255, 255, 255, .55); font-size: .84rem; }

/* ------------------------ Reduced motion -------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}