/* ==========================================================================
   Страница «Курсы английского языка» (english.php, /lang/all/english/).
   Дизайн по макету: светлый hero с фото, полоса плюсов, программы с фото, цены, расписание, баннер.
   Старые тексты — в раскрывающихся блоках внизу (.en-more). Всё завешено на .english-page.
   Переменные --nh-* — из header.css.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@600&display=swap");

.english-page {
  --ink: #0b1b3a;
  --navy: #0e2150;
  --line: rgba(11, 27, 58, 0.12);
  --blue: #0059cd;
  --blue-deep: #0a3fa0;
  --tint: #eaf2ff;
  --muted: #5d6b86;
  --yellow: #ffcf1f;
  --yellow-deep: #f5bd00;
  --green: #12a150;
  color: var(--ink);
  overflow-x: clip;
}

.english-page * {
  box-sizing: border-box;
}

.english-page a {
  text-decoration: none;
}

.english-page :where(h1, h2, h3, p) {
  margin: 0;
}

/* ---------- Кнопки ---------- */

.en-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.en-btn--yellow {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 10px 20px -12px rgba(245, 189, 0, 0.9);
}

.en-btn--yellow:hover {
  background: var(--yellow-deep);
  color: var(--ink);
}

.en-btn--line {
  border-color: var(--ink);
  background: #fff;
  color: var(--ink);
}

.en-btn--line:hover {
  background: var(--ink);
  color: #fff;
}

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

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

.en-btn--small {
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-size: 13px;
}

.en-btn--small:hover {
  background: var(--blue-deep);
  color: #fff;
}

/* ---------- Обложка ---------- */

.en-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: linear-gradient(120deg, #fff 0%, #f1f6ff 100%);
}

.en-hero__photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 62%;
}

.en-hero__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 30%;
}

/* белый плавный переход фото в фон слева */
.en-hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.85) 14%, rgba(255, 255, 255, 0) 46%);
}

.en-hero__inner {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 32px 56px;
}

.en-hero__inner > * {
  position: relative;
  max-width: 640px;
}

.en-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.en-crumbs a {
  color: var(--muted);
}

.en-crumbs a:hover {
  color: var(--blue);
}

.en-crumbs [aria-current] {
  color: var(--ink);
}

.en-hero__title {
  color: var(--ink);
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.en-hero__title span {
  display: block;
}

.en-hero__tag {
  margin-top: 14px;
  color: var(--blue);
  font-size: clamp(24px, 2.7vw, 36px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.en-hero__lead {
  margin-top: 20px !important;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
}

.en-hero__list {
  display: grid;
  gap: 11px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.en-hero__list li {
  position: relative;
  padding-left: 36px;
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.4;
}

.en-hero__list li::before {
  content: "✓";
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.en-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

/* ---------- Полоса плюсов ---------- */

.en-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px 0;
  position: relative;
  width: calc(100% - 64px);
  max-width: 1320px;
  margin: -34px auto 0;
  padding: 18px 12px;
  border-radius: 18px;
  background: var(--tint);
  box-shadow: 0 18px 36px -26px rgba(0, 53, 125, 0.5);
}

.en-strip__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-left: 1px solid rgba(11, 27, 58, 0.1);
}

.en-strip__item:first-child {
  border-left: 0;
}

.en-strip__item svg {
  flex: none;
  width: 36px;
  height: 36px;
  color: var(--ink);
}

.en-strip__item svg * {
  color: inherit;
}

.en-strip__item b {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.en-strip__item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

/* ---------- Секции ---------- */

.en-section {
  max-width: 1320px;
  margin: 72px auto 0;
  padding: 0 32px;
}

.en-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.en-h2 {
  margin: 0 !important;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-align: left;
}

.en-script {
  color: var(--blue);
  font-family: "Caveat", "Segoe Script", cursive;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  text-align: right;
}

/* ---------- Выбор программы ---------- */

.en-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.en-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
}

.en-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 36px -24px rgba(0, 53, 125, 0.55);
}

.en-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.4;
  object-fit: cover;
}

.en-card h3 {
  padding: 16px 20px 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.22;
}

.en-card p {
  padding: 8px 20px 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.en-card__more {
  margin-top: auto;
  padding: 14px 20px 18px;
  color: var(--blue);
  font-size: 14.5px;
  font-weight: 800;
}

.en-card__more b {
  margin-left: 4px;
  transition: margin 0.2s;
}

.en-card:hover .en-card__more b {
  margin-left: 10px;
}

.en-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.en-links a {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s;
}

.en-links a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ---------- Стоимость ---------- */

.en-prices {
  display: grid;
  grid-template-columns: minmax(250px, 1.15fr) repeat(4, minmax(170px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.en-prices__intro {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 6px;
}

.en-prices__intro .en-h2 {
  font-size: clamp(24px, 2.3vw, 30px);
}

.en-prices__list {
  margin: 0;
  padding: 20px 18px;
  border-radius: 12px;
  background: #fff4cc;
  list-style: none;
}

.en-prices__list li {
  position: relative;
  padding: 0 0 10px 26px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.en-prices__list li:last-child {
  padding-bottom: 0;
}

.en-prices__list li::before {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  font-weight: 800;
}

.en-price {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 22px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.en-price--main {
  padding-top: 0;
  border: 2px solid var(--navy);
  overflow: hidden;
}

.en-price--main h3,
.en-price--main .en-price__sub {
  width: calc(100% + 36px);
  margin: 0 -18px;
  padding-right: 18px;
  padding-left: 18px;
  background: var(--navy);
  color: #fff;
}

.en-price--main h3 {
  padding-top: 18px;
  padding-bottom: 0;
}

.en-price--main .en-price__sub {
  margin-top: -6px;
  padding-bottom: 14px;
  color: rgba(255, 255, 255, 0.85);
}

.en-price--main .en-price__sum {
  margin-top: 16px;
}

.en-price__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.en-price h3 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.en-price__sub {
  color: var(--muted);
  font-size: 13px;
}

.en-price__sum {
  margin-top: 14px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.en-price__sum small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.en-price__promo,
.en-price__note {
  width: 100%;
  margin: 6px 0 14px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
}

.en-price__promo {
  background: #ffe9ea;
  color: #b3262c;
}

.en-price__note {
  background: var(--tint);
  color: var(--ink);
}

.en-price .en-btn {
  width: 100%;
  margin-top: auto;
  margin-bottom: 0;
  padding: 12px 14px;
}

/* ---------- Расписание ---------- */

.en-sch input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.en-sch__head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.en-sch__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.en-sch__tabs label {
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.en-sch__tabs label:hover {
  background: #d7e6ff;
}

#en-tab-adults:checked ~ .en-sch__head label[for="en-tab-adults"],
#en-tab-teens:checked ~ .en-sch__head label[for="en-tab-teens"],
#en-tab-kids:checked ~ .en-sch__head label[for="en-tab-kids"],
#en-tab-club:checked ~ .en-sch__head label[for="en-tab-club"] {
  background: var(--navy);
  color: #fff;
}

.en-sch input:focus-visible ~ .en-sch__head .en-sch__tabs {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

/* показываем строки только выбранной группы (если :has не поддерживается — видны все) */
.en-sch:has(#en-tab-adults:checked) tr[data-g]:not([data-g="adults"]),
.en-sch:has(#en-tab-teens:checked) tr[data-g]:not([data-g="teens"]),
.en-sch:has(#en-tab-kids:checked) tr[data-g]:not([data-g="kids"]),
.en-sch:has(#en-tab-club:checked) tr[data-g]:not([data-g="club"]) {
  display: none;
}

.en-sch__wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.en-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.en-table th {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f6f9ff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

.en-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  vertical-align: middle;
}

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

.en-table td + td,
.en-table th + th {
  border-left: 1px solid var(--line);
}

.en-table td:last-child,
.en-table th:last-child {
  border-left: 0;
}

.en-st {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.en-st::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.en-st--few::before {
  background: #f5a524;
}

.en-st--full::before {
  background: #98a2b3;
}

.en-empty td {
  padding: 22px 20px;
  color: var(--muted);
  font-size: 15px;
}

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

.en-sch-note {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 26px 30px;
  border-radius: 12px;
  background: var(--tint);
}

.en-sch-note p {
  max-width: 760px;
  color: #34425b;
  font-size: 16px;
  line-height: 1.65;
}

.en-sch-note a {
  color: var(--blue);
  font-weight: 700;
}

/* ---------- Финальный баннер ---------- */

.en-cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 36px 40px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.92) 34%, rgba(255, 255, 255, 0.1) 72%),
    var(--cta-img) right center / cover no-repeat;
}

.en-cta__text {
  max-width: 560px;
}

.en-cta__title {
  color: var(--ink);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.en-cta__text p + p {
  margin-top: 10px;
  color: #34425b;
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- Подробнее о курсе: раскрывающиеся блоки со старыми текстами ---------- */

.en-more {
  margin-bottom: 8px;
}

.en-more__label {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.en-acc {
  border-top: 1px solid var(--line);
}

.en-acc:last-of-type {
  border-bottom: 1px solid var(--line);
}

.en-acc > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 4px;
  cursor: pointer;
  list-style: none;
}

.en-acc > summary::-webkit-details-marker {
  display: none;
}

.en-acc > summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--blue);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.en-acc[open] > summary::after {
  content: "−";
  background: var(--blue);
  color: #fff;
}

.en-acc > summary:hover h2 {
  color: var(--blue);
}

.en-acc > summary h2 {
  color: var(--ink);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.25;
  transition: color 0.2s;
}

.en-acc > :not(summary) {
  margin-bottom: 26px;
}

/* ---------- Тексты со старой страницы ---------- */

.en-prose {
  max-width: 880px;
}

.en-prose p {
  margin: 0 0 18px;
  color: #34425b;
  font-size: 16.5px;
  line-height: 1.8;
}

.en-prose p:last-child {
  margin-bottom: 0;
}

.en-prose strong,
.en-prose b {
  color: var(--ink);
}

.en-prose em {
  color: var(--ink);
  font-style: normal;
  font-weight: 700;
}

.en-prose ul,
.en-prose ol {
  margin: 4px 0 22px;
  padding: 0;
  list-style: none;
}

.en-prose li {
  position: relative;
  margin: 0 0 8px;
  padding-left: 26px;
  color: #34425b;
  font-size: 16.5px;
  line-height: 1.65;
}

.en-prose li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 2px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--blue);
}

.en-prose a {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(0, 89, 205, 0.35);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.en-prose a:hover {
  text-decoration-color: var(--blue);
}

.en-prose img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* карточка преподавателя клуба (таблица со старой страницы) */
.en-prose table {
  width: 100%;
  margin: 8px 0 26px;
  border-collapse: separate;
  border-spacing: 0;
}

.en-prose td {
  vertical-align: top;
}

.en-prose td:first-child {
  width: 190px;
  padding: 0 24px 0 0;
}

.en-prose td p {
  font-size: 15.5px;
}

.en-prose td em {
  color: #34425b;
  font-style: italic;
  font-weight: 400;
}

.en-prose td p:first-child em {
  font-style: normal;
}

.en-prose td p:first-child strong {
  font-size: 18px;
}

.en-prose td img {
  width: 190px;
  height: auto;
  border-radius: 14px;
}

/* ---------- Учебные пособия ---------- */

.en-books {
  display: grid;
  gap: 16px;
}

.en-book {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.en-book img {
  flex: none;
  width: 130px;
  height: auto;
  border-radius: 6px;
}

.en-book div {
  flex: 1 1 360px;
}

.en-book h3 {
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.en-book p {
  color: #34425b;
  font-size: 15.5px;
  line-height: 1.7;
}

/* ---------- Лицензия ---------- */

.en-license {
  display: inline-block;
  max-width: 340px;
}

.en-license img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* ---------- Преподаватели ---------- */

.en-teachers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.en-teacher {
  padding: 10px 10px 18px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
}

.en-teacher img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin-bottom: 12px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
}

.en-teacher img[src$=".png"] {
  object-fit: contain;
}

.en-teacher h3 {
  margin: 0 4px 6px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.en-teacher p {
  margin: 0 4px;
  color: #9fd0ff;
  font-size: 12.5px;
  font-weight: 600;
}

.en-test {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 22px 28px;
  border-radius: 12px;
  background: var(--tint);
}

.en-test p {
  max-width: 720px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

/* ---------- Проекты ---------- */

.en-extra {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.en-extra__item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.2s;
}

.en-extra__item:hover {
  border-color: var(--blue);
}

.en-extra__item img {
  flex: none;
  width: 80px;
  height: auto;
}

.en-extra__item h3 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
}

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

@media (max-width: 1180px) {
  .en-prices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .en-prices__intro {
    grid-column: 1 / -1;
  }

  .en-hero__photo {
    width: 56%;
  }
}

@media (max-width: 860px) {
  .en-hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  /* на узком экране фото уходит под текст как отдельный блок */
  .en-hero__photo {
    position: relative;
    order: 2;
    width: auto;
    height: 300px;
    margin: 0 22px 32px;
    border-radius: 16px;
    overflow: hidden;
  }

  .en-hero__photo::after {
    display: none;
  }

  .en-hero__inner {
    padding: 24px 22px 28px;
  }

  .en-hero__inner > * {
    max-width: none;
  }

  .en-hero__cta .en-btn {
    width: 100%;
  }

  .en-strip {
    width: calc(100% - 44px);
    margin-top: 8px;
  }

  .en-strip__item {
    border-left: 0;
  }

  .en-section {
    margin-top: 56px;
    padding: 0 22px;
  }

  .en-script {
    text-align: left;
  }

  .en-prices {
    grid-template-columns: minmax(0, 1fr);
  }

  .en-cta {
    padding: 28px 24px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 100%),
      var(--cta-img) center / cover no-repeat;
  }

  .en-cta .en-btn {
    width: 100%;
  }

  .en-prose td:first-child {
    display: block;
    width: auto;
    padding: 0 0 16px;
  }

  .en-prose table,
  .en-prose tbody,
  .en-prose tr,
  .en-prose td {
    display: block;
  }

  /* таблица расписания превращается в список карточек */
  .en-table,
  .en-table tbody,
  .en-table tr,
  .en-table td {
    display: block;
  }

  .en-table thead {
    display: none;
  }

  .en-table tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }

  .en-table td,
  .en-table td + td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
    border: 0;
    text-align: right;
  }

  .en-table td[data-l]::before {
    content: attr(data-l);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
  }

  .en-table td:last-child {
    padding-top: 12px;
  }

  .en-table td:last-child .en-btn {
    width: 100%;
  }

  .en-empty td[colspan] {
    display: block;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .en-card,
  .en-btn,
  .en-links a,
  .en-extra__item {
    transition: none;
  }
}

/* ==========================================================================
   Попап «Тест на уровень английского» (js/english-test.js)
   ========================================================================== */

html.entest-open {
  overflow: hidden;
}

.entest {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.entest[hidden] {
  display: none;
}

.entest__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 21, 58, 0.62);
  backdrop-filter: blur(6px);
  animation: entest-fade 0.25s ease both;
}

.entest__panel {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 40px 44px 36px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 40px 90px -30px rgba(0, 12, 40, 0.7);
  animation: entest-rise 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes entest-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes entest-rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.entest__screen {
  animation: entest-fade 0.3s ease both;
}

.entest__screen[hidden] {
  display: none;
}

.entest__screen--center {
  text-align: center;
}

.entest__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

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

.entest__close svg {
  width: 18px;
  height: 18px;
  color: inherit;
}

.entest__close svg * {
  color: inherit;
}

.entest__badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.entest__title {
  margin-bottom: 12px !important;
  color: var(--ink);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.entest__lead {
  color: #34425b;
  font-size: 16.5px;
  line-height: 1.65;
}

.entest__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 26px 0 20px;
  padding: 0;
  list-style: none;
}

.entest__facts li {
  padding: 16px 12px;
  border-radius: 14px;
  background: var(--tint);
  text-align: center;
}

.entest__facts b {
  display: block;
  color: var(--blue);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.entest__facts span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.entest__hint {
  margin-bottom: 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.entest__go {
  width: 100%;
}

/* вопросы */

.entest__head {
  margin: 0 40px 26px 0;
}

.entest__num {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entest__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--tint);
}

.entest__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--blue), #4cc4ff);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.entest__question {
  min-height: 2.6em;
  margin-bottom: 22px !important;
  color: var(--ink);
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 800;
  line-height: 1.3;
  outline: none;
}

.entest__options {
  display: grid;
  gap: 10px;
}

.entest__opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s, transform 0.18s;
}

.entest__opt:hover {
  border-color: var(--blue);
  background: #f5f9ff;
}

.entest__opt:active {
  transform: scale(0.99);
}

.entest__opt.is-picked {
  border-color: var(--blue);
  background: var(--tint);
}

.entest__key {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--tint);
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  transition: background-color 0.18s, color 0.18s;
}

.entest__opt:hover .entest__key,
.entest__opt.is-picked .entest__key {
  background: var(--blue);
  color: #fff;
}

.entest__foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.entest__link {
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}

.entest__link:hover {
  color: var(--blue);
}

.entest__link[hidden] {
  display: none;
}

.entest__foot .entest__link:last-child {
  margin-left: auto;
}

.entest__keys {
  margin-top: 8px;
  color: #98a2b3;
  font-size: 12.5px;
  text-align: center;
}

/* результат */

.entest__resulthead {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 28px;
  align-items: center;
  margin: 0 36px 14px 0;
}

.entest__resulthead > div:last-child {
  flex: 1 1 260px;
  min-width: 0;
}

.entest__ring {
  --p: 0;
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--tint) 0);
  transition: --p 0.9s ease;
}

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.entest__ring > div {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #fff;
  text-align: center;
}

.entest__level {
  display: block;
  color: var(--ink);
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.entest__score {
  display: block;
  margin-top: -14px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.entest__kicker {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entest__levelname {
  margin-bottom: 8px !important;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.entest__leveltext {
  max-width: 380px;
  color: #34425b;
  font-size: 15px;
  line-height: 1.6;
}

.entest__note {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 13px;
}

.entest__form {
  padding: 22px;
  border-radius: 16px;
  background: #f5f9ff;
}

.entest__formtitle {
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

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

.entest__field--wide {
  grid-column: 1 / -1;
}

.entest__field span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.entest__field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  outline: none;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.2s;
}

.entest__field input:focus {
  box-shadow: 0 0 0 2px var(--blue);
}

.entest__format {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}

.entest__format legend {
  float: left;
  width: 100%;
  margin-bottom: 6px;
  padding: 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.entest__format label {
  cursor: pointer;
}

.entest__format input {
  position: absolute;
  opacity: 0;
}

.entest__format span {
  display: block;
  padding: 9px 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.entest__format input:checked + span {
  background: var(--navy);
  color: #fff;
  box-shadow: none;
}

.entest__format input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.entest__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.entest__agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 16px 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  cursor: pointer;
}

.entest__agree input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--blue);
}

.entest__agree a {
  color: var(--blue);
  text-decoration: underline;
}

.entest__error {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffe9ea;
  color: #b3262c;
  font-size: 14px;
  font-weight: 700;
}

.entest__error[hidden] {
  display: none;
}

.entest__submit {
  width: 100%;
}

.entest__submit.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.entest__submit:disabled {
  cursor: wait;
}

.entest__again {
  display: block;
  margin: 12px auto 0;
}

.entest__ok {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 8px auto 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 16px 30px -14px var(--green);
  animation: entest-pop 0.5s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

.entest__ok svg {
  width: 40px;
  height: 40px;
  color: inherit;
}

.entest__ok svg * {
  color: inherit;
}

@keyframes entest-pop {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.entest__screen--center .en-btn {
  margin-top: 26px;
}

@media (max-width: 640px) {
  .entest {
    padding: 0;
    align-items: flex-end;
  }

  .entest__panel {
    max-width: none;
    max-height: 94vh;
    padding: 34px 20px 24px;
    border-radius: 22px 22px 0 0;
  }

  .entest__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .entest__resulthead {
    margin-right: 0;
  }

  .entest__form {
    padding: 18px 16px;
  }

  .entest__opt {
    padding: 13px 14px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .entest__backdrop,
  .entest__panel,
  .entest__screen,
  .entest__ok {
    animation: none;
  }

  .entest__bar span,
  .entest__ring {
    transition: none;
  }
}

/* ==========================================================================
   Попап программы (js/english-programs.js): подростки, дети, разговорный клуб
   Использует оболочку попапа теста (.entest), ниже — только то, что отличается.
   ========================================================================== */

.enprog .entest__panel {
  max-width: 760px;
  padding-bottom: 0;
}

.enprog__title {
  margin-right: 44px;
}

.enprog__eyebrow {
  background: var(--tint);
  color: var(--blue);
}

.enprog__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 22px;
  padding: 0;
  list-style: none;
}

.enprog__chips li {
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff4cc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.enprog__chips li:empty {
  display: none;
}

.enprog__body > p {
  margin: 0 0 16px;
  color: #34425b;
  font-size: 16px;
  line-height: 1.75;
}

.enprog__body h3 {
  position: relative;
  margin: 28px 0 12px;
  padding-left: 16px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

.enprog__body h3::before {
  content: "";
  position: absolute;
  top: 0.12em;
  bottom: 0.12em;
  left: 0;
  width: 5px;
  border-radius: 5px;
  background: linear-gradient(180deg, var(--blue), #4cc4ff);
}

.enprog__body ul {
  display: grid;
  gap: 10px;
  margin: 4px 0 18px;
  padding: 0;
  list-style: none;
}

.enprog__body li {
  position: relative;
  padding: 12px 16px 12px 46px;
  border-radius: 12px;
  background: #f5f9ff;
  color: #34425b;
  font-size: 15.5px;
  line-height: 1.6;
}

.enprog__body li::before {
  content: "✓";
  position: absolute;
  top: 12px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

/* кнопки закреплены внизу окна, пока читаешь текст */
.enprog__foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px -44px 0;
  padding: 18px 44px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.enprog__foot .en-btn {
  flex: 1 1 220px;
}

@media (max-width: 640px) {
  .enprog__foot {
    margin: 20px -20px 0;
    padding: 14px 20px 18px;
  }

  .enprog__body h3 {
    font-size: 18px;
  }
}
