/* ============================================================
   Брендбук · концепция 09 — «Календарь»
   Годовой планировщик вместо витрины: госпрограммы живут по
   расписанию, поэтому первый экран — календарь финансирования
   на 2026 год. Строки — программы, полосы — окна приёма и
   графики выплат, вертикальная отметка — сегодняшний день.
   Традиция настенных планировщиков и годовых графиков
   министерств. Inter + Raleway, только синяя палитра
   (navy #19286d · гос-синий #0068b4 · cyan #00a6ca · сталь #296695).
   ============================================================ */

:root {
  --navy: #19286d;
  --gov-blue: #0068b4;
  --cyan: #00a6ca;
  --steel: #296695;
  --ink: #17203a;
  --muted: #5a6780;
  --line: #d7e0ec;
  --bg: #f5f8fc;
  --shell: 1180px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head: "Raleway", var(--sans);
}

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

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: 20px; }

.skip {
  position: absolute;
  left: -9999px; top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 18px;
  z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- Шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header.is-stuck { box-shadow: 0 2px 16px rgba(25, 40, 109, 0.1); }

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 66px;
}

.logo img { width: 172px; height: auto; }

.nav { display: flex; gap: 2px; margin-left: auto; }

.nav a {
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--gov-blue); border-bottom-color: var(--cyan); }

.header-tools { display: flex; align-items: center; gap: 16px; }

.header-lang { font-size: 13.5px; font-weight: 600; color: var(--steel); }
.header-lang:hover { color: var(--gov-blue); }

.btn-lk {
  padding: 9px 18px;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-lk:hover { background: var(--navy); color: #fff; }

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.menu-btn span { height: 2px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-btn.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.drawer {
  position: sticky;
  top: 66px;
  z-index: 49;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.drawer-inner { display: flex; flex-direction: column; padding-block: 12px 20px; }
.drawer-inner > a { padding: 12px 4px; font-weight: 500; border-bottom: 1px solid var(--line); }
.drawer-meta { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 16px; font-size: 14px; color: var(--muted); }

/* ---------- Календарь ---------- */

.cal-wrap {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding-block: 44px 52px;
}

.kicker {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
}

.cal-intro h1 {
  font-family: var(--head);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
  line-height: 1.05;
}

.cal-lead { max-width: 66ch; margin-top: 12px; font-size: 15.5px; color: var(--muted); }

.cal-scroll { margin-top: 28px; overflow-x: auto; }

.cal {
  position: relative;
  min-width: 860px;
  background: #fff;
  border: 1px solid var(--line);
  /* сетка месяцев поверх дорожек */
  --left: 264px;
}

.cal-months {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  margin-left: var(--left);
  border-bottom: 1px solid var(--line);
}

.cal-months span {
  padding: 10px 0 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line);
}

.cal-months span:first-child { border-left: 0; }

.cal-row {
  display: grid;
  grid-template-columns: var(--left) minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
}

.cal-row:last-of-type { border-bottom: 0; }

.cal-row:hover { background: #eef4fb; }

.cal-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  font-family: var(--head);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  border-right: 1px solid var(--line);
}

.cal-name small {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.cal-track {
  position: relative;
  align-self: stretch;
  /* линейка месяцев в фоне дорожки */
  background: repeating-linear-gradient(
    90deg,
    transparent 0 calc(100% / 12 - 1px),
    var(--line) calc(100% / 12 - 1px) calc(100% / 12)
  );
}

.bar {
  position: absolute;
  top: 50%;
  height: 18px;
  transform: translateY(-50%);
  background: var(--gov-blue);
  border-radius: 3px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.bar b {
  padding-inline: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}

.bar-window { background: var(--cyan); }
.bar-window b { color: #063a46; }

.bar-steady {
  background: none;
  border: 1.5px solid var(--steel);
}
.bar-steady b { color: var(--steel); }

.bar-hold {
  background: repeating-linear-gradient(
    -45deg,
    #dbe4f0 0 6px,
    #c3cfe2 6px 12px
  );
}
.bar-hold b { color: var(--navy); }

.cal-today {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--left) + (100% - var(--left)) * 0.558);
  width: 0;
  border-left: 2px solid var(--navy);
  pointer-events: none;
}

.cal-today em {
  position: absolute;
  top: 1px;
  left: 5px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--navy);
  padding: 3px 7px;
  white-space: nowrap;
}

.cal-legend {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.cal-legend span { display: flex; align-items: center; gap: 7px; }

.lg { width: 18px; height: 10px; border-radius: 2px; }
.lg-bar { background: var(--gov-blue); }
.lg-window { background: var(--cyan); }
.lg-hold { background: repeating-linear-gradient(-45deg, #dbe4f0 0 4px, #c3cfe2 4px 8px); }

.cal-all { margin-left: auto; font-weight: 600; color: var(--gov-blue); }
.cal-all:hover { text-decoration: underline; }

/* ---------- Аудитории ---------- */

.entries { padding-block: 52px; border-bottom: 1px solid var(--line); }

.sect-title {
  font-family: var(--head);
  font-size: clamp(23px, 2.7vw, 30px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}

.sect-title--light { color: #fff; }

.entries-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.entries-grid a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 2px solid var(--navy);
}

.entries-grid strong {
  font-family: var(--head);
  font-size: 21px;
  font-weight: 800;
  color: var(--navy);
}

.entries-grid span { font-size: 14px; color: var(--muted); }

.entries-grid em {
  margin-top: 4px;
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  color: var(--gov-blue);
}

.entries-grid a:hover em { text-decoration: underline; }

/* ---------- Хроника ---------- */

.chron {
  background: var(--navy);
  color: #fff;
  padding-block: 54px;
}

.chron-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.more-link { font-size: 14.5px; font-weight: 600; color: var(--gov-blue); white-space: nowrap; }
.more-link:hover { text-decoration: underline; }
.more-link--light { color: #7fd8ea; }

.chron-line {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 8px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.chron-line li { position: relative; padding-top: 14px; }

.chron-line li::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--navy);
  border: 2.5px solid rgba(255, 255, 255, 0.6);
}

.chron-line li.is-now::before {
  background: var(--cyan);
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 166, 202, 0.3);
}

.chron-month {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fd8ea;
  margin-bottom: 6px;
}

.chron-line a {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
}

.chron-line a:hover { color: #fff; text-decoration: underline; }

.chron-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.chron-facts dd {
  font-family: var(--head);
  font-size: clamp(23px, 2.6vw, 32px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.chron-facts dt { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }

/* ---------- Контакт ---------- */

.contact { padding-block: 52px 56px; }

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 30px 34px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.contact h2 { font-family: var(--head); font-size: 23px; font-weight: 800; color: var(--navy); }

.contact p { margin-top: 5px; font-size: 14.5px; color: var(--muted); }

.contact-side { text-align: right; flex-shrink: 0; }

.contact-phone {
  font-family: var(--head);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.contact-phone:hover { color: var(--gov-blue); }

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

.contact-links a { color: var(--gov-blue); }
.contact-links a:hover { text-decoration: underline; }

/* ---------- Футер ---------- */

.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-block: 46px 38px;
}

.footer-col { display: flex; flex-direction: column; gap: 9px; }

.footer-col h3 {
  font-family: var(--head);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12.5px;
}

.footer-social { display: flex; gap: 16px; }
.footer-social a:hover { color: #fff; }

/* ---------- Адаптив ---------- */

@media (max-width: 960px) {
  .cal { --left: 208px; }
  .cal-name { font-size: 14px; padding: 12px 14px; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: flex; }
  .btn-lk { display: none; }

  .entries-grid { grid-template-columns: 1fr; gap: 26px; }
  .chron-line { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
  .chron-facts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .cal-legend { flex-wrap: wrap; gap: 10px 18px; }
  .cal-all { margin-left: 0; width: 100%; }

  .chron-line { grid-template-columns: 1fr; }

  .contact-row { flex-direction: column; align-items: flex-start; }
  .contact-side { text-align: left; }
  .contact-links { justify-content: flex-start; flex-wrap: wrap; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
}
