/* Kompyuterda batafsil matnlar avvalgidek ko‘rinadi. */
.why-intro-short { display: none; }
.why-details > summary { display: none; }

@media (max-width: 580px) {
  html { scroll-padding-top: 72px; }
  .wrap { width: 92%; }
  .top { min-height: 60px; gap: 12px; }
  .brand { font-size: 10px; gap: 8px; }
  .logo { width: 36px; height: 36px; }
  .nav .btn { min-height: 44px; padding: 10px 12px; font-size: 12px; }

  section { padding-top: 36px; }
  main > .wrap > section + section { margin-top: 28px; padding-top: 32px; }
  .section-head { margin-bottom: 18px; }
  .section-head h2, .section-title { font-size: 25px; line-height: 1.22; }
  .section-head .intro, .intro { font-size: 14px; line-height: 1.55; }

  .about-story { gap: 22px; }
  .story-lead { font-size: 15px !important; line-height: 1.6 !important; margin-bottom: 18px !important; }
  .story-timeline { gap: 10px; }
  .story-card { padding: 16px 16px 22px; }
  .story-card h3 { font-size: 16px; margin: 2px 0 6px; }
  .about-story-copy .story-card p { font-size: 13px; line-height: 1.6; }
  .story-quote { padding: 16px 18px; }
  .panel { padding: 19px; }
  .panel p, .panel li { font-size: 14px; line-height: 1.6; }
  .about-stats { padding-top: 26px; }
  .about-stats h3 { font-size: 22px; gap: 10px; margin-bottom: 16px; }
  .about-stats h3::before { width: 34px; height: 34px; border-radius: 11px; font-size: 16px; }

  /* To‘rtta ko‘rsatkichni ikki ustunda, matnlarini to‘liq ko‘rsatish. */
  .results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .result-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-content: start;
    align-items: center;
    gap: 9px 8px;
    min-width: 0;
    min-height: 112px;
    padding: 13px 12px 20px;
    border-radius: 17px;
  }
  .result-card > div { display: contents; border: 0; padding: 0; }
  .result-icon { grid-column: 1; grid-row: 1; width: 34px; height: 34px; }
  .result-icon svg { width: 26px; height: 26px; }
  .result-number {
    grid-column: 2; grid-row: 1;
    min-width: 0; margin: 0;
    font-size: clamp(18px, 5.2vw, 22px);
    line-height: 1.05; white-space: nowrap;
  }
  .result-label { grid-column: 1 / -1; grid-row: 2; font-size: 12px; line-height: 1.4; max-width: none; }

  .why-intro { font-size: 14px; line-height: 1.55; margin: 10px 0 18px; }
  .why-intro-full { display: none; }
  .why-intro-short { display: inline; }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* Izoh ochilganda uni tor ustunda emas, butun ekran kengligida o‘qish mumkin. */
  .why-grid:has(.why-details[open]) { grid-template-columns: minmax(0, 1fr); }
  .why-card { display: flex; flex-direction: column; min-height: 0; padding: 14px 13px 18px; border-radius: 17px; }
  .why-icon { width: 38px; height: 38px; border-radius: 12px; }
  .why-icon svg { width: 21px; height: 21px; }
  .why-card h3 { font-size: 14px; line-height: 1.35; margin: 10px 0 4px; }
  .why-details { margin-top: auto; }
  .why-details > summary {
    display: inline-flex; align-items: center; gap: 7px;
    min-height: 44px; padding: 5px 0;
    color: #1455a4; font-size: 12px; font-weight: 800; line-height: 1.3;
  }
  .why-details > summary::after { float: none; content: '+'; font-size: 17px; line-height: 1; color: inherit; }
  .why-details[open] > summary::after { content: '−'; }
  .why-card:nth-child(even) .why-details > summary { color: #d7ebff; }
  .why-card .why-details p { font-size: 13px; line-height: 1.5; margin: 0 0 4px; }
  .why-grid:has(.why-details[open]) .why-card:not(:has(.why-details[open])) {
    display: grid; grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center; gap: 10px; padding: 10px 12px 14px;
  }
  .why-grid:has(.why-details[open]) .why-card:not(:has(.why-details[open])) h3 { margin: 0; }
  .why-grid:has(.why-details[open]) .why-card:not(:has(.why-details[open])) .why-details { margin: 0; }

  .toc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .toc a { min-height: 50px; padding: 10px 11px; gap: 8px; border-radius: 13px; font-size: 12px; line-height: 1.35; }
  .toc a span { flex: none; font-size: 10px; }
  .schedule { gap: 9px; }
  .schedule .panel { min-height: 0; padding: 16px 14px 23px; border-radius: 16px; }
  .schedule .panel b { font-size: 16px; line-height: 1.25; }
  .schedule .panel span { font-size: 12px; }

  .course { border-radius: 19px; }
  .course-banner { min-height: 128px; padding: 18px; }
  .course .course-banner h3 { font-size: clamp(23px, 6.5vw, 27px); line-height: 1.18; margin: 12px 0 4px; }
  .medical-mark { width: 40px; height: 40px; top: 16px; right: 17px; border-radius: 12px; }
  .medical-mark svg { width: 22px; height: 22px; }
  .course-top { padding: 18px 18px 5px; }
  .course-top p { min-height: 0; font-size: 13px; line-height: 1.6; margin: 12px 0 0; }
  .course-meta { margin: 14px 0 9px; padding-top: 12px; }
  .course .sample-video { margin: 5px 14px 12px; }
  .course .sample-video summary, .course .sample-empty { padding: 12px; }
  details.program { padding: 0 18px; }
  .course-bottom { padding: 14px 18px 25px; }
  .steps { gap: 10px; }
  .step { padding: 17px 17px 23px; }
  .step h3 { margin: 12px 0 5px; }
  .step p { margin-bottom: 0; line-height: 1.6; }
  .graduate-empty { gap: 12px; padding: 18px 17px 25px; }
  .graduate-icon { width: 40px; height: 40px; font-size: 32px; padding-top: 9px; border-radius: 12px; }
  .graduate-empty h3 { font-size: 16px; line-height: 1.35; }
  .graduate-empty p { font-size: 13px; line-height: 1.55; }

  /* Yordam tugmasi asosiy matnlarni yopmasligi uchun kichikroq. */
  .rms-help { right: 10px; bottom: 10px; }
  .rms-help-toggle { min-height: 44px; gap: 6px; padding: 9px 12px; font-size: 12px; }
  .rms-help-toggle span:first-child { font-size: 16px; }
  .rms-help-toggle span:last-child { font-size: 0; }
  .rms-help-toggle span:last-child::after { content: 'Savol'; font-size: 12px; }
  .rms-help-panel { bottom: 54px; width: min(390px, calc(100vw - 20px)); height: min(560px, calc(100dvh - 78px)); min-height: 0; }
}

/* Bosh sahifa: logotipsiz, uchta tugma matn ostida ixcham joylashadi. */
.hero-inner { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.hero-inner > div:first-child { width: min(100%, 600px); }
.hero-slider, .hero-brand-intro { margin-inline: auto; }
.hero-actions { justify-content: center; gap: 8px; margin-top: 22px; }
.hero-actions .btn { min-height: 44px; padding: 10px 14px; gap: 6px; font-size: 12px; }
@media (max-width: 580px) {
  .hero-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .hero-actions .btn { min-width: 0; padding: 8px 4px; text-align: center; font-size: 11px; line-height: 1.25; }
}
