/* Shared layout and homepage */
:root{--page:#f8fbfe;--panel:#e0e8f2;--blue:#1d77b3;--ink:#155493}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--page);color:var(--ink);font-family:"Microsoft YaHei","微软雅黑",sans-serif;font-size:14px}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}button{font:inherit}img{display:block}h1,h2,p,ul{margin:0}h1,h2{font-size:inherit}a:focus-visible,button:focus-visible{outline:2px solid #155493;outline-offset:3px}.site-header{height:109px}.header-inner{max-width:1094px;height:100%;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:24px}.logo{width:702px;height:76px;object-fit:contain}.languages{flex-shrink:0}.main-nav{background:var(--blue);color:#fff;min-height:56px;border-bottom:1px solid #d9edf7}.nav-inner{min-height:55px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:0}.nav-inner a{line-height:19px;padding:0 13px;border-right:1px solid #fff}.nav-inner a:last-child{border:0}.secondary-nav{background:#2293dd;color:#fff;min-height:56px;border-bottom:1px solid #fff}.secondary-inner{max-width:1200px;min-height:55px;margin:auto;display:flex;justify-content:flex-end;align-items:center;gap:13px;padding-right:87px}.hero{position:relative;width:100%;aspect-ratio:4/1;overflow:hidden}.slides,.slide{position:absolute;inset:0;width:100%;height:100%}.slide{object-fit:cover;opacity:0;transition:opacity .65s ease}.slide.active{opacity:1}.content-viewport{width:100%;overflow-x:auto}.content{width:1200px;margin:9px auto 20px;position:relative;left:10px}
.about {
    height: 256px;
    padding: 32px 30px 24px;
    background: linear-gradient(90deg,var(--panel) 0%,var(--panel) 67%,transparent 87%),url('/static/tnsi_en/assets/about-building.png') right center /315px 256px no-repeat,var(--panel)
}.about h1{margin-bottom:17px}.about p{font-weight:600;line-height:25px;letter-spacing:.05px}.news-grid{display:grid;grid-template-columns:595px 595px;gap:10px}.section-heading{height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 41px 0 25px}.more{border:1px solid #3969a1;border-radius:4px;background:white;font-family:Arial,sans-serif;font-size:12px;font-weight:bold;padding:3px 10px;line-height:14px;white-space:nowrap}.news-list{list-style:none;height:256px;padding:21px 44px 17px 23px;background:var(--panel)}.news-list li{height:31px;border-bottom:1px solid #9ea6ae;line-height:30px;white-space:nowrap}.news-list li::before{content:'\25AA';color:#a2a3a5;padding:0 10px}.academic-grid{display:grid;grid-template-columns:700px 490px;gap:10px}.academic-grid .section-heading{height:59px;padding-left:30px;padding-right:39px}.academic-grid section:last-child .section-heading{padding-left:22px;padding-right:22px;gap:13px}
.institute-panel {
    height: 240px;
    background: linear-gradient(90deg,#e0e8f2d9,#e0e8f2 65%),url('/static/tnsi_en/assets/about-building.png') left center/360px 293px no-repeat;
    display: flex;
    gap: 12px;
    padding: 16px 10px 16px 23px
}.institute-panel p{line-height:28px;font-weight:600;flex:1;white-space:nowrap}.laboratories{width:260px;display:flex;flex-direction:column;gap:15px;flex-shrink:0}.laboratories a{height:40px;border-radius:25px;background:var(--blue);color:white;display:flex;align-items:center;justify-content:center}.academy-panel{height:240px;background:var(--blue);color:#fff;padding:17px 21px;line-height:25px}.academy-panel strong{font-weight:600}.academy-panel p{line-height:25px}.specialists-heading{height:62px;padding-left:14px;padding-right:22px}.specialist-grid{display:grid;grid-template-columns:290px 290px 288px 291px;gap:13px}.specialist-grid img{border-radius:12px}footer{background:var(--blue);color:#f3f7fb}.footer-inner{max-width:1200px;min-height:168px;margin:auto;display:flex;align-items:center;justify-content:space-between;gap:35px}.footer-inner img{align-self:center;max-width:100%;height:auto}address{font-style:normal;text-align:right;font-size:13px;line-height:28px}.copyright{min-height:52px;display:flex;align-items:center;justify-content:center;border-top:1px solid #ffffff16;color:#80b8d8;font-size:13px;text-align:center;padding:0 15px}@media(max-width:1240px){.content{margin-left:0;left:0}.header-inner,.footer-inner{padding-left:24px;padding-right:24px}.logo{width:min(60vw,702px);height:auto}.secondary-inner{padding:12px 24px;flex-wrap:wrap}.nav-inner{padding:12px;row-gap:12px}.site-header{height:auto;min-height:109px}.header-inner{min-height:109px}}@media(max-width:700px){.header-inner{gap:12px;flex-wrap:wrap;justify-content:center;padding:14px}.logo{width:min(92vw,702px)}.languages{width:164px;height:auto}.secondary-inner{justify-content:center;gap:10px}.footer-inner{padding:28px 20px;flex-direction:column;gap:20px}.footer-inner img{width:360px}address{text-align:center;font-size:12px}.copyright{height:auto;min-height:52px;font-size:11px}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.slide{transition:none}}


/* Header language switcher: two flag links side by side. */
.languages{display:flex;align-items:center;gap:10px;flex-shrink:0}

/* Keep the secondary navigation aligned with the Contact Us text edge. */
.secondary-inner{max-width:none;padding-right:var(--academic-right,24px);padding-left:24px;justify-content:flex-end}
/* Second-row (academic) menu: add the same white vertical-line separator between items as the main nav. */
.secondary-inner{gap:0}
.secondary-inner a{line-height:19px;padding:0 16px;border-right:1px solid #fff}
.secondary-inner a:last-child{border-right:0}
.academy-panel{display:block}
.about p>a,.institute-panel p>a{display:block}
.news-list li{position:relative;padding-left:26px}
.news-list li::before{position:absolute;left:0}
.news-list li>a{display:block}

/* All page bands share the fixed content area's 1200px minimum width. */
body{min-width:1200px}
.site-header,.main-nav,.secondary-nav,.hero,footer{min-width:1200px}
@media(max-width:1240px){
  .logo{width:702px;height:76px}
}
@media(max-width:700px){
  .header-inner{gap:24px;flex-wrap:nowrap;justify-content:space-between;padding:0 24px}
  .languages{width:205px;height:26px}
  .secondary-inner{gap:13px}
  .footer-inner{padding:0 24px;flex-direction:row;gap:35px}
  .footer-inner img{width:443px}
  address{text-align:right;font-size:13px}
  .copyright{min-height:52px;font-size:13px}
}

/* Banner behavior and dot styling matched to the TNSI reference. */
.slide{transition:opacity .8s ease-in-out}
.hero-dots{position:absolute;left:50%;bottom:15px;transform:translateX(-50%);display:flex;gap:10px;z-index:2}
.hero-dot{display:block;width:10px;height:10px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.5);cursor:pointer}
.hero-dot.active{background:#fff}
.hero-pause{position:absolute;left:12px;bottom:12px;opacity:0;pointer-events:none;border:1px solid white;border-radius:3px;background:#155493;color:white;padding:4px 8px}
.hero-pause:focus-visible{opacity:1;pointer-events:auto}
@media(prefers-reduced-motion:reduce){.slide{transition:none}}

.hero-dot:focus-visible,.hero-pause:focus-visible{outline:2px solid white;outline-offset:3px}

/* Inner page and sidebar.
   Height follows the content: there used to be a hard min-height:1485px here,
   which forced every inner page (inner.html / news.html / specialists.html) to
   the same 2242px document height and left ~1100-1400px of blank space between
   the content and the footer on short pages. */
.inner-layout{width:1200px;margin:9px auto 0;position:relative;left:10px;display:grid;grid-template-columns:350px 820px;gap:30px;align-items:start}
.sidebar{background:var(--blue);color:#e0eff9}
.sidebar h1{padding:17px 25px;display:flex;align-items:center;font-family:"Microsoft YaHei","微软雅黑",sans-serif;font-size:22px;font-weight:400;line-height:1.2;color:#fff;border-bottom:1px solid #dcebf5}
.side-menu,.submenu{list-style:none;padding:0;margin:0}
.side-menu a,.submenu-toggle{display:block;position:relative;width:100%;min-height:38px;padding:9px 25px 9px 47px;line-height:19px;border:0;border-bottom:1px solid #dcebf5;text-align:left;background:none;color:inherit;font:inherit;cursor:pointer}
.sidebar h1 a{padding:0;border:0;min-height:0}
.side-menu [aria-current="page"]::before{content:"";position:absolute;left:31px;top:14px;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:5px solid white}
.side-menu a:hover,.submenu-toggle:hover{background:#ffffff0c;text-decoration:none}
.submenu-toggle[aria-expanded="true"]{background:#ffffff12}
.submenu-toggle::after{content:"";position:absolute;right:26px;top:50%;width:7px;height:7px;border-right:2px solid #cfe4f5;border-bottom:2px solid #cfe4f5;transform:translateY(-70%) rotate(45deg);transition:transform .25s,border-color .25s}
.submenu-toggle:hover::after{border-color:#fff}
.submenu-toggle[aria-expanded="true"]::after{transform:translateY(-30%) rotate(225deg);border-color:#fff}
.submenu a{padding-left:65px;background:#176ba3}
.submenu [aria-current="page"]::before{left:48px}
.submenu[hidden]{display:none}
.breadcrumb{min-height:61px;display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:0 25px;border-bottom:1px solid #2293dd;font-size:12px}

/* The inner-page reference has a 47px copyright strip (grows if the text wraps). */
.inner-page .copyright{min-height:47px}
@media(max-width:1240px){.inner-layout{margin-left:0;left:0}}

/* News list and detail */
.article-list{list-style:none;margin:15px 10px 0 15px;padding:0}
/* min-height, not height: a row must be able to grow if a title ever wraps. */
.article-list li{min-height:41px;display:flex;align-items:center;gap:18px;border-bottom:1px solid #ccc;position:relative;padding:0 15px 0 27px}
.article-list li::before{content:'\B7';position:absolute;left:14px;color:#444}
.article-list a{display:block;min-width:0;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:40px}
.article-list time{flex:none;color:#999;white-space:nowrap}
.article-list li[hidden]{display:none}
.pagination{display:flex;justify-content:center;align-items:center;gap:6px;min-height:51px;margin-top:16px;font-size:12px;flex-wrap:wrap}
.pagination a{color:#0075ed;padding:3px 2px}
.pagination [aria-current]{color:#444;cursor:default}
.pagination .disabled{color:#888}
.detail-page{background:#f5f5f5;color:#111}
.detail-page .site-header{background:var(--page);height:113px;border-bottom:4px solid var(--blue)}
.detail-wrap{width:1200px;margin:30px auto;min-height:calc(100vh - 393px)}
.detail-card{background:white;border-radius:10px 10px 0 0;overflow:hidden}
.detail-card h1{font-size:18px;line-height:28px;text-align:center;padding:17px 20px;font-weight:700}
.detail-meta{height:43px;background:#eee;display:flex;align-items:center;justify-content:flex-end;padding:0 28px;font-size:12px;color:#555;white-space:pre-wrap}
.detail-body{padding:24px 20px 12px;font-size:14px;line-height:28px;overflow-wrap:anywhere}
.detail-body p{margin:0 0 15px}
.detail-body img{max-width:100%;height:auto;margin:0 auto}
.missing-copy{color:#888}

/* Change only the original inner page article region. */
.list-article{background:none;padding:0;color:#444}

/* Doctor / expert detail page — shares the news detail shell: identical header,
   breadcrumb and footer, and the same 1200px .detail-wrap box. The content in
   between is a hero banner plus pill-labelled sections, ported from the
   Template/tnsi/doctor_detail.html reference layout. */
.breadcrumb-nav{background:#fff;border-bottom:1px solid #d9edf7}
.breadcrumb-nav__inner{max-width:1200px;margin:auto;padding:12px 24px;font-size:12px;color:#555}
.breadcrumb-nav__inner a{color:var(--ink)}
.breadcrumb-nav__inner .breadcrumb-nav__current{color:#888}

/* Hero banner: same layered background pattern as the homepage .about block.
   The gradient must fade to transparent (it used to stay opaque to 100%, which
   hid the building image completely and left a flat colour block). min-height
   instead of height so a long post / schedule list is never clipped. */
.expert-hero{min-height:400px;display:flex;align-items:center;overflow:hidden;border-radius:10px 10px 0 0;background:linear-gradient(90deg,var(--panel) 0,var(--panel) 56%,transparent 86%),url('/static/tnsi_en/assets/about-building.png') right center/430px 400px no-repeat,var(--panel)}
.expert-hero__inner{width:100%;max-width:1200px;margin:0 auto;display:flex;align-items:center;gap:40px;padding:20px 40px}
.expert-hero__photo{flex:0 0 270px;width:270px;height:360px;object-fit:cover;object-position:top;background:#fff;border:1px solid #fff;box-shadow:0 6px 20px rgba(21,84,147,.18)}
.expert-hero__info{flex:1;min-width:0;overflow-wrap:anywhere}
.expert-hero__name{font-size:34px;font-weight:700;color:var(--blue);line-height:1.2}
.expert-hero__rank{font-size:16px;color:#555;margin-left:16px}
.expert-hero__subtitle{font-size:15px;color:#333;margin-top:16px;line-height:24px}
.expert-hero__schedule{display:inline-block;margin-top:24px;padding:10px 28px;background:#40a6e3;color:#fff;border-radius:20px;line-height:22px}
/* The online-consultation QR was dropped for the English site. Kept as a guard:
   any page rendered from an older template must not push a full-size image in. */
.expert-hero__qr{display:none}

.expert-block{margin-top:30px}
.expert-block:last-child{margin-bottom:0}
.expert-block__title{display:inline-block;padding:9px 30px;background:var(--panel);color:var(--ink);font-size:16px;font-weight:700;text-align:center;border-radius:999px;border:1px solid #c9d9e8}
.expert-block__body{margin-top:12px;border:1px solid #dbe6f0;border-radius:8px;padding:22px 30px;background:#fff}
/* Body copy matches .detail-body on the news detail page (14px / 28px). */
.expert-block__text{font-size:14px;color:#333;line-height:28px;text-align:justify;overflow-wrap:anywhere}
.expert-block__text p{margin:0 0 15px}
.expert-block__text p:last-child{margin-bottom:0}

/* ============================================================
   Our Specialists list page: reuses the inner/news shell
   (top.html + .inner-layout + .side-menu); right content =
   department intro (.dept-intro) + scrolling doctor carousel.
   ============================================================ */
.article-body {
    padding: 12px 17px 10px;
    color: #444;
    font-size: 14px;
    line-height: 28px;
    background: linear-gradient(to bottom,transparent 0,#f8fbfe 365px),linear-gradient(to right,#f8fbfe 10%,#f8fbfe70 90%),url('/static/tnsi_en/assets/about-building.png') right top /500px 406px no-repeat
}

    .article-body p {
        margin: 0
    }

    .article-body h2 {
        font-size: 20px;
        line-height: 32px;
        margin: 0 0 14px;
        color: var(--ink)
    }

.article-body .dept-intro p{margin:0 0 12px}
.article-body .dept-intro p:last-child{margin-bottom:0}
.article-body .doctor-stage{margin:15px 0 15px 0}


.article-body_doctor {
    padding: 12px 17px 10px;
    color: #444;
    font-size: 14px;
    line-height: 28px;
}

    .article-body_doctor p {
        margin: 0
    }

    .article-body_doctor h2 {
        font-size: 20px;
        line-height: 32px;
        margin: 0 0 14px;
        color: var(--ink)
    }

    .article-body_doctor .dept-intro p {
        margin: 0 0 12px
    }

        .article-body_doctor .dept-intro p:last-child {
            margin-bottom: 0
        }

    .article-body_doctor .doctor-stage {
        margin: 15px 0 15px 0
    }
/* ---------- scrolling doctor carousel ---------- */
.doctor-stage{display:flex;align-items:center}
.doctor-stage .arrow-left,.doctor-stage .arrow-right{display:flex;align-items:center;justify-content:center;margin:0 10px;cursor:pointer;flex-shrink:0}
.doctor-viewport{flex:1;overflow:hidden;position:relative;isolation:isolate}
.doctor-track{display:flex}
/* Carousel page wrapper only. It is created by specialists.js inside .doctor-track;
   scope it so it can never match a page-level class (that used to turn <body>
   into a flex row and scatter header / main / footer). */
.doctor-track > .doctor-page{display:flex;gap:20px;flex-shrink:0;justify-content:center;overflow:hidden}
.doctor-card{flex:0 0 160px;display:flex;flex-direction:column;text-align:center;transition:transform .2s,box-shadow .2s}
.doctor-card > a{display:flex;flex-direction:column;width:100%}
.doctor-card__img{display:block;width:160px;height:214px;flex-shrink:0;object-fit:cover;object-position:top}
.doctor-card--placeholder{flex:0 0 160px;visibility:hidden}
.doctor-card__label{flex:1 1 auto;padding:8px 4px 4px;background:#f0f6fc;display:flex;flex-direction:column;justify-content:center}
.doctor-card__name{display:block;font-size:15px;color:#333;text-decoration:none;transition:color .2s}
.doctor-card__name:hover{color:var(--blue)}
.doctor-card:hover{transform:translateY(-4px);box-shadow:0 8px 20px rgba(0,0,0,.15)}

/* ---------- fixed popup (doctor detail modal) ---------- */
.js-fixed-popup-mask{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:9999;display:flex;align-items:center;justify-content:center}
.js-fixed-popup{width:900px;max-width:92vw;height:80vh;background:#fff;border-radius:8px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 10px 40px rgba(0,0,0,.3)}
.js-fixed-popup-header{height:48px;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;flex-shrink:0}
.js-fixed-popup-title{font-size:16px;font-weight:700}
.js-fixed-popup-close{background:none;border:0;color:#fff;font-size:26px;cursor:pointer;line-height:1}
.js-fixed-popup-body{flex:1;padding:0;overflow:hidden}
.js-fixed-popup-iframe{width:100%;height:100%;border:0}
