#mobile-home {
  display: none;
}

#mobile-page {
  display: none;
}

@media (max-width: 700px) {
  html,
  body {
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    background: #f4f6fb;
    color: #161616;
  }

  body > .pgdiv,
  body > header.pgdiv,
  body > section.pgdiv,
  body > .popupContent {
    display: none !important;
  }

  #mobile-home {
    display: block;
  }

  #mobile-page {
    display: block;
  }
}

@media (max-width: 700px) {
  #mobile-home {
    display: block;
  }

  .m-page {
    padding: 0 16px 36px;
  }

  /* ── Header ─────────────────────────────────── */
  .m-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    margin: 0 -16px 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 16px rgba(0, 0, 0, 0.07);
    backdrop-filter: blur(16px);
  }

  .m-logo {
    width: 70px;
    height: 46px;
    background: url("/files/block/bg01889.webp") center / contain no-repeat;
    flex: 0 0 auto;
  }

  .m-phone {
    color: #294895;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    flex: 1;
    text-align: right;
  }

  .m-burger {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .m-burger span {
    display: block;
    height: 2px;
    background: #294895;
    border-radius: 2px;
    transform-origin: center;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .m-burger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .m-burger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }
  .m-burger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .m-nav {
    position: sticky;
    top: 66px;
    z-index: 19;
    display: flex;
    flex-direction: column;
    margin: -20px -16px 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.28s ease;
  }

  .m-nav[aria-hidden="false"] {
    max-height: 300px;
  }

  .m-nav-link {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #1a2e6e;
    text-decoration: none;
    border-bottom: 1px solid #f0f2f8;
    transition: background 0.15s;
  }

  .m-nav-link:last-child {
    border-bottom: none;
    color: #294895;
  }

  .m-nav-link:active {
    background: #f0f4ff;
  }

  /* ── Hero ────────────────────────────────────── */
  .m-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 20px 20px;
    border-radius: 24px;
    background: linear-gradient(145deg, #eef2fb 0%, #dde5f8 100%);
    border: 1px solid #c8d5f0;
    box-shadow: 0 6px 24px rgba(41, 72, 149, 0.1);
    overflow: hidden;
    position: relative;
  }

  .m-hero::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(41, 72, 149, 0.06);
    pointer-events: none;
  }

  .m-eyebrow {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #294895;
  }

  .m-hero h1 {
    margin: 0 0 20px;
    font-size: 42px;
    line-height: 1.0;
    font-weight: 800;
    color: #1a2e6e;
    letter-spacing: -0.02em;
  }

  .m-form {
    display: grid;
    gap: 10px;
  }

  .m-input {
    width: 100%;
    height: 46px;
    box-sizing: border-box;
    border: 1.5px solid #b8c8e8;
    border-radius: 12px;
    padding: 0 14px;
    font: inherit;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.85);
    transition: border-color 0.2s;
    outline: none;
  }

  .m-input:focus {
    border-color: #294895;
    background: #fff;
  }

  .m-button {
    height: 48px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #294895 0%, #3d5ec7 100%);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 18px rgba(41, 72, 149, 0.38);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    -webkit-tap-highlight-color: transparent;
  }

  .m-button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(41, 72, 149, 0.3);
  }

  .m-hero-img {
    min-height: 200px;
    border-radius: 18px;
    background: url("/files/block/small2166.jpg") top / cover no-repeat;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  }

  /* ── Sections ────────────────────────────────── */
  .m-section {
    margin-top: 32px;
  }

  .m-section h2 {
    margin: 0 0 16px;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    color: #1a2e6e;
    letter-spacing: -0.01em;
  }

  /* ── Program cards ───────────────────────────── */
  .m-program {
    display: grid;
    gap: 12px;
  }

  .m-program-card {
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
    position: relative;
    overflow: hidden;
  }

  .m-program-card:nth-child(1) {
    background: linear-gradient(135deg, #dde8f8 0%, #c8d8f5 100%);
    border: 1px solid #b8cdf0;
  }

  .m-program-card:nth-child(2) {
    background: linear-gradient(135deg, #e8f4ee 0%, #d0eadb 100%);
    border: 1px solid #b2d9c4;
  }

  .m-program-card h3 {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 800;
    color: #1a2e6e;
  }

  .m-program-card:nth-child(2) h3 {
    color: #1a5234;
  }

  .m-list {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .m-list li {
    margin: 7px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
  }

  .m-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #294895;
    font-weight: 700;
  }

  .m-program-card:nth-child(2) .m-list li::before {
    color: #1a7a4a;
  }

  /* ── About ───────────────────────────────────── */
  .m-about-photo {
    width: 140px;
    height: 180px;
    float: right;
    margin: 0 0 12px 16px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  }

  .m-text {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.55;
  }

  /* ── Features ────────────────────────────────── */
  .m-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .m-feature {
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e4e9f5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #1a2e6e;
  }

  .m-feature-icon {
    font-size: 24px;
    line-height: 1;
  }

  /* ── Place ───────────────────────────────────── */
  .m-place {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(135deg, #3d5ec7 0%, #294895 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(41, 72, 149, 0.3);
  }

  .m-place .m-list li::before {
    color: #7fa8ff;
  }

  .m-place img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  }

  /* ── Teachers ────────────────────────────────── */
  .m-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    gap: 14px;
    margin: 0 -16px;
    padding: 4px 16px 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .m-scroll::-webkit-scrollbar {
    display: none;
  }

  .m-teacher {
    scroll-snap-align: start;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8ecf5;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
  }

  .m-teacher img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top;
    display: block;
  }

  .m-teacher div {
    padding: 14px;
  }

  .m-teacher h3 {
    margin: 0 0 5px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    color: #1a2e6e;
  }

  .m-teacher p {
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
  }

  /* ── Stories ─────────────────────────────────── */
  .m-stories {
    padding: 22px 20px;
    border-radius: 22px;
    background: linear-gradient(145deg, #1a2e6e 0%, #294895 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(26, 46, 110, 0.3);
  }

  .m-story {
    margin: 0 0 18px;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 14px;
    align-items: center;
  }

  .m-story:last-child {
    margin-bottom: 0;
  }

  .m-story img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.35);
  }

  .m-story span {
    font-size: 14px;
    line-height: 1.5;
    font-style: italic;
    opacity: 0.95;
  }

  /* ── Prices ──────────────────────────────────── */
  .m-prices {
    display: grid;
    gap: 10px;
  }

  .m-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px 18px;
    border-radius: 18px;
    background: #fff;
    border: 1.5px solid #e0e6f5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s;
  }

  .m-price.m-price--featured {
    background: linear-gradient(135deg, #294895 0%, #3d5ec7 100%);
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(41, 72, 149, 0.32);
    color: #fff;
  }

  .m-price strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 2px;
  }

  .m-price small {
    font-size: 12px;
    opacity: 0.65;
  }

  .m-price span {
    font-size: 18px;
    font-weight: 800;
    color: #294895;
    white-space: nowrap;
  }

  .m-price.m-price--featured span {
    color: #fff;
  }

  .m-note {
    margin-top: 12px;
    font-size: 12px;
    color: #666;
    line-height: 1.5;
  }

  /* ── Steps ──────────────────────────────────── */
  .m-steps {
    display: grid;
    gap: 10px;
  }

  .m-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e0e6f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-size: 15px;
    font-weight: 600;
    color: #1a2e6e;
  }

  .m-step-num {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #294895, #3d5ec7);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ── Tags ────────────────────────────────────── */
  .m-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .m-tag {
    padding: 8px 14px;
    border-radius: 20px;
    background: #eef2fb;
    border: 1px solid #c8d5f0;
    color: #294895;
    font-size: 13px;
    font-weight: 600;
  }

  /* ── CTA ─────────────────────────────────────── */
  .m-cta {
    margin-top: 32px;
    padding: 24px 20px;
    border-radius: 24px;
    background: linear-gradient(145deg, #eef2fb 0%, #dde5f8 100%);
    border: 1px solid #c8d5f0;
    box-shadow: 0 4px 18px rgba(41, 72, 149, 0.1);
  }

  .m-cta h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 800;
    color: #1a2e6e;
    letter-spacing: -0.01em;
  }

  /* ── Footer ──────────────────────────────────── */
  .m-footer {
    margin-top: 16px;
    padding: 20px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #e0e6f5;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .m-footer p {
    margin: 0 0 8px;
    font-size: 14px;
    color: #444;
  }

  .m-footer p:last-child {
    margin-bottom: 0;
  }

  .m-footer a {
    color: #294895;
    font-weight: 600;
    text-decoration: none;
  }
}
