:root {
  color-scheme: light;
  --text: #1d2735;
  --muted: #687386;
  --line: #d8e1eb;
  --bg: #f4f7fa;
  --white: #ffffff;
  --blue: #0e4684;
  --blue-dark: #0d314f;
  --cyan: #1da6c3;
  --orange: #f06423;
  --green: #248765;
  --shadow: 0 8px 24px rgba(18, 51, 86, 0.08);
  --radius: 6px;
  font-family: Arial, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
}

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

img {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.page-width {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.utility {
  background: var(--blue-dark);
  color: #e8f4ff;
  font-size: 14px;
}

.utility-inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.utility a:hover,
.masthead-contact a:hover,
.main-nav a:hover,
.link-list a:hover,
.plain-link:hover {
  text-decoration: underline;
}

.masthead {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.masthead-inner {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.brand strong {
  display: block;
  color: var(--blue-dark);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 16px;
}

.masthead-contact {
  display: grid;
  gap: 6px;
  color: var(--blue);
  text-align: right;
  font-weight: 700;
}

.main-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow);
}

.nav-scroll {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.main-nav a {
  flex: 0 0 auto;
  padding: 15px 16px;
  font-weight: 700;
  font-size: 15px;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.welcome {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 28px;
  align-items: stretch;
  padding: 28px 0;
}

.welcome-copy {
  padding: clamp(24px, 4vw, 42px);
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 6px solid var(--cyan);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.label {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: var(--blue-dark);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1;
}

h2 {
  margin-bottom: 18px;
  color: var(--blue-dark);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
}

h3 {
  margin-bottom: 8px;
  color: var(--blue-dark);
  font-size: 21px;
  line-height: 1.25;
}

p {
  color: #485568;
  line-height: 1.65;
}

.welcome-copy p:not(.label) {
  max-width: 720px;
  font-size: 18px;
}

.primary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fafc;
  color: var(--blue);
  font-weight: 700;
}

.button.main {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.school-photo {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.school-photo img {
  display: block;
  width: 100%;
  height: calc(100% - 44px);
  min-height: 260px;
  object-fit: cover;
}

.school-photo figcaption {
  min-height: 44px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
}

.quick-section,
.content,
.official-inner {
  padding: 28px 0;
}

.quick-section h2 {
  margin-bottom: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-grid a {
  min-height: 66px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-left: 4px solid var(--cyan);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--blue-dark);
  font-weight: 700;
  line-height: 1.3;
  box-shadow: var(--shadow);
}

.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.main-column,
.sidebar {
  display: grid;
  gap: 22px;
}

.block,
.side-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.block {
  padding: 26px;
}

.side-block {
  padding: 20px;
}

.side-block h2 {
  margin-bottom: 14px;
  font-size: 22px;
}

.about-list {
  display: grid;
  gap: 14px;
}

.about-list article {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: start;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.about-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.about-list img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.director {
  display: grid;
  grid-template-columns: 142px 1fr;
  gap: 22px;
  align-items: start;
}

.director img {
  width: 142px;
  height: 190px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

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

.project-grid a {
  display: grid;
  grid-template-rows: 112px auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #f8fafc;
}

.project-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: #fff;
}

.project-grid span {
  display: flex;
  align-items: center;
  min-height: 54px;
  padding: 12px;
  color: var(--blue-dark);
  font-weight: 700;
}

.link-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.link-list a {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--blue);
  font-weight: 700;
  line-height: 1.35;
}

.link-list a:last-child {
  border-bottom: 0;
}

.contacts p {
  margin-bottom: 12px;
}

.contacts a {
  color: var(--blue);
  font-weight: 700;
}

.plain-link {
  display: inline-flex;
  margin-top: 4px;
  color: var(--green);
  font-weight: 800;
}

.official-band {
  margin-top: 20px;
  background: #eaf2f8;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.official-inner {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 28px;
  align-items: start;
}

.official-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.official-links a {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--blue-dark);
  font-weight: 700;
  line-height: 1.25;
}

.footer {
  background: var(--blue-dark);
  color: #dcebf7;
}

.footer-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 14px;
}

@media (max-width: 980px) {
  .masthead-inner,
  .welcome,
  .content,
  .official-inner {
    grid-template-columns: 1fr;
  }

  .masthead-inner {
    padding: 16px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .masthead-contact {
    text-align: left;
  }

  .quick-grid,
  .official-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .school-photo img {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 700px) {
  .page-width {
    width: min(100% - 20px, 1180px);
  }

  body {
    background: #eef4f8;
  }

  .utility-inner {
    justify-content: flex-start;
    gap: 6px;
    padding: 6px 0;
    min-height: 0;
  }

  .utility a {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
  }

  .masthead-inner {
    gap: 12px;
    padding: 12px 0;
  }

  .brand {
    align-items: center;
    gap: 10px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .brand strong {
    font-size: 19px;
    line-height: 1.15;
  }

  .brand small {
    margin-top: 3px;
    font-size: 13px;
  }

  .masthead-contact {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 4px;
    padding-left: 62px;
    font-size: 14px;
  }

  .main-nav {
    top: 0;
  }

  .nav-scroll {
    width: 100%;
    min-height: 46px;
    gap: 0;
    padding: 0 10px;
    scroll-snap-type: x proximity;
  }

  .main-nav a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    font-size: 14px;
    scroll-snap-align: start;
  }

  .welcome {
    gap: 12px;
    padding: 12px 0 18px;
  }

  .welcome-copy,
  .block,
  .side-block {
    padding: 16px;
    box-shadow: none;
  }

  .welcome-copy {
    border-left-width: 4px;
  }

  .label {
    margin-bottom: 8px;
    font-size: 11px;
    line-height: 1.35;
  }

  h1 {
    margin-bottom: 12px;
    font-size: 34px;
  }

  h2 {
    margin-bottom: 12px;
    font-size: 24px;
  }

  h3 {
    font-size: 19px;
  }

  p,
  .welcome-copy p:not(.label) {
    font-size: 15px;
    line-height: 1.55;
  }

  .primary-actions {
    gap: 8px;
    margin-top: 18px;
  }

  .primary-actions,
  .button {
    width: 100%;
  }

  .button {
    justify-content: center;
    min-height: 46px;
    padding: 0 12px;
    font-size: 15px;
  }

  .school-photo figcaption {
    min-height: 38px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .quick-section,
  .content,
  .official-inner {
    padding: 18px 0;
  }

  .quick-section h2 {
    margin-bottom: 10px;
  }

  .quick-grid,
  .about-list article,
  .director,
  .project-grid,
  .official-links {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    gap: 8px;
  }

  .quick-grid a,
  .official-links a {
    min-height: 50px;
    padding: 12px 14px;
    font-size: 15px;
  }

  .content {
    gap: 16px;
  }

  .main-column,
  .sidebar {
    gap: 16px;
  }

  .about-list {
    gap: 12px;
  }

  .about-list article {
    gap: 12px;
    padding-top: 12px;
  }

  .about-list img {
    aspect-ratio: 16 / 8;
  }

  .director img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-position: top;
  }

  .project-grid a {
    grid-template-columns: 96px 1fr;
    grid-template-rows: auto;
    min-height: 86px;
  }

  .project-grid img {
    min-height: 86px;
    padding: 8px;
  }

  .project-grid span {
    min-height: 86px;
    padding: 12px 14px;
  }

  .link-list a {
    padding: 11px 0;
    font-size: 15px;
  }

  .official-band {
    margin-top: 8px;
  }

  .footer-inner {
    min-height: 78px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    padding: 16px 0;
  }
}

@media (max-width: 390px) {
  .page-width {
    width: min(100% - 16px, 1180px);
  }

  .brand strong {
    font-size: 17px;
  }

  .masthead-contact {
    padding-left: 0;
  }

  h1 {
    font-size: 30px;
  }

  .project-grid a {
    grid-template-columns: 84px 1fr;
  }

  .project-grid img,
  .project-grid span {
    min-height: 78px;
  }
}

.schedule-hero {
  padding: 34px 0 22px;
}

.schedule-hero h1 {
  margin-bottom: 10px;
}

.schedule-updated {
  color: #657184;
  font-size: 14px;
}

.class-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 10px;
}

.class-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #cbd8e6;
  border-radius: 6px;
  background: #fff;
  color: #0d314f;
  text-decoration: none;
  font-weight: 700;
}

.schedule-list {
  display: grid;
  gap: 28px;
  padding-bottom: 42px;
}

.class-schedule {
  border-top: 1px solid #d8e2ec;
  padding-top: 24px;
}

.schedule-scroll {
  overflow-x: auto;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.schedule-table {
  width: 100%;
  min-width: 1540px;
  border-collapse: collapse;
  table-layout: fixed;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #d8e2ec;
  padding: 7px;
  vertical-align: top;
}

.schedule-table thead th {
  background: #eef5fb;
  color: #193752;
  font-size: 14px;
  line-height: 1.2;
}

.schedule-table thead th:first-child {
  width: 126px;
}

.schedule-table thead small {
  display: block;
  margin-top: 3px;
  color: #657184;
  font-weight: 500;
}

.schedule-table tbody th {
  width: 118px;
  background: #f7fafc;
  color: #193752;
  text-align: left;
  font-size: 14px;
  line-height: 1.25;
}

.lesson-tile {
  display: grid;
  gap: 3px;
  min-height: 96px;
  min-width: 0;
  padding: 9px;
  border-left: 4px solid #2475b8;
  border-radius: 6px;
  background: #edf6ff;
  color: #183047;
  overflow-wrap: anywhere;
  word-break: normal;
}

.lesson-tile strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.25;
}

.lesson-tile span,
.lesson-tile em {
  min-width: 0;
  color: #536274;
  font-size: 12px;
  font-style: normal;
  line-height: 1.25;
}

.lesson-tile em {
  margin-top: 2px;
  color: #0d5b93;
  font-weight: 700;
}

.empty-lesson {
  display: grid;
  min-height: 64px;
  place-items: center;
  color: #9aa6b5;
  font-size: 0;
}

.empty-lesson::before {
  content: "";
}

.schedule-empty {
  padding: 24px 0 48px;
}

@media (max-width: 760px) {
  .schedule-hero {
    padding: 20px 0 14px;
  }

  .schedule-hero h1 {
    font-size: 32px;
  }

  .class-tabs {
    gap: 6px;
    margin-top: 14px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .class-tabs a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    font-size: 14px;
  }

  .schedule-list {
    gap: 20px;
    padding-bottom: 28px;
  }

  .class-schedule {
    padding-top: 18px;
  }

  .schedule-scroll {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .schedule-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 10px;
  }

  .schedule-table,
  .schedule-table tbody,
  .schedule-table tr,
  .schedule-table th,
  .schedule-table td {
    display: block;
    width: 100%;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tbody tr {
    overflow: hidden;
    border: 1px solid #d8e2ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .schedule-table tbody tr:not(:has(.lesson-tile)) {
    display: none;
  }

  .schedule-table tbody th {
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #d8e2ec;
    background: #eef5fb;
    font-size: 16px;
  }

  .schedule-table td {
    position: relative;
    padding: 12px 12px 12px 84px;
    border: 0;
    border-bottom: 1px solid #e5edf4;
  }

  .schedule-table td:last-child {
    border-bottom: 0;
  }

  .schedule-table td:has(.empty-lesson) {
    display: none;
  }

  .schedule-table td::before {
    position: absolute;
    top: 14px;
    left: 12px;
    width: 58px;
    color: #657184;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
  }

  .schedule-table td:nth-child(2)::before {
    content: "1 урок";
  }

  .schedule-table td:nth-child(3)::before {
    content: "2 урок";
  }

  .schedule-table td:nth-child(4)::before {
    content: "3 урок";
  }

  .schedule-table td:nth-child(5)::before {
    content: "4 урок";
  }

  .schedule-table td:nth-child(6)::before {
    content: "5 урок";
  }

  .schedule-table td:nth-child(7)::before {
    content: "6 урок";
  }

  .schedule-table td:nth-child(8)::before {
    content: "7 урок";
  }

  .schedule-table td:nth-child(9)::before {
    content: "8 урок";
  }

  .schedule-table td:nth-child(10)::before {
    content: "9 урок";
  }

  .lesson-tile {
    min-height: 0;
    padding: 10px 11px;
    border-left-width: 3px;
  }

  .lesson-tile strong {
    font-size: 15px;
  }

  .lesson-tile span,
  .lesson-tile em {
    font-size: 13px;
  }
}

@media (max-width: 420px) {
  .schedule-table td {
    padding-left: 72px;
  }

  .schedule-table td::before {
    width: 48px;
    font-size: 11px;
  }
}
