:root {
  --blue: #2196F3;
  --blue-dark: #1565C0;
  --blue-light: #E3F2FD;
  --bg: #F5F9FE;
  --card: #fff;
  --text: #1A2B4C;
  --muted: #5E7498;
  --green: #2E9E5B;
  --red: #D64545;
  --radius: 16px;
  --shadow: 0 3px 14px rgba(33, 150, 243, .14);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif; line-height: 1.55;
}

/* ---------- Шапка ---------- */
.top {
  background: linear-gradient(90deg, #1565C0, #2196F3 60%, #64B5F6);
  color: #fff; position: sticky; top: 0; z-index: 30;
  box-shadow: 0 2px 12px rgba(21, 101, 192, .3);
}
.top-inner { display: flex; align-items: center; gap: 22px; padding: 12px 28px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff; object-fit: cover; }
.brand-text b { font-size: 19px; letter-spacing: .2px; display: block; }
.brand-text span { font-size: 12.5px; opacity: .85; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: #fff; padding: 9px 15px; border-radius: 10px; cursor: pointer;
  font-size: 14.5px; font-weight: 600; transition: background .15s; user-select: none;
}
.nav a:hover { background: rgba(255,255,255,.16); }
.nav a.active { background: rgba(255,255,255,.28); }
.donate-btn { background: rgba(255,255,255,.92); color: var(--blue-dark); font-weight: 800; }
.donate-btn:hover { background: #fff; }
.burger { display: none; margin-left: auto; background: rgba(255,255,255,.9); color: var(--blue-dark); border: 0; border-radius: 8px; font-size: 20px; width: 40px; height: 40px; }

@media (max-width: 820px) {
  .nav { display: none; }
  .burger { display: block; }
  .top-inner { padding: 10px 16px; }
  .burger.open + .nav, .nav.open { display: flex; flex-direction: column; width: 100%; background: rgba(255,255,255,.08); }
}
.top-inner.open-nav .nav { display: flex; flex-direction: column; align-items: stretch; background: rgba(255,255,255,.1); border-radius: 12px; }

/* ---------- Секции ---------- */
.sec { padding: 34px 28px; max-width: 1180px; margin: 0 auto; }
.hidden { display: none !important; }
.section-title { font-size: 26px; font-weight: 800; color: var(--blue-dark); margin: 6px 0 18px; display: flex; align-items: center; gap: 10px; }
.lead { color: var(--muted); font-size: 15px; margin-bottom: 22px; }

/* ---------- Hero / Главная ---------- */
.hero {
  position: relative; border-radius: 24px; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #1565C0 0%, #2196F3 45%, #5FB2F7 80%, #E1F3FE 100%);
  padding: 40px 34px; box-shadow: 0 8px 30px rgba(21, 101, 192, .25);
}
.hero h1 { font-size: 30px; margin: 0 0 10px; }
.hero p { font-size: 16.5px; max-width: 640px; margin: 0 0 20px; opacity: .95; }
.hero .addr { font-size: 14px; opacity: .85; margin-bottom: 18px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn.donate { background: #fff; color: var(--blue-dark); }
.hero .btn { background: rgba(255,255,255,.18); color: #fff; }
.hero .badge {
  position: absolute; right: 22px; top: 18px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.4); padding: 4px 12px; border-radius: 30px;
  font-size: 12px;
}

/* ---------- Карточки ---------- */
.card {
  background: var(--card); border: 1px solid #E0EAF7; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px;
}
.card img.cover { width: 100%; max-height: 340px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.card h3 { font-size: 19px; margin: 0 0 8px; }
.card p { margin: 0 0 10px; font-size: 15px; }
.date { font-size: 13px; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 15px; }

/* ---------- Сетки ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 20px; }

/* ---------- Новости плиткой ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card {
  cursor: pointer; overflow: hidden; background: var(--card); border: 1px solid #E0EAF7;
  border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(33, 150, 243, .22); }
.news-thumb { height: 185px; overflow: hidden; background: linear-gradient(135deg, #E3F2FD, #fff); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-thumb img { transform: scale(1.05); }
.news-thumb.no-photo { display: flex; align-items: center; justify-content: center; }
.logo-fallback {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--blue); padding: 0; overflow: hidden;
  display: block; margin: 0 auto;
}
.news-thumb .logo-fallback { object-fit: cover; }
.news-body { padding: 14px 16px; }
.news-body h3 { font-size: 17px; margin: 6px 0 6px; }
.news-body p { margin: 0 0 8px; font-size: 14px; color: #3A4B6E; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-body .date { margin-bottom: 4px; }
.read-more { color: var(--blue); font-weight: 700; font-size: 13.5px; }
.modal-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block; padding: 13px 22px; border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff;
  font-size: 15px; font-weight: 700; text-decoration: none; transition: transform .1s;
}
.btn:active { transform: scale(.97); }
.btn.green { background: linear-gradient(135deg, #2E9E5B, #1E7A45); }
.btn.ghost { background: transparent; color: var(--blue-dark); border: 2px solid var(--blue); }
.btn.block { display: block; width: 100%; }
.btn.disabled { opacity: .55; pointer-events: none; }

/* ---------- Аукцион ---------- */
.lot-status {
  display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12.5px; font-weight: 700;
}
.lot-status.active { background: var(--blue-light); color: var(--blue-dark); }
.lot-status.closed { background: #FFE9E9; color: var(--red); }
.lot-status.sold { background: #E2F4E6; color: var(--green); }
.price-big { font-size: 26px; font-weight: 800; color: var(--blue-dark); }
.timer { font-size: 14px; font-weight: 700; color: var(--red); }
.bid-note { font-size: 13px; color: var(--muted); }

/* ---------- Помощь / QR ---------- */
.qr {
  display: block; width: 100%; max-width: 300px; margin: 0 auto;
  border-radius: 14px; border: 2px solid var(--blue); box-shadow: var(--shadow);
}
.donate-hero { background: linear-gradient(135deg, #E3F2FD, #fff); border: 2px dashed var(--blue); }

/* ---------- Отзывы ---------- */
.review-role { font-size: 13px; color: var(--muted); }
.review-quote { font-size: 16px; line-height: 1.6; }
.stars { color: #F5B342; letter-spacing: 2px; }

/* ---------- Награды ---------- */
.award-card .award-img { width: 100%; max-height: 420px; object-fit: contain; background: #f1f6fc; border-radius: 12px; }

/* ---------- Футер ---------- */
.foot {
  background: linear-gradient(90deg, #1565C0, #2196F3);
  color: #fff; padding: 26px 28px; text-align: center; margin-top: 30px;
}
.foot-addr { font-size: 13.5px; opacity: .9; margin: 8px 0; }
.foot-r { font-size: 12.5px; opacity: .75; }

/* ---------- Модалка ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(15, 35, 70, .6); z-index: 50;
  display: flex; align-items: center; justify-content: center;
}
.modal-card {
  background: #fff; border-radius: 18px; padding: 24px; width: 94%; max-width: 560px;
  max-height: 86vh; overflow-y: auto; box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.modal-card h3 { margin: 0 0 14px; color: var(--blue-dark); font-size: 21px; }

/* ---------- Формы ---------- */
.field { display: block; margin-bottom: 12px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; color: var(--blue-dark); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px; border: 2px solid var(--blue); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff;
}

/* ---------- Тосты ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--blue-dark); color: #fff; padding: 12px 22px; border-radius: 12px;
  font-size: 14.5px; box-shadow: 0 8px 24px rgba(0,0,0,.3); z-index: 60;
  animation: tin .25s ease-out; max-width: 92%;
}
@keyframes tin { from { opacity: 0; transform: translate(-50%, 14px); } }

@media (max-width: 700px) {
  .hero { padding: 26px 20px; }
  .hero h1 { font-size: 23px; }
  .grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .sec { padding: 24px 16px; }
  .section-title { font-size: 21px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1A2E; --card: #16263F; --text: #E8EEFA; --muted: #8FA6C8;
    --blue-light: #1C3557;
  }
  body { background: var(--bg); color: var(--text); }
  .card { border-color: #22375A; }
  .hero { background: linear-gradient(135deg, #1E5FA8, #2E7EC8); }
  .foot { background: linear-gradient(90deg, #1E5FA8, #2E7EC8); }
}