/* ═══════════════════════════════════════════════════
   ҰРПАҚТАР ШЕЖІРЕСІ — style.css
   Font: Roboto (Қазақша кириллицаны қолдайды)
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Slab:wght@600;700&display=swap');

:root {
  --green-dark:  #1a2e1a;
  --green-mid:   #2d4a2d;
  --green-light: #4a7c4a;
  --gold:        #b8860b;
  --gold-light:  #d4a017;
  --gold-pale:   #fdf6e3;
  --cream:       #faf8f2;
  --cream-dark:  #f2ede0;
  --ink:         #1e1a10;
  --ink-soft:    #5a4e30;
  --border:      rgba(184,134,11,.22);
  --shadow:      0 4px 24px rgba(26,46,26,.10);
  --radius:      12px;
  --radius-sm:   7px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Roboto', 'Arial', sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── HEADER ──────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--green-dark);
  border-bottom: 2px solid var(--gold);
}
.header-inner {
  display: flex; align-items: center; gap: 12px;
  height: 58px;
}
.site-logo-wrap {
  display: flex; align-items: center; gap: 9px;
  flex-shrink: 0;
}
.site-logo-wrap img { width: 34px; height: 34px; object-fit: contain; border-radius: 4px; }
.site-logo-text {
  font-family: 'Roboto Slab', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: .02em;
  white-space: nowrap;
}
.site-nav {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto;
}
.nav-link {
  padding: 5px 11px;
  border-radius: 18px;
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  transition: .15s;
  white-space: nowrap;
}
.nav-link:hover  { color: #fff; background: rgba(255,255,255,.1); }
.nav-link.active { color: var(--gold-light); }
.nav-cta {
  background: var(--gold);
  color: var(--green-dark) !important;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 18px;
}
.nav-cta:hover { background: var(--gold-light); }

/* Hamburger (мобиль) */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px;
  margin-left: auto;
  background: none; border: none;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: rgba(255,255,255,.8); border-radius: 2px;
  transition: .2s;
}

/* ── HERO ────────────────────────────────────────── */
.hero {
  background: var(--green-dark);
  color: #fff;
  padding: 56px 0 48px;
  position: relative;
  overflow: hidden;
}
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-block;
  background: rgba(184,134,11,.2);
  border: 1px solid rgba(184,134,11,.4);
  color: var(--gold-light);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 13px;
  border-radius: 18px;
  margin-bottom: 1rem;
}
.hero h1 {
  font-family: 'Roboto Slab', serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .75rem;
}
.hero h1 span { color: var(--gold-light); }
.hero-sub {
  font-size: clamp(.88rem, 2vw, 1.05rem);
  color: rgba(255,255,255,.72);
  max-width: 520px;
  margin: 0 auto 1.8rem;
}
.hero-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Roboto', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: .15s;
  border: 2px solid transparent;
  text-align: center;
  line-height: 1.2;
}
.btn-primary  { background: var(--gold); color: var(--green-dark); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn-outline  { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline-dark { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline-dark:hover { border-color: var(--gold); color: var(--gold); }

/* ── STATS BAR ───────────────────────────────────── */
.stats-bar {
  background: #162816;
  border-top: 1px solid rgba(184,134,11,.2);
  padding: 16px 0;
}
.stats-row { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num {
  font-family: 'Roboto Slab', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}
.stat-label { font-size: .75rem; color: rgba(255,255,255,.5); margin-top: 2px; }

/* ── SECTION ─────────────────────────────────────── */
.section { padding: 56px 0; }
.section-alt  { background: var(--cream-dark); }
.section-dark { background: var(--green-dark); color: #fff; }
.section-label {
  display: inline-block;
  font-size: .7rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .5rem;
}
.section-title {
  font-family: 'Roboto Slab', serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .5rem;
}
.section-sub { font-size: .92rem; color: var(--ink-soft); max-width: 540px; }
.section-dark .section-sub { color: rgba(255,255,255,.62); }

/* ── GRID ────────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }

/* ── CARD ────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: .18s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(26,46,26,.13); }

/* ── ZHUZ TABS ───────────────────────────────────── */
.zhuz-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.zhuz-tab {
  padding: 6px 18px; border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff; font-size: .82rem; font-weight: 600;
  cursor: pointer; color: var(--ink-soft); transition: .15s;
}
.zhuz-tab.active, .zhuz-tab:hover {
  background: var(--green-dark); color: var(--gold-light); border-color: var(--green-dark);
}
.zhuz-panel { display: none; }
.zhuz-panel.active { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 8px; }
.tribe-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 13px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 500; color: var(--ink);
  transition: .15s;
}
.tribe-chip:hover { border-color: var(--gold); color: var(--gold); }
.tribe-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* ── FEATURES ────────────────────────────────────── */
.feature-icon {
  width: 44px; height: 44px;
  background: var(--gold-pale); border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 10px;
}
.feature-title { font-family: 'Roboto Slab', serif; font-size: 1rem; font-weight: 700; margin-bottom: 5px; }

/* ── JETI ATA PREVIEW ────────────────────────────── */
.jeti-preview-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: start; }
.jeti-preview-img { border-radius: var(--radius-sm); border: 2px solid var(--border); overflow: hidden; box-shadow: var(--shadow); }
.jeti-preview-img img { width: 100%; height: auto; object-fit: cover; display: block; }
.jeti-preview-label { text-align: center; font-size: .73rem; color: var(--ink-soft); margin-top: 5px; font-weight: 500; }

/* ── PRICE ───────────────────────────────────────── */
.price-card {
  background: var(--green-dark); border-radius: var(--radius);
  padding: 32px; color: #fff; text-align: center;
  border: 1px solid rgba(184,134,11,.3);
}
.price-amount { font-family: 'Roboto Slab', serif; font-size: 2.8rem; color: var(--gold-light); line-height: 1; }
.price-unit   { font-size: .83rem; color: rgba(255,255,255,.55); margin-top: 4px; }
.price-list   { list-style: none; margin: 18px 0; text-align: left; }
.price-list li {
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: .87rem; color: rgba(255,255,255,.8);
  display: flex; gap: 8px;
}
.price-list li::before { content: '✓'; color: var(--gold-light); font-weight: 700; flex-shrink: 0; }

/* ── TRIBE ROWS ──────────────────────────────────── */
.tribe-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff;
  margin-bottom: 7px; transition: .15s;
}
.tribe-row:hover { border-color: var(--gold); }
.tribe-row-name { font-weight: 700; font-size: .87rem; }
.tribe-row-meta { font-size: .74rem; color: var(--ink-soft); }
.tribe-row-badge {
  font-size: .71rem; background: var(--gold-pale); color: var(--gold);
  border: 1px solid var(--border); padding: 2px 8px;
  border-radius: 9px; font-weight: 700;
}

/* ── FORM ────────────────────────────────────────── */
.form-wrap {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); max-width: 680px; margin: 0 auto;
}
.form-title { font-family: 'Roboto Slab', serif; font-size: 1.5rem; margin-bottom: 5px; }
.form-sub   { color: var(--ink-soft); font-size: .87rem; margin-bottom: 22px; }
.field      { margin-bottom: 14px; }
.field label {
  display: block; font-size: .77rem; font-weight: 700;
  color: var(--ink-soft); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: .05em;
}
.field input,
.field select,
.field textarea {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-family: 'Roboto', 'Arial', sans-serif;
  font-size: .92rem; color: var(--ink); background: var(--cream);
  outline: none; transition: .15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--gold); background: #fff; }
.field textarea { min-height: 78px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.required   { color: #c0392b; }
.error-box  {
  background: #fde8e8; border: 1px solid #f5c6c6;
  border-radius: var(--radius-sm); padding: 10px 14px;
  margin-bottom: 14px; font-size: .84rem; color: #7b241c;
}
.success-box {
  background: #d5f5e3; border: 1px solid #a9dfbf;
  border-radius: var(--radius-sm); padding: 13px 16px;
  font-size: .88rem; color: #196f3d;
}

/* ── FOOTER ──────────────────────────────────────── */
.site-footer {
  background: var(--green-dark); border-top: 2px solid var(--gold);
  color: rgba(255,255,255,.7); padding: 36px 0 18px;
}
.footer-grid {
  display: grid; grid-template-columns: 200px 1fr 1fr;
  gap: 28px; margin-bottom: 24px;
}
.footer-logo-text { font-family: 'Roboto Slab', serif; font-size: .95rem; color: var(--gold-light); margin-bottom: 5px; }
.footer-tagline   { font-size: .78rem; color: rgba(255,255,255,.45); }
.footer-col-title {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 10px;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { font-size: .83rem; color: rgba(255,255,255,.62); transition: .12s; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 14px; text-align: center;
  font-size: .76rem; color: rgba(255,255,255,.38);
}

/* ── SHEZHIRE PAGE ───────────────────────────────── */
.shezhire-header { background: var(--green-dark); color: #fff; padding: 32px 0 24px; }
.shezhire-title  { font-family: 'Roboto Slab', serif; font-size: clamp(1.5rem,4vw,2.4rem); color: var(--gold-light); }
.shezhire-meta   { font-size: .84rem; color: rgba(255,255,255,.58); margin-top: 5px; }
.tree-table      { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tree-table th   { background: var(--green-dark); color: var(--gold-light); padding: 9px 13px; text-align: left; font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; }
.tree-table td   { padding: 8px 13px; border-bottom: 1px solid var(--border); }
.tree-table tr:hover td { background: var(--gold-pale); }

/* ── EDITOR ──────────────────────────────────────── */
.editor-layout  { display: grid; grid-template-columns: 1fr 280px; gap: 12px; align-items: start; }
.editor-tree    { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--border); background: var(--cream-dark); }
.editor-body    { padding: 10px; min-height: 360px; }
.editor-panel   { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; position: sticky; top: 68px; }
.node-row       { display: flex; align-items: center; gap: 3px; margin-bottom: 2px; }
.node-box       { flex: 1; display: flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; transition: .12s; min-width: 0; }
.node-box:hover, .node-box.selected { border-color: var(--gold); background: var(--gold-pale); }
.node-box.is-root { font-weight: 700; }
.node-name      { font-size: .84rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-meta      { font-size: .71rem; color: var(--ink-soft); white-space: nowrap; }
.node-toggle    { width: 17px; height: 17px; border: 1px solid var(--border); border-radius: 3px; font-size: .6rem; cursor: pointer; background: var(--cream-dark); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.node-act       { width: 20px; height: 20px; border: 1px solid var(--border); border-radius: 4px; font-size: .68rem; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--cream-dark); transition: .1s; }
.na-add:hover   { background: #d5f5e3; color: #196f3d; border-color: #a9dfbf; }
.na-del:hover   { background: #fde8e8; color: #c0392b; border-color: #f5c6c6; }
.node-children  { margin-left: 17px; border-left: 1px dashed var(--border); padding-left: 3px; margin-top: 2px; }

/* ── ADMIN ───────────────────────────────────────── */
.admin-wrap    { display: flex; min-height: 100vh; }
.admin-sidebar { width: 210px; flex-shrink: 0; background: var(--green-dark); padding: 18px 0; }
.admin-logo    { padding: 0 18px 18px; border-bottom: 1px solid rgba(184,134,11,.2); margin-bottom: 10px; font-family: 'Roboto Slab', serif; font-size: .88rem; color: var(--gold-light); }
.admin-nav a   { display: block; padding: 8px 18px; color: rgba(255,255,255,.68); font-size: .84rem; transition: .12s; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(184,134,11,.15); color: var(--gold-light); border-left: 3px solid var(--gold); padding-left: 15px; }
.admin-main    { flex: 1; background: var(--cream); padding: 24px 28px; overflow-x: auto; }
.admin-title   { font-family: 'Roboto Slab', serif; font-size: 1.4rem; margin-bottom: 18px; }
.admin-table   { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th { background: var(--green-dark); color: var(--gold-light); padding: 9px 13px; text-align: left; font-size: .76rem; letter-spacing: .04em; }
.admin-table td { padding: 8px 13px; border-bottom: 1px solid var(--border); font-size: .86rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--gold-pale); }
.badge        { display: inline-block; padding: 2px 8px; border-radius: 9px; font-size: .71rem; font-weight: 700; }
.badge-new    { background: #dbeafe; color: #1e40af; }
.badge-review { background: #fef3c7; color: #92400e; }
.badge-ok     { background: #d1fae5; color: #065f46; }
.badge-reject { background: #fee2e2; color: #991b1b; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-hidden { background: #f3f4f6; color: #6b7280; }

/* ── UTILS ───────────────────────────────────────── */
.text-center    { text-align: center; }
.text-gold      { color: var(--gold); }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 14px; }
.mb-3 { margin-bottom: 22px; }
.mt-2 { margin-top: 14px; }
.mt-3 { margin-top: 22px; }
.w-full { width: 100%; }

/* ══════════════════════════════════════════════════
   RESPONSIVE — МОБИЛЬ
══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  /* Header — hamburger */
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute; top: 58px; left: 0; right: 0;
    background: var(--green-dark);
    border-top: 1px solid rgba(184,134,11,.2);
    flex-direction: column; align-items: stretch;
    padding: 8px 0; gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  .site-nav.open { display: flex; }
  .nav-link { border-radius: 0; padding: 10px 18px; }
  .nav-cta  { margin: 8px 14px; border-radius: 8px; text-align: center; justify-content: center; }

  /* Grid */
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .jeti-preview-grid { grid-template-columns: 1fr; max-width: 360px !important; margin-left: auto; margin-right: auto; }

  /* Editor */
  .editor-layout { grid-template-columns: 1fr; }
  .editor-panel  { position: static; }

  /* Admin */
  .admin-wrap    { flex-direction: column; }
  .admin-sidebar { width: 100%; padding: 10px 0; }
  .admin-main    { padding: 16px; }

  /* Forms */
  .form-wrap  { padding: 20px 16px; }
  .field-row  { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  /* Section */
  .section { padding: 36px 0; }
  .hero    { padding: 36px 0 32px; }

  /* Stats */
  .stats-row { gap: 20px; }
  .stat-num  { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .site-logo-text { font-size: .88rem; }
  .hero h1 { font-size: 1.7rem; }
  .price-card { padding: 22px 16px; }
  .price-amount { font-size: 2.2rem; }
  .admin-table { font-size: .8rem; }
  .admin-table th, .admin-table td { padding: 7px 9px; }
}
