/* Shared navigation breakpoints for home, list, and article templates. */
.navbar .logo { display: flex; flex-direction: row; align-items: center; gap: 9px; flex-shrink: 0; }
.navbar .logo-mark { display: block; width: 57px; height: 48px; background-repeat: no-repeat; background-size: 244px 48px; background-position: left center; }
.navbar .logo-wording { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 190px; height: 48px; }
.navbar .logo-chinese { display: block; height: 26px; width: 100%; background-repeat: no-repeat; background-size: 260px 51px; background-position: right -17px; filter: grayscale(1); }
.navbar .logo-english { display: block; width: 100%; color: #666; font-family: Arial,sans-serif; font-size: 9px; font-weight: 500; letter-spacing: 1.15px; line-height: 1; white-space: nowrap; text-align: center; }
@media (max-width: 480px) {
  .navbar .logo { gap: 8px; }
  .navbar .logo-mark { width: 52px; height: 44px; background-size: 224px 44px; }
  .navbar .logo-wording { width: 174px; height: 44px; gap: 5px; }
  .navbar .logo-chinese { height: 24px; background-size: 238px 46.5px; background-position: right -16px; }
  .navbar .logo-english { font-size: 8.5px; letter-spacing: .95px; }
}
@media (max-width: 768px) {
  footer { padding-top: 32px; }
  footer .footer-content { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 18px; margin-bottom: 24px; }
  footer .footer-col { min-width: 0; }
  footer .footer-col h3 { font-size: 17px; margin-bottom: 14px; }
  footer .footer-col li { margin-bottom: 8px; }
  footer .footer-col a { font-size: 14px; }
}
@media (min-width: 1200px) {
  .navbar .nav-menu { display: flex; align-items: center; }
  .navbar .nav-menu li { margin-left: 12px; flex-shrink: 0; }
  .navbar .nav-menu a { white-space: nowrap; font-size: 14px; }
  .navbar .mobile-menu-btn { display: none; }
}
@media (max-width: 1199px) {
  .navbar .nav-menu {
    position: fixed; top: 80px; left: -100%; width: 100%; height: auto;
    max-height: calc(100vh - 80px); overflow-y: auto; z-index: 1000;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start; align-items: stretch; gap: 10px;
    padding: 16px 20px 20px; background: rgba(23,27,36,.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 5px 10px rgba(0,0,0,.18); transition: left .3s ease;
  }
  .navbar .nav-menu.active { left: 0; }
  .navbar .nav-menu li { margin: 0; min-width: 0; }
  .navbar .nav-menu a {
    display: flex; align-items: center; justify-content: center; min-height: 52px;
    padding: 8px; text-align: center; white-space: normal; font-size: 16px;
    color: #fff; background: #292f3a; border-radius: 6px;
  }
  .navbar .nav-menu a:hover { color: #fff; background: #c9141e; }
  .navbar .nav-menu .contact-btn { color: #fff; background: #c9141e; }
  .navbar .mobile-menu-btn { display: block; flex-shrink: 0; }
}

/* Keep direct section links below the fixed navigation bar. */
#introduction, #courses, #teachers, #campus, #news, #contact-info { scroll-margin-top: 90px; }

/* Compact desktop consultation tools, shared by home, lists and articles. */
.floating-back-top { display: none; }
@media (min-width: 993px) {
    body .floating-consult, body .inner-floating-consult {
        display: flex; flex-direction: column; align-items: center; justify-content: center;
        width: 56px; height: 56px; padding: 0; gap: 4px; right: 20px; bottom: 96px;
        border: 0; border-radius: 50%; background: #c91020; color: #fff;
        box-shadow: 0 4px 14px rgba(87, 13, 21, .18); font-size: 12px; line-height: 1;
    }
    .floating-consult svg, .inner-floating-consult svg { width: 22px; height: 22px; }
    .floating-back-top {
        display: grid; place-items: center; position: fixed; width: 48px; height: 48px;
        right: 24px; bottom: 28px; z-index: 1200; padding: 0; border: 1px solid #d6b5b7;
        border-radius: 50%; color: #fff; background: #efd0d2;
        box-shadow: 0 3px 10px rgba(0,0,0,.12); cursor: pointer;
    }
    .floating-back-top svg { width: 27px; height: 27px; }
    .floating-back-top:hover { background: #dfafb3; }
    .floating-back-top:focus-visible, .floating-consult:focus-visible, .inner-floating-consult:focus-visible { outline: 2px solid #c91020; outline-offset: 4px; }
}

/* Consultation dialogs: four fields arranged in two compact rows. */
body #contact .container, body .inner-consult-dialog-panel { max-width: 560px; width: 100%; padding: 20px; }
body #contact .section-title { margin-bottom: 16px; }
body #contact .section-title h2 { font-size: 26px; margin-bottom: 10px; }
body #contact .section-title h2::after { margin-top: 8px; }
body #contact .section-title p, body .inner-consult-dialog-panel > p { margin: 0 0 14px; font-size: 14px; }
body .inner-consult-dialog-panel > h2 { font-size: 26px; margin-bottom: 8px; }
body #contact form, body .inner-consult-dialog .inner-consult-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; }
body #contact .form-group, body .inner-consult-dialog .popup-field { margin: 0; min-width: 0; }
body #contact .form-group label, body .inner-consult-dialog .popup-field label { margin: 0 0 6px; font-size: 14px; line-height: 20px; }
body #contact .form-group input, body #contact .form-group select, body .inner-consult-dialog .popup-field input, body .inner-consult-dialog .popup-field select { height: 40px; padding: 0 10px; font-size: 14px; min-width: 0; box-sizing: border-box; }
body #contact form > .btn, body .inner-consult-dialog .inner-consult-form > .btn { grid-column: 1 / -1; width: 100%; height: 40px; padding: 0 12px; margin: 2px 0 0; font-size: 15px; }
body #contact .consult-inline-status, body .inner-consult-dialog .consult-inline-status { grid-column: 1 / -1; }
@media (max-width: 480px) {
    body #contact .container, body .inner-consult-dialog-panel { padding: 20px 16px 16px; }
    body #contact form, body .inner-consult-dialog .inner-consult-form { column-gap: 10px; }
    body #contact .section-title h2, body .inner-consult-dialog-panel > h2 { font-size: 24px; }
}

/* Compact sidebar form, keeping consultation available beside article content. */
body .inner-consult-card { padding: 16px; }
body .inner-consult-card h3 { font-size: 20px; margin-bottom: 6px; }
body .inner-consult-card p { font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
body .inner-consult-card .inner-consult-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
body .sidebar-consult-field { min-width: 0; }
body .sidebar-consult-field label { margin: 0 0 4px; font-size: 13px; line-height: 20px; }
body .sidebar-consult-field input, body .sidebar-consult-field select { height: 36px; padding: 0 6px; font-size: 12px; }
body .inner-consult-card .inner-consult-form > .btn { grid-column: 1 / -1; height: 36px; padding: 0 10px; margin: 2px 0 0; font-size: 14px; }
body .inner-consult-card .consult-inline-status { grid-column: 1 / -1; }
