/* ============================================================
   КубГид — общий CSS (переменные, шапка, футер, кнопки, карточки)
   Подключается на всех страницах через layout
   ============================================================ */

:root {
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --purple-light: #ede9fe;
  --purple-bg: #f5f3ff;
  --ink: #1e1b31;
  --muted: #6b6883;
  --card: #ffffff;
  --page: #eeeaf7;
  --border: #e4dff2;
  --green: #16a34a;
  --yellow: #fbbf24;
  --footer: #221c3a;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--page); scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.5;
  font-size: 15px;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== Плейсхолдер для картинок ===== */
.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #b9a8e8;
  background: repeating-linear-gradient(45deg, #f6f2ff, #f6f2ff 12px, #efe9fc 12px, #efe9fc 24px);
  color: #8d7cc2;
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  padding: 4px;
}
img.img-ph { object-fit: cover; border: none; background: none; padding: 0; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  transition: opacity .15s;
}
.btn:hover { opacity: .88; }
.btn-outline { border: 1.5px solid var(--purple); color: var(--purple); background: #fff; }
.btn-primary { background: var(--purple); color: #fff; }
.btn-white   { background: #fff; color: var(--ink); border: 1px solid var(--border); }
.btn-yellow  { background: var(--yellow); color: #5b3a00; }
.btn-light   { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.4); }

/* ===== Шапка ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.logo .img-ph { width: 40px; height: 40px; border-radius: 10px; }
.logo span { color: var(--purple); }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.nav a:hover, .nav a.active { background: var(--purple-light); color: var(--purple); }
.search {
  flex: 1;
  max-width: 320px;
  margin-left: auto;
  display: flex;
  align-items: center;
  background: #f1eefa;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  gap: 8px;
}
.search input { border: none; background: transparent; outline: none; width: 100%; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: var(--muted); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-mascot .img-ph { width: 36px; height: 36px; border-radius: 50%; font-size: 7px; }

/* ===== Общие карточки-секции ===== */
.section { max-width: 1200px; margin: 20px auto 0; padding: 0 16px; }
.card { background: var(--card); border-radius: 20px; padding: 24px; border: 1px solid var(--border); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.section-title .icon-box {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--purple-light); color: var(--purple);
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.link-more { color: var(--purple); font-weight: 700; font-size: 13px; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }
.muted { color: var(--muted); font-size: 13px; }

/* ===== Хлебные крошки (2 варианта) ===== */
.breadcrumbs { font-size: 12.5px; color: var(--muted); padding: 14px 0 0; }
.breadcrumbs a:hover { color: var(--purple); }
.breadcrumbs.top { max-width: 1200px; margin: 14px auto 0; padding: 0 32px; }

/* ===== Футер (единый фиолетовый градиент) ===== */
.footer {
  margin-top: 28px;
  background: linear-gradient(135deg, #6d28d9, #7c3aed);
  color: #e6defc;
  padding: 36px 0 0;
  border-radius: 24px 24px 0 0;
}
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer .logo span { color: #fde68a; }
.footer-desc { font-size: 13px; line-height: 1.55; margin-bottom: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: 28px; padding-bottom: 28px; }
.footer h4 { color: #fff; font-size: 14px; font-weight: 800; margin-bottom: 10px; }
.footer-col a { display: block; font-size: 13px; padding: 3px 0; color: #ddd0fb; }
.footer-col a:hover { color: #fff; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials .img-ph { width: 32px; height: 32px; border-radius: 10px; font-size: 7px; border-color: #a78bfa; background: #5b21b6; color: #cabaf5; }
.footer-art .img-ph { width: 100%; height: 130px; border-radius: 16px; border-color: #a78bfa; background: #5b21b6; color: #cabaf5; font-size: 10px; }
.join-box h4 { margin-bottom: 8px; }
.join-box p { font-size: 12.5px; color: #ddd0fb; margin-bottom: 10px; }
.join-box .btn { background: #fff; color: var(--purple); padding: 10px 16px; font-size: 13px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.25);
  padding: 14px 0; font-size: 12px; color: #d5c8f8; text-align: center;
}

/* ===== Адаптив (общий) ===== */
@media (max-width: 1024px) {
  .nav { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .search { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
