/* Счастливые истории — Boxer&Co (общие стили) */
:root {
  --orange: #FF8C00;
  --orange-dark: #E07800;
  --ink: #2b2b2b;
  --muted: #6b6257;
  --bg: #faf6f1;
  --card: #ffffff;
  --line: #e8ded2;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* Шапка */
.site-head {
  background: var(--card);
  border-bottom: 3px solid var(--orange);
  position: sticky; top: 0; z-index: 10;
}
.head-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { font-size: 1.5rem; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
.brand span { color: var(--orange); }
.brand:hover { text-decoration: none; }
.head-nav a { margin-left: 22px; font-weight: 600; color: var(--ink); }
.head-nav a.active, .head-nav a:hover { color: var(--orange); text-decoration: none; }

/* Герой */
.hero { text-align: center; padding: 56px 0 30px; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0 0 14px; line-height: 1.2; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 760px; margin: 0 auto 26px; }

/* Секции */
.sec-title {
  font-size: 1.75rem; margin: 48px 0 6px; padding-bottom: 10px;
  border-bottom: 3px solid var(--orange); display: inline-block;
}
.sec-sub { color: var(--muted); margin: 4px 0 22px; }
section { margin-bottom: 40px; }

/* Карточки */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 22px;
}
.card {
  background: var(--card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(160, 100, 20, .16); }
.card-img { display: block; background: #ece5db; text-align: center; padding: 10px; }
.card-img img { width: auto; max-width: 100%; height: auto; max-height: 220px; object-fit: contain; }
.card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin: 0 0 8px; font-size: 1.25rem; }
.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--orange-dark); text-decoration: none; }
.card-body p { margin: 0 0 16px; color: var(--muted); font-size: .95rem; flex: 1; }

/* Кнопки */
.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff; font-weight: 700;
  padding: 10px 20px; border-radius: 999px;
  align-self: flex-start;
  transition: background .15s ease;
}
.btn:hover { background: var(--orange-dark); text-decoration: none; color: #fff; }
.btn-ghost {
  background: transparent; color: var(--orange-dark);
  border: 2px solid var(--orange);
}
.btn-ghost:hover { background: var(--orange); color: #fff; }

/* Годы */
.years-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px; margin-top: 22px;
}
.year-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 16px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
  transition: transform .15s ease, border-color .15s ease;
}
.year-card:hover { transform: translateY(-3px); border-color: var(--orange); text-decoration: none; }
.year-num { font-size: 1.7rem; font-weight: 700; color: var(--orange); }
.year-count { color: var(--muted); font-size: .92rem; }

/* Заглушка вместо фото */
.ph-ph {
  width: 100%; height: 100%; min-height: 180px;
  background: linear-gradient(135deg, #e9e4dc, #d8d2c8);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: #9a9186;
}
.ph-ph span { font-size: 2.6rem; filter: grayscale(1); opacity: .75; }
.ph-ph em { font-style: normal; font-size: .85rem; }
.ph-big { min-height: 320px; border-radius: 10px; }

/* История */
.story { padding: 36px 0 20px; }
.crumbs { margin: 0 0 18px; font-weight: 600; }
.crumbs.bottom { margin-top: 32px; }
.story-body { max-width: 820px; margin: 26px auto 0; }
.story-body p { font-size: 1.08rem; margin: 0 0 20px; }
.story-body figure { margin: 26px 0; }
.story-body figure img {
  width: auto; max-width: 100%; height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  image-rendering: auto;
  background: #f5f0e8;
  padding: 4px;
}
.story-body figure { text-align: center; }
.story-nav {
  display: flex; justify-content: space-between; gap: 16px;
  max-width: 820px; margin: 44px auto 0; padding-top: 18px;
  border-top: 2px solid var(--line);
}
.story-nav a { font-weight: 700; }

/* Подвал */
.site-foot {
  background: var(--ink); color: #d9d2c8;
  margin-top: 56px; padding: 30px 0;
  text-align: center; font-size: .95rem;
}
.site-foot a { color: var(--orange); }

/* Мини-карточки годов */
.grid-mini { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.card-mini .card-body { padding: 12px 14px; }
.card-mini .card-body h3 { font-size: 1.05rem; margin: 0; }
.card-mini .ph-ph { min-height: 140px; }

/* Адаптивность */
@media (max-width: 720px) {
  .head-inner { flex-direction: column; gap: 8px; }
  .head-nav a { margin: 0 10px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .grid-mini { grid-template-columns: 1fr 1fr; }
  .card-body { padding: 14px; }
  .hero { padding: 36px 0 20px; }
}
@media (max-width: 480px) {
  .grid, .grid-mini { grid-template-columns: 1fr; }
  .story-nav { flex-direction: column; }
}
/* Лайтбокс */
.lb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 1000; align-items: center; justify-content: center; }
.lb-overlay.open { display: flex; }
.lb-inner { text-align: center; padding: 20px; }
.lb-inner img { max-width: 90vw; max-height: 80vh; width: auto; height: auto; border-radius: 8px; background: white; padding: 8px; }
#lb-name { color: #fff; margin-top: 14px; font-size: 1.15rem; font-weight: 600; }
.lb-close { position: absolute; top: 18px; right: 26px; font-size: 2.6rem; color: #fff; background: none; border: 0; cursor: pointer; line-height: 1; }
button.card-link { width: 100%; text-align: center; cursor: pointer; font-family: inherit; background: #fff; }
button.card-link:hover { transform: translateY(-3px); }
.card-badge { display: inline-block; margin-top: 8px; padding: 4px 12px; background: #FF8C00; color: #fff; border-radius: 20px; font-size: .82rem; font-weight: 600; }

/* Единая шапка (site-header) */
.site-header {
  background: var(--card);
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.site-header .logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-header .logo img { height: 48px; width: auto; }
.site-header .head-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.site-header .head-nav a {
  margin-left: 0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.site-header .head-nav a.active, .site-header .head-nav a:hover {
  color: var(--orange);
  background: rgba(255,140,0,.10);
}
@media (max-width: 640px) {
  .site-header { justify-content: center; }
  .site-header .head-nav a { padding: 6px 10px; font-size: .92rem; }
}
