:root {
  --red: #d71920;
  --blue: #0077c8;
  --cyan: #00a6c8;
  --yellow: #f6c945;
  --ink: #202124;
  --muted: #667085;
  --line: #dde3ea;
  --soft: #f5f7fb;
  --white: #fff;
  --shadow: 0 18px 55px rgba(29, 39, 57, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
summary {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.site-header,
main,
.hero,
.section,
.contacts,
.page-title,
.official-layout,
.footer {
  max-width: 100vw;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 180px;
  gap: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  color: var(--red);
  font-weight: 950;
  font-size: 18px;
  line-height: 1;
  overflow: hidden;
  border: 4px solid var(--blue);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 48%, transparent 49%),
    conic-gradient(from 35deg, var(--yellow), #fff, var(--cyan), #fff, var(--red), #fff, var(--yellow));
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #303846;
  font-size: 15px;
}

.main-nav a {
  padding: 8px 2px;
}

.main-nav a:hover,
.footer a:hover {
  color: var(--blue);
}

.header-actions,
.hero-actions,
.form-actions,
.admin-actions,
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.small-button,
.danger-button,
.filter-row button {
  display: inline-block;
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 760;
  line-height: 42px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.primary-button,
.small-button {
  color: #fff;
  background: var(--red);
  box-shadow: 0 10px 24px rgba(215, 25, 32, 0.24);
}

.secondary-button,
.filter-row button.active {
  color: var(--ink);
  background: var(--yellow);
}

.ghost-button,
.filter-row button {
  color: var(--ink);
  background: var(--soft);
}

.danger-button {
  color: #fff;
  background: #a52828;
}

.small-button {
  height: 36px;
  line-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

button:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.small-button:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.84fr);
  align-items: stretch;
  gap: clamp(22px, 4vw, 54px);
  min-height: calc(100vh - 84px);
  padding: clamp(34px, 5vw, 78px) clamp(18px, 4vw, 56px) 36px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(56px, 12vw, 148px);
  line-height: 0.9;
  color: var(--red);
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 56px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.hero-copy > p:not(.eyebrow),
.summer-band p,
.contacts p,
.page-title p {
  max-width: 680px;
  color: #485466;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
}

.hero-art {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 23%, rgba(255,255,255,0.72) 24% 38%, transparent 39%),
    linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
}

.logo-burst {
  position: absolute;
  inset: 28% 8% auto;
  z-index: 3;
  color: var(--red);
  font-size: clamp(56px, 7vw, 110px);
  font-weight: 950;
  text-align: center;
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.05);
}

.color-ribbon {
  position: absolute;
  width: 80%;
  height: 18%;
  border-radius: 999px;
  opacity: 0.8;
  filter: saturate(1.25);
}

.color-ribbon.one {
  left: -18%;
  top: 10%;
  background: var(--yellow);
  transform: rotate(-18deg);
}

.color-ribbon.two {
  right: -20%;
  top: 24%;
  background: var(--cyan);
  transform: rotate(22deg);
}

.color-ribbon.three {
  left: 3%;
  bottom: 16%;
  background: var(--red);
  transform: rotate(12deg);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.stats-band article {
  padding: 28px clamp(18px, 4vw, 56px);
  background: #fff;
}

.stats-band strong {
  display: block;
  color: var(--blue);
  font-size: 34px;
}

.stats-band span {
  color: var(--muted);
}

.section,
.contacts,
.page-title,
.official-layout {
  padding: clamp(50px, 7vw, 92px) clamp(18px, 4vw, 56px);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.program-card,
.official-card,
.admin-form,
.lead-dialog,
.contacts {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(29, 39, 57, 0.07);
}

.program-card {
  overflow: hidden;
}

.program-image {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: #fff;
  font-weight: 900;
  font-size: 28px;
  background:
    linear-gradient(135deg, rgba(0, 119, 200, 0.92), rgba(0, 166, 200, 0.78)),
    repeating-linear-gradient(45deg, transparent 0 20px, rgba(255,255,255,0.18) 20px 40px);
}

.program-image.featured {
  background:
    linear-gradient(135deg, rgba(215, 25, 32, 0.92), rgba(246, 201, 69, 0.86)),
    repeating-linear-gradient(45deg, transparent 0 16px, rgba(255,255,255,0.2) 16px 32px);
}

.program-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.program-body {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 22px;
}

.program-meta,
.program-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.program-meta {
  margin-bottom: 14px;
}

.program-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue);
  background: #eaf6ff;
  font-size: 13px;
  font-weight: 760;
}

.program-body p {
  color: var(--muted);
  line-height: 1.55;
}

.program-foot {
  margin-top: auto;
}

.program-foot strong {
  font-size: 24px;
}

.summer-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: center;
  padding: clamp(52px, 8vw, 96px) clamp(18px, 4vw, 56px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(0, 119, 200, 0.95), rgba(32, 33, 36, 0.92)),
    radial-gradient(circle at 78% 20%, rgba(246, 201, 69, 0.45), transparent 32%);
}

.summer-band .eyebrow,
.summer-band p {
  color: #fff;
}

.summer-panel {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.summer-panel strong,
.summer-panel b {
  font-size: 28px;
}

.summer-panel span {
  color: rgba(255, 255, 255, 0.82);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 0.82fr;
  gap: 36px;
  align-items: start;
}

.advantage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.advantage-list article {
  padding: 20px;
  border-left: 5px solid var(--yellow);
  background: var(--soft);
  border-radius: 8px;
}

.advantage-list p,
.gallery-item span,
.schedule-table p,
.faq-list p,
.official-card p,
.staff-list p,
.staff-list small {
  color: var(--muted);
  line-height: 1.55;
}

.gallery-stack {
  display: grid;
  gap: 14px;
}

.gallery-item {
  display: grid;
  min-height: 145px;
  align-content: end;
  padding: 22px;
  color: #fff;
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, #000), color-mix(in srgb, var(--accent) 62%, #fff)),
    repeating-linear-gradient(45deg, transparent 0 20px, rgba(255,255,255,0.2) 20px 40px);
}

.gallery-item strong {
  font-size: 24px;
}

.gallery-item span {
  color: rgba(255, 255, 255, 0.86);
}

.schedule-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.schedule-table article {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-right: 1px solid var(--line);
}

.schedule-table article:last-child {
  border-right: 0;
}

.schedule-table span {
  color: var(--blue);
  font-weight: 760;
}

.faq-section {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 32px;
  background: var(--soft);
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-list details {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
}

.contacts {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 28px;
  margin: clamp(18px, 4vw, 56px);
  padding: clamp(34px, 5vw, 58px);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-grid a,
.contact-grid div {
  display: grid;
  gap: 6px;
  min-height: 96px;
  padding: 16px;
  border-radius: 8px;
  background: var(--soft);
}

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

.requisites-panel {
  grid-column: 1 / -1;
  padding-top: 8px;
}

.requisites-panel h3 {
  margin-bottom: 14px;
}

.requisites-list {
  display: grid;
  gap: 8px;
}

.requisites-list section {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.requisites-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.requisites-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 760;
  line-height: 1.45;
}

.page-title {
  padding-bottom: 24px;
  background: linear-gradient(180deg, #fff, var(--soft));
}

.page-title h1 {
  max-width: 1040px;
  color: var(--ink);
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.98;
}

.official-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding-top: 26px;
}

.official-nav {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.official-nav button {
  border: 0;
  padding: 10px 12px;
  border-radius: 8px;
  color: #435063;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.official-nav button:hover {
  background: var(--soft);
  color: var(--blue);
}

.official-content {
  display: grid;
  gap: 16px;
}

.official-card {
  padding: 26px;
}

.official-card h2 {
  margin-bottom: 16px;
  font-size: clamp(24px, 3vw, 38px);
}

.doc-list,
.staff-list,
.lead-list {
  display: grid;
  gap: 10px;
}

.doc-list section,
.staff-list section,
.lead-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.doc-list strong,
.doc-list span,
.staff-list strong,
.staff-list span {
  display: block;
}

.doc-list span,
.staff-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.doc-list em {
  color: #8a6210;
  font-style: normal;
  font-weight: 760;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  color: #fff;
  background: #202124;
}

.footer strong,
.footer span {
  display: block;
}

.footer span,
.footer a {
  color: rgba(255, 255, 255, 0.72);
}

.footer div:last-child {
  display: flex;
  gap: 16px;
}

.lead-dialog {
  width: min(560px, calc(100vw - 24px));
  padding: 0;
  border: 0;
}

.lead-dialog::backdrop {
  background: rgba(20, 27, 38, 0.55);
}

.lead-form,
.admin-form,
.admin-card-form {
  display: grid;
  gap: 14px;
}

.lead-form {
  padding: 22px;
}

.modal-head,
.list-head,
.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-head h2,
.admin-form h2 {
  margin: 0;
  font-size: 26px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  cursor: pointer;
  font-size: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 14px;
  font-weight: 760;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: auto;
}

.admin-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--soft);
}

.admin-login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(0, 119, 200, 0.08), rgba(246, 201, 69, 0.16)),
    var(--soft);
}

.admin-login {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-login h1 {
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.login-error {
  margin: 0;
  color: var(--red);
  font-weight: 760;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.admin-brand {
  min-width: 0;
  margin-bottom: 10px;
}

.admin-brand .brand-mark {
  width: 64px;
  height: 64px;
}

.admin-brand strong {
  font-size: 22px;
}

.admin-brand small {
  font-size: 16px;
}

.admin-sidebar > a:not(.brand) {
  padding: 12px 14px;
  border-radius: 8px;
  color: #435063;
  font-weight: 760;
}

.admin-sidebar > a.active,
.admin-sidebar > a:not(.brand):hover {
  color: var(--ink);
  background: #eaf6ff;
}

.admin-main {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
  padding: clamp(18px, 3vw, 38px);
}

.admin-top h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
}

.admin-form {
  padding: 22px;
}

.admin-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-list.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-card-form {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.json-preview {
  min-height: 480px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.file-button input {
  display: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  padding: 13px 16px;
  color: #fff;
  border-radius: 8px;
  background: #1f7a3b;
  box-shadow: var(--shadow);
}

@media (max-width: 1080px) {
  .main-nav {
    display: none;
  }

  .hero,
  .summer-band,
  .two-col,
  .faq-section,
  .contacts,
  .official-layout {
    grid-template-columns: 1fr;
  }

  .program-grid,
  .schedule-table,
  .admin-list,
  .admin-list.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .official-nav {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
    padding-inline: 20px 34px;
  }

  .hero,
  .section,
  .page-title,
  .official-layout,
  .footer {
    padding-inline: 20px 34px;
  }

  .summer-band {
    padding-inline: 20px 34px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: min(100%, calc(100vw - 54px));
  }

  .header-actions .primary-button,
  .header-actions .ghost-button {
    width: 100%;
    padding-inline: 10px;
    text-align: center;
  }

  .hero {
    min-height: auto;
  }

  .hero-art {
    min-height: 320px;
  }

  .hero-copy,
  .hero-actions,
  .program-card,
  .stats-band article,
  .summer-panel {
    width: min(100%, calc(100vw - 54px));
  }

  .stats-band,
  .program-grid,
  .advantage-list,
  .schedule-table,
  .contact-grid,
  .admin-list,
  .admin-list.compact,
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .section-head,
  .admin-top,
  .footer,
  .modal-head,
  .list-head,
  .doc-list section,
  .staff-list section {
    align-items: stretch;
    flex-direction: column;
  }

  .contacts {
    margin: 18px;
  }

  .requisites-list section {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
