/* Responsive additions. Load after common.css and the page stylesheet.
 * <=480px: confirmed mobile design; 481–767px: fluid single column;
 * >=768px: tablet grid; >=1024px: desktop navigation and editorial layouts.
 */
.desktop-links,
.desktop-cta {
  display: none;
}
.featured-card[hidden],
.article-card[hidden] {
  display: none;
}
.drawer:not(.open) {
  visibility: hidden;
}
.drawer.open {
  visibility: visible;
}
:where(a, button, [tabindex], input, select, textarea):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* 手机端横幅统一固定高度，避免后台换图后因图片宽高比不同导致布局错乱 */
.sub-hero {
  height: 50vh;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  background: var(--navy-deep);
}
.sub-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 481px) {
  :root {
    --content-width: 1200px;
    --gutter: max(var(--px), calc((100vw - var(--content-width)) / 2));
  }
  body {
    max-width: none;
  }
  .topbar,
  .nav,
  .drawer,
  .float-consult {
    max-width: none;
  }
  .topbar,
  .nav {
    padding-inline: var(--gutter);
  }
  .section-inner,
  .article-header-inner,
  .footer-grid {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--px);
  }
  .stats-grid {
    max-width: 1200px;
    margin-inline: auto;
  }
  .float-consult-inner {
    right: max(20px, calc((100vw - 1360px) / 2));
  }
  .breadcrumb {
    flex-wrap: wrap;
  }
  .footer-contact-item,
  .contact-info-value {
    overflow-wrap: anywhere;
  }
}

@media (min-width: 768px) {
  :root {
    --px: 32px;
    --section-py: 72px;
    --nav-h: 68px;
  }
  .nav-logo img {
    height: 42px;
  }
  .drawer-links,
  .drawer-cta {
    max-width: 600px;
    margin-inline: auto;
  }
  .section-title,
  .cta-title {
    font-size: 32px;
  }
  .section-sub {
    font-size: 16px;
  }
  .section-body,
  .about-body,
  .brand-body,
  .escort-body,
  .warmth-body,
  .pricing-body,
  .itinerary-body {
    font-size: 16px;
    line-height: 1.9;
  }
  /* Landscape hero, keeping the source artwork and a readable text layer. */
  .hero {
    height: auto;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: var(--navy-deep);
  }
  .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
  }
  .hero-overlay {
    inset: 0;
    height: 100%;
    background: linear-gradient(
      90deg,
      rgba(16, 32, 64, 0.97),
      rgba(16, 32, 64, 0.6) 55%,
      rgba(16, 32, 64, 0.12)
    );
  }
  .hero-content {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding: 72px var(--px);
  }
  .hero-title {
    font-size: 44px;
    line-height: 1.35;
  }
  .hero-sub {
    font-size: 17px;
    max-width: 390px;
  }
  .hero-btns {
    max-width: 390px;
  }
  .sub-hero {
    height: 380px;
    display: flex;
    align-items: flex-end;
    background: var(--navy-deep);
  }
  .sub-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
  }
  .sub-hero-overlay {
    inset: 0;
    height: 100%;
    background: linear-gradient(
      90deg,
      rgba(16, 32, 64, 0.92),
      rgba(16, 32, 64, 0.55) 55%,
      rgba(16, 32, 64, 0.22)
    );
  }
  .sub-hero-content {
    position: relative;
    max-width: 1280px;
    margin-inline: auto;
    padding: 48px var(--px);
  }
  .sub-hero-title {
    font-size: 40px;
  }
  .sub-hero-sub {
    max-width: 640px;
    font-size: 17px;
  }
  .page-lianxi-women .sub-hero,
  [class*="page-yisheng-"] .sub-hero {
    height: 280px;
  }
  /* Content grids: two columns for intermediate widths. */
  .service-cards,
  .case-cards,
  .audience-cards,
  .guide-cards,
  .subpage-cards,
  .phase-cards,
  .mgmt-cards,
  .doctors-list,
  .article-cards,
  .job-cards,
  .capability-cards,
  .list-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .service-cards > *,
  .case-cards > *,
  .article-cards > *,
  .doctors-list > *,
  .layout-split > *,
  .footer-grid > * {
    min-width: 0;
  }
  .article-card {
    flex-direction: column;
  }
  .article-card-img,
  .service-card-img,
  .case-card-img {
    width: 100%;
  }
  .article-card-img img,
  .service-card-img img,
  .case-card-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
  .doctor-card-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center 20%;
  }
  .stats-grid,
  .growth-grid,
  .promise-grid,
  .qual-grid,
  .partner-grid,
  .hospital-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-item {
    padding: 32px 16px;
  }
  .tab-bar {
    justify-content: center;
    flex-wrap: wrap;
  }
  .tab-btn {
    flex: 0 0 auto;
    min-width: 112px;
  }
  .cta-contact {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
  }
  .booking-btns,
  .consult-btns,
  .profile-btns,
  .action-btns {
    flex-direction: row;
    justify-content: center;
    max-width: 560px;
    margin-inline: auto;
  }
  .trust-band-items {
    flex-direction: row;
    justify-content: center;
    gap: 48px;
  }
  .trust-band > .btn-gold {
    display: inline-block;
    min-width: 240px;
    max-width: 360px;
    padding-inline: 40px;
  }
  .wechat-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    max-width: 900px;
    margin-inline: auto;
  }
  .wechat-text {
    text-align: left;
  }
  .video-wrap {
    max-width: 960px;
    margin-inline: auto;
  }
  .video-wrap > img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
  .doctor-entry-card {
    max-width: 960px;
    margin-inline: auto;
  }
  .doctor-entry-bg {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    object-position: center 30%;
  }
  .footer {
    padding-top: 56px;
  }
  .footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    padding-bottom: 32px;
  }
  .footer-divider {
    display: none;
  }
  .footer-brand,
  .footer-col {
    margin-bottom: 0;
  }
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    padding-inline: var(--gutter);
  }
  .article-header-inner {
    padding-block: 56px 36px;
  }
  .article-h1 {
    font-size: 36px;
    max-width: 900px;
  }
  .article-cover {
    max-width: 1200px;
    margin-inline: auto;
  }
  .article-cover img {
    width: 100%;
    height: 420px;
    object-fit: cover;
  }
  .article-layout {
    max-width: 1280px;
    margin-inline: auto;
  }
  .article-content {
    max-width: 800px;
    margin-inline: auto;
    font-size: 16px;
  }
  .contact-section > .section-inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
  }
  .contact-info-card,
  .form-card {
    min-width: 0;
    margin-bottom: 0;
  }
  .map-card {
    grid-column: 1 / -1;
    padding: 40px 24px;
  }
  .profile-layout {
    display: grid;
    grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.4fr);
    gap: 40px;
    align-items: start;
  }
  .portrait-wrap {
    max-width: 360px;
    margin: 0;
  }
  .profile-name {
    font-size: 36px;
  }
  .profile-btns {
    margin-inline: 0;
  }
}

@media (min-width: 1024px) {
  :root {
    --px: 40px;
    --section-py: 88px;
    --nav-h: 80px;
  }
  .nav {
    gap: 24px;
  }
  .nav-logo {
    flex-shrink: 0;
  }
  .nav-logo img {
    height: 48px;
  }
  .hamburger,
  .drawer {
    display: none;
  }
  .desktop-links {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1.1vw, 18px);
    margin-left: auto;
  }
  .desktop-links a {
    padding: 12px 8px;
    color: var(--muted);
    font-size: 15px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition:
      color 0.2s,
      border-color 0.2s;
  }
  .desktop-links a:hover,
  .desktop-links a.active {
    color: var(--gold-lt);
    border-bottom-color: var(--gold);
  }
  .desktop-cta {
    display: block;
    flex-shrink: 0;
    padding: 12px 24px;
    color: var(--navy-deep);
    background: var(--gold-grad);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
  }
  .hero {
    min-height: clamp(600px, 62vh, 860px);
  }
  .hero-bg {
    left: auto;
    width: 58%;
  }
  .hero-overlay {
    background: linear-gradient(
      90deg,
      #003670 0%,
      #003670 35%,
      rgba(16, 32, 64, 0.68) 53%,
      rgba(16, 32, 64, 0.04) 85%
    );
  }
  .hero-content {
    width: 42%;
    max-width: 42%;
    margin: 0 0 0 8%;
    padding-inline: clamp(24px, 3vw, 56px);
  }
  .hero-title {
    font-size: clamp(34px, 3.4vw, 50px);
  }
  .hero-sub {
    max-width: 460px;
    font-size: 18px;
  }
  .hero-btns {
    max-width: 430px;
    margin-top: 36px;
  }
  .sub-hero {
    height: 420px;
  }
  .sub-hero-title {
    font-size: 48px;
  }
  .sub-hero-content {
    padding-block: 56px;
  }
  .section-title,
  .cta-title {
    font-size: 36px;
  }
  .layout-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 64px;
  }
  .layout-split > :first-child {
    margin-bottom: 0;
  }
  .layout-split > :first-child img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
  .page-index .about-section .layout-split > :first-child {
    order: 2;
  }
  .layout-split .action-btns {
    margin-inline: 0;
  }
  .service-cards,
  .case-cards,
  .audience-cards,
  .guide-cards,
  .subpage-cards,
  .phase-cards,
  .mgmt-cards,
  .article-cards,
  .list-items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .page-index .service-cards,
  .doctors-list,
  .capability-cards,
  .job-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .time-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .process-timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }
  .process-timeline::before {
    left: 28px;
    right: 28px;
    top: 28px;
    bottom: auto;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), rgba(200, 151, 62, 0.2));
  }
  .process-step {
    flex-direction: column;
    gap: 12px;
    padding: 0;
  }
  .process-step-content {
    padding-top: 8px;
  }
  .process-step-title {
    font-size: 20px;
  }
  .featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
    margin-bottom: 32px;
  }
  .featured-img img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
  }
  .featured-body {
    padding: 36px;
    align-self: center;
  }
  .featured-title {
    font-size: 28px;
  }
  .page-detail-template .article-body-section .article-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.5fr) minmax(260px, 1fr);
    gap: 56px;
    padding-inline: var(--px);
    align-items: start;
  }
  .page-detail-template .article-layout .related-section {
    margin-top: 0;
    padding: 24px;
    border: 1px solid var(--gold-line);
    border-radius: var(--card-r);
    background: var(--card-bg);
  }
  .profile-layout {
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 80px;
    max-width: 1120px;
  }
  .contact-info-card,
  .form-card {
    padding: 36px;
  }
  .footer-grid {
    grid-template-columns: 1.2fr 0.7fr 0.7fr 1.4fr;
    gap: 40px;
    padding-bottom: 48px;
  }
  .footer-col-title {
    font-size: 13px;
  }
  .footer-brand-logo {
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .drawer {
    transition: none;
  }
}
