/* Medical Book — responsive page shell.
   Loaded after the legacy style.css. The legacy mobile rules were written for pages without a
   viewport meta tag (huge rem sizes under max-device-width: 800px); this file neutralises them
   and gives the shell a fluid layout from phones to very large screens. */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html body { line-height: 1.5; background: #eef2f7; }

html body #container {
  box-sizing: border-box;
  width: auto !important;
  max-width: 1280px;
  margin: 16px auto;
  padding: 20px clamp(12px, 3vw, 32px);
  border-radius: 12px;
}
html body .view { margin-top: 0; }
html body .content_text,
html body .text_article { width: 100% !important; font-size: inherit; }
html body .text_article {
  max-width: 72rem;
  margin: 0 auto 1rem;
  padding: 0 clamp(0.75rem, 3vw, 2rem);
  box-sizing: border-box;
  color: #5b6676;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
}
html body .titl h1 {
  width: auto !important;
  max-width: 72rem;
  margin: 0.5rem auto 0.75rem;
  padding: 0 clamp(0.75rem, 3vw, 2rem);
  box-sizing: border-box;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.6rem);
  line-height: 1.2;
  color: #1b2430;
}
html body .backcategory {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(0.75rem, 3vw, 2rem);
  box-sizing: border-box;
  font-size: 0.95rem;
}
html body .pubDate {
  max-width: 72rem;
  margin: 1rem auto 0;
  padding: 0 clamp(0.75rem, 3vw, 2rem);
  box-sizing: border-box;
  color: #5b6676;
  font-size: 0.85rem;
}

@media (min-width: 1600px) {
  html body #container { max-width: 1480px; }
}

/* Phones and small tablets: compact fixed top bar with the hamburger menu. */
@media (max-width: 800px), (max-device-width: 800px) {
  html body { line-height: 1.5; }
  html body #container { margin: 0; padding: 72px 0 24px; border-radius: 0; }
  html body .modif { display: none; }
  html body .view { margin-top: 0; }
  html body .content_text, html body .text_article { font-size: inherit; }
  html body .text_article { font-size: 1.02rem; }
  html body .titl { font-size: inherit; }
  html body .backcategory { font-size: 0.9rem; }

  html body #right_menu {
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    height: 56px;
    margin: 0;
    padding: 0 12px 0 64px;
    box-sizing: border-box;
    background: #10233a;
    color: #fff;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  html body #right_menu .name { position: static; margin: 0; font-size: 1rem; flex: 1; }
  html body #right_menu .name h1 { margin: 0; font-size: 1.05rem; line-height: 56px; color: #fff; white-space: nowrap; }
  html body #right_menu .dropdown { position: relative; margin: 0; font-size: 0.9rem; }
  html body #right_menu .dropdown .eng { padding: 6px 10px; border: 1px solid rgba(255,255,255,0.4); border-radius: 8px; color: #fff; }
  html body #right_menu .dropdown-content { right: 0; left: auto; margin: 6px 0 0; width: 9rem; }
  html body #right_menu .dropdown-content a { padding: 10px 14px; font-size: 0.95rem; line-height: 1.3; }

  html body #menuToggle { position: absolute; top: 16px; left: 16px; z-index: 60; }
  html body #menuToggle input { width: 40px; height: 32px; top: -6px; left: -6px; }
  html body #menuToggle span { width: 26px; height: 3px; margin-bottom: 5px; background: #fff; border-radius: 2px; }
  html body #menuToggle input:checked ~ span { background: #1b2430; }
  html body #menu {
    width: min(85vw, 20rem);
    height: 100vh;
    margin: -16px 0 0 -16px;
    padding: 64px 20px 20px;
    box-sizing: border-box;
    overflow-y: auto;
  }
  html body #menu li { padding: 10px 0; margin-left: 0; font-size: 1.05rem; line-height: 1.4; }
  html body #menu li ul { padding-left: 1rem; }
  html body #menu .search1 { position: static; margin: 12px 0 0; font-size: 1rem; }
  html body #menu .search1 input { width: 100%; font-size: 1rem; padding: 6px 8px; box-sizing: border-box; }

  html body .mb-table td, html body .mb-table th { padding: 0.55rem 0.7rem; text-align: left; }
}
