/* ================================================================
   ХАНСКИЙ — Cinematic Dark Style
   Inspired by: vacantions.jpg — dark navy-black bg, gold metallic
   brand title, white wide-tracked headings, subtle card blocks
   ================================================================ */

/* Google Fonts removed — Tor-compatible system font stack */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Background — dark desaturated blue-black like the vacancy poster */
  --bg:         #07080d;
  --bg2:        #0b0d14;
  --bg3:        #111520;

  /* Gold — metallic, warm */
  --gold:       #c9a234;
  --gold-light: #e8c96a;
  --gold-dim:   #6a5418;
  --gold-glow:  rgba(201,162,52,.22);

  /* Text */
  --white:      #ede8e0;
  --text:       #a09880;
  --text-dim:   #5a5548;

  /* Borders */
  --border:     rgba(201,162,52,.18);
  --border-mid: rgba(201,162,52,.32);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background image — opacity and url controlled via inline style from PHP */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
}

/* Cinematic vignette — dark edges like in the poster */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 50% at 50% -10%, rgba(201,162,52,.05) 0%, transparent 55%),
    radial-gradient(ellipse 100% 40% at 50% 110%, rgba(0,0,20,.8) 0%, transparent 60%),
    radial-gradient(ellipse 30% 100% at 0% 50%, rgba(0,0,0,.5) 0%, transparent 50%),
    radial-gradient(ellipse 30% 100% at 100% 50%, rgba(0,0,0,.5) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

/* ── LOADER ─────────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  gap: 0;
  transition: opacity .7s ease, visibility .7s ease;
}
#loader.hidden { opacity: 0; visibility: hidden; }

.loader-shield {
  width: 275px;
  height: 275px;
  object-fit: contain;
  animation: spinShield 2.8s linear infinite;
  filter: drop-shadow(0 0 22px rgba(201,162,52,.65));
}
@keyframes spinShield {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.loader-textimg {
  margin-top: 24px;
  height: 130px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(201,162,52,.45));
}

/* ── HEADER ──────────────────────────────────────────────────── */
header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(7,8,13,.6);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-shield {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 0 7px rgba(201,162,52,.5));
  transition: transform .5s ease;
}
.header-brand:hover .brand-shield { transform: rotate(45deg); }

.brand-textimg {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(201,162,52,.35));
}

/* ── HEADER NAV ──────────────────────────────────────────────── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hnav-btn {
  padding: 7px 14px;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color .25s, border-color .25s, background .25s;
  white-space: nowrap;
}
.hnav-btn:hover {
  color: var(--white);
  border-color: var(--border);
  background: rgba(201,162,52,.06);
}
.hnav-btn.active {
  color: var(--gold);
  border-color: var(--border-mid);
  background: rgba(201,162,52,.07);
}

/* ── MAIN LAYOUT ─────────────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 52px 20px 64px;
}

/* ── SECTION HEADING — like "ВАКАНСИИ" in poster ─────────────── */
.section-heading {
  text-align: center;
  margin-bottom: 36px;
}
/* small label above (like "РАБОТА У ХАНСКОГО") */
.section-heading .label {
  display: block;
  font-size: .6rem;
  letter-spacing: .45em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 500;
}
.section-heading h1,
.section-heading h2 {
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.1;
}
.section-heading p {
  margin-top: 12px;
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--text);
  line-height: 1.7;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ── ORNAMENT ────────────────────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 40px;
  max-width: 360px;
}
.ornament::before, .ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.ornament span {
  font-size: .85rem;
  color: var(--gold-dim);
}

/* ── MAIN NAV BUTTONS ────────────────────────────────────────── */
.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 44px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: none !important;
  border: 1px solid var(--border);
  border-radius: 2px;
  text-decoration: none;
  color: var(--white);
  transition: border-color .3s, transform .2s;
}
.nav-btn:hover {
  border-color: var(--border-mid);
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.btn-title {
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
}
.btn-arrow {
  margin-left: auto;
  font-size: 1rem;
  color: var(--gold-dim);
  transition: color .3s, transform .3s;
}
.nav-btn:hover .btn-arrow { color: var(--gold); transform: translateX(5px); }

/* ── SECONDARY NAV (grid) ────────────────────────────────────── */
.secondary-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.sec-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 2px;
  text-decoration: none;
  color: var(--text);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: color .3s, border-color .3s, background .3s;
}
.sec-btn:hover {
  color: var(--white);
  border-color: var(--border-mid);
  background: rgba(201,162,52,.06);
}
.sec-icon { font-size: .95rem; }

/* ── CITIES ──────────────────────────────────────────────────── */
.cities-section {
  margin-top: 48px;
}
.cities-section .section-heading { margin-bottom: 18px; }
.cities-section .section-heading h2 { font-size: 1.1rem; letter-spacing: .38em; }

.cities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.city-tag {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 1px;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: color .3s, border-color .3s;
}
.city-tag:hover { color: var(--text); border-color: var(--gold-dim); }

/* ── IMAGE PAGES (price / opt_price / vacancies) ─────────────── */
.img-page-wrap {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 16px 64px;
}
.img-page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 22px;
  transition: color .3s;
}
.img-page-back:hover { color: var(--gold); }
.img-page-title {
  text-align: center;
  margin-bottom: 22px;
}
.img-page-title h1 {
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: .35em;
  color: var(--white);
  text-transform: uppercase;
}
.img-page-photo {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 8px 60px rgba(0,0,0,.7);
}

/* ── ABOUT PAGE ──────────────────────────────────────────────── */
.about-block {
  background: linear-gradient(135deg, rgba(17,21,32,.9) 0%, rgba(8,10,16,1) 100%);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 28px 26px;
  margin-bottom: 16px;
}
.about-block h3 {
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .35em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.about-block p {
  font-size: .88rem;
  line-height: 1.8;
  color: var(--text);
  letter-spacing: .04em;
}
.about-block ul { list-style: none; }
.about-block ul li {
  padding: 4px 0;
  font-size: .87rem;
  color: var(--text);
  letter-spacing: .05em;
}
.about-block ul li::before {
  content: '— ';
  color: var(--gold-dim);
}
.cities-list-about { columns: 2; column-gap: 20px; }
@media (max-width: 400px) { .cities-list-about { columns: 1; } }

/* ── PAGE NAV ────────────────────────────────────────────────── */
.page-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 44px;
}
.page-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}
.page-nav a:hover { color: var(--gold); border-color: var(--gold-dim); }

/* ── FOOTER ──────────────────────────────────────────────────── */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 18px 24px 26px;
  border-top: 1px solid var(--border);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
footer span { color: var(--gold-dim); }

/* ── ADMIN ───────────────────────────────────────────────────── */
.admin-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 20px 64px;
}
.admin-wrap h1 {
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--white);
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 36px;
}
.admin-card {
  background: linear-gradient(135deg, rgba(17,21,32,.95) 0%, rgba(10,12,18,1) 100%);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 26px;
  margin-bottom: 20px;
}
.admin-card h2 {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.field-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201,162,52,.06);
}
.field-group:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.field-group label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: var(--text-dim);
  text-transform: uppercase;
  min-width: 64px;
}
.field-group input[type=text],
.field-group input[type=url] {
  background: rgba(0,0,0,.4);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--white);
  font-size: .85rem;
  padding: 8px 12px;
  flex: 1;
  min-width: 120px;
  outline: none;
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  transition: border-color .3s;
}
.field-group input:focus { border-color: var(--gold); }

textarea.cities-input {
  width: 100%;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--white);
  font-size: .85rem;
  padding: 10px 14px;
  resize: vertical;
  min-height: 120px;
  outline: none;
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  transition: border-color .3s;
}
textarea.cities-input:focus { border-color: var(--gold); }
.admin-hint {
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--text-dim);
  margin-top: 7px;
}

.btn-save {
  display: block;
  width: 100%;
  margin-top: 26px;
  padding: 15px;
  background: transparent;
  border: 1px solid var(--gold-dim);
  border-radius: 2px;
  color: var(--gold);
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.btn-save:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(201,162,52,.18);
  background: rgba(201,162,52,.05);
}

.msg-ok  { color: #6db87a; text-align: center; font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; margin-top: 12px; }
.msg-err { color: #b86d6d; text-align: center; font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; margin-top: 12px; }

/* Login */
.login-wrap {
  max-width: 340px;
  margin: 90px auto;
  padding: 40px 30px;
  background: linear-gradient(135deg, rgba(17,21,32,.98) 0%, rgba(10,12,18,1) 100%);
  border: 1px solid var(--border);
  border-radius: 2px;
  text-align: center;
}
.login-wrap h1 {
  font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .4em;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 30px;
}
.login-wrap input[type=password] {
  width: 100%;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--white);
  font-size: .9rem;
  padding: 11px 14px;
  outline: none;
  margin-bottom: 14px;
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  transition: border-color .3s;
  text-align: center;
  letter-spacing: .2em;
}
.login-wrap input:focus { border-color: var(--gold); }
.login-wrap button { width: 100%; }

/* Admin extras */
.btn-add {
  margin-top: 14px; padding: 8px 20px;
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  font-size: .7rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  cursor: pointer; border-radius: 2px;
  transition: border-color .3s;
}
.btn-add:hover { border-color: var(--gold); }
.btn-del {
  padding: 6px 11px; background: transparent;
  border: 1px solid rgba(180,60,60,.3);
  color: rgba(200,100,100,.6);
  font-size: .72rem; border-radius: 2px;
  cursor: pointer; font-family: 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  transition: border-color .3s, color .3s;
}
.btn-del:hover { border-color: rgba(200,80,80,.7); color: #c86060; }
.field-row-num { min-width: 20px; color: var(--gold-dim); font-size: .75rem; }

/* ── BURGER + MOBILE MENU ────────────────────────────────────── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .25s;
}
.burger:hover { border-color: var(--gold-dim); }
.burger span {
  display: block;
  height: 1.5px;
  background: var(--text-dim);
  border-radius: 1px;
  transition: background .25s, transform .25s, opacity .25s;
}
.burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); background: var(--gold); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); background: var(--gold); }

.mob-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: rgba(10,11,18,.97);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  z-index: 99;
}
.mob-menu.open { display: flex; }

.mob-btn {
  padding: 15px 24px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px solid rgba(201,162,52,.07);
  transition: color .2s, background .2s;
}
.mob-btn:last-child { border-bottom: none; }
.mob-btn:hover, .mob-btn.active { color: var(--gold); background: rgba(201,162,52,.05); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .header-inner      { padding: 10px 14px; gap: 10px; position: relative; }
  .brand-textimg     { height: 64px; }
  .brand-shield      { width: 80px; height: 80px; }
  .header-nav        { display: none; }
  .burger            { display: flex; }
  main               { padding: 36px 14px 52px; }
  .section-heading h1,
  .section-heading h2 { font-size: 1.5rem; }
  .nav-btn           { padding: 15px 16px; }
  .btn-title         { font-size: .85rem; }
  .about-block       { padding: 20px 14px; }
}
@media (min-width: 601px) {
  .burger   { display: none; }
  .mob-menu { display: none !important; }
}
