/* ==========================================================================
レスポンシブ用の上書き
Ghi đè responsive

ブレークポイント：
Các breakpoint:
- 1100px：コンパクトPC・横向きタブレット
  Desktop gọn và tablet ngang
- 900px：タブレット・モバイルナビゲーション
  Tablet và điều hướng mobile
- 700px：モバイルレイアウト
  Bố cục mobile
- 390px：小型モバイル向け調整
  Tinh chỉnh mobile nhỏ
========================================================================== */
/* コンパクトPC・横向きタブレット
   Desktop gọn và tablet ngang */
@media(max-width:1100px) {
  .main-nav {
    gap: 10px;
  }

  .nav-support {
    min-width: 112px;
  }

  .profile-page-grid {
    grid-template-columns: 300px 1fr;
    gap: 50px;
  }

  .supporter-layout,
  .contact-grid {
    gap: 55px;
  }

}

@media (min-width: 901px) and (max-width: 1100px) {
  .site-header > .container {
    gap: 16px;
  }

  .main-nav li > a {
    padding-inline: 6px;
  }

  .main-nav li > a span {
    font-size: 11px;
    letter-spacing: .08em;
  }

  .main-nav li > a::after {
    left: 6px;
    right: 6px;
  }
}

/* タブレット：PCナビゲーションをオフキャンバスメニューに切り替え
   Tablet: chuyển điều hướng desktop sang menu off-canvas */
@media(max-width:900px) {
  .home-page .hero {
    padding-top: 72px;
  }
  .container {
    width: min(100% - 40px, var(--container));
  }

  .site-header,
  .site-header--home {
    height: 72px;
  }

  .brand-logo {
    width: 42px;
    height: 48px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .header-name-logo {
    width: 155px;
  }

  .header-office-title {
    font-size: 8px;
    margin-left: 3px;
  }

  .main-nav {
    position: fixed;
    right: 0;
    top: 0;
    width: min(84vw, 390px);
    height: 100dvh;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 100px 34px 34px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(105%);
    transition: transform .35s, opacity .35s, visibility .35s;
    z-index: 102;
  }

  .site-header--home:not(.is-scrolled) .main-nav {
    transform: translateX(105%);
  }

  .main-nav.is-open,
  .site-header--home:not(.is-scrolled) .main-nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav ul {
    height: auto;
    display: block;
  }

  .main-nav li {
    display: block;
  }

  .main-nav li>a {
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
  }

  .main-nav li>a:after {
    display: none;
  }

  .main-nav li>a span {
    font-size: 20px;
  }

  .nav-support {
    align-self: auto;
    min-height: 68px;
    margin-top: 24px;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 103;
    transition: opacity .35s, transform .35s, visibility .35s;
  }

  .site-header--home:not(.is-scrolled) .hamburger {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
  }

  .hamburger span {
    width: 28px;
    height: 2px;
    background: var(--blue);
    transition: .3s;
  }

  .hamburger.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.is-open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(5, 30, 64, .55);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 101;
  }

  .nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
  }

  .hero {
    height: auto;
    min-height: 0;
  }

  .section {
    padding: 90px 0;
  }

  .message-section {
    padding: 110px 0;
  }

  .editorial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .editorial-card:last-child {
    grid-column: 1/-1;
    max-width: 50%;
    border-top: 1px solid #9aacca;
    border-right: 1px solid #9aacca;
    padding-top: 28px;
  }

  .activity-row {
    height: 75svh;
    min-height: 420px;
  }

  .activity-content {
    grid-template-columns: 56px minmax(0, 1fr) 120px;
  }

  .supporter-panel {
    padding-inline: 40px;
  }

  .social-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-page-grid {
    grid-template-columns: 260px 1fr;
    gap: 38px;
  }

  .policy-detail {
    grid-template-columns: 220px 1fr;
  }

  .policies-hero {
    min-height: 470px;
  }

  .policy-story__inner {
    padding-bottom: 90px;
  }

  .news-hero {
    min-height: 470px;
  }

  .news-blog-card {
    padding-inline: 20px;
  }

  .footer-grid {
    gap: 40px;
  }

}

/* モバイル：グリッドを縦積みにし、文字と余白を縮小
   Mobile: xếp chồng grid, giảm cỡ chữ và khoảng cách */
@media(max-width:700px) {
  .container {
    width: calc(100% - 32px);
  }

  .brand-logo {
    width: 37px;
    height: 43px;
    margin-right: 8px;
  }

  .brand-text small {
    font-size: 7px;
  }

  .brand-text strong {
    font-size: 15px;
  }

  .header-name-logo {
    width: 142px;
  }

  .header-name-block {
    gap: 3px;
    margin-left: 7px;
  }

  .header-office-title {
    font-size: 7px;
    margin-left: 2px;
  }

  .brand-text em {
    font-size: 8px;
  }

  .hero {
    height: auto;
    min-height: 0;
    padding-top: 72px;
    background: #dff3fb;
  }

  .hero-image {
    height: auto;
    min-height: 0;
    object-fit: contain;
    animation: none;
    transform: none;
    transition: none;
  }

  .hero-scroll {
    display: none;
  }

  .hero-name-logo {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 10px;
    z-index: 2;
    width: min(82%, 480px);
    transform: translateX(-50%);
    animation: heroLogoReveal .8s cubic-bezier(.22, 1, .36, 1) .25s both;
  }

  .hero-name-logo img {
    width: 100%;
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-name-logo {
      animation: none;
    }
  }

  .section {
    padding: 72px 0;
  }

  .section-en {
    font-size: 42px;
  }

  .section-heading {
    margin-bottom: 40px;
  }

  .message-section {
    padding: 86px 0;
  }

  .message-section:before {
    display: none;
  }

  .message-copy {
    font-size: 13px;
    line-height: 2.1;
  }

  .message-copy p {
    margin-bottom: 22px;
  }

  .message-copy .message-lead {
    font-size: 21px;
    margin-bottom: 34px;
  }

  .mobile-only {
    display: block;
  }

  .editorial-grid {
    grid-template-columns: 1fr;
    border-right: 1px solid #9aacca;
  }

  .editorial-card,
  .editorial-card:last-child {
    grid-column: auto;
    max-width: none;
    padding: 0 20px 34px;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid #9aacca;
  }

  .editorial-card + .editorial-card {
    padding-top: 30px;
  }

  .editorial-card:last-child {
    border-bottom: 0;
  }

  .editorial-card h3 {
    font-size: 17px;
  }

  .news-cover-title {
    font-size: clamp(17px, 5vw, 22px);
  }

  .blog-section .line-button {
    min-width: 100%;
    padding-inline: 24px;
  }

  .activities-section {
    padding-top: 0;
  }

  .activities-heading {
    min-height: 140px;
    display: flex;
    padding-block: 30px;
  }

  .activity-row {
    height: auto;
    min-height: 0;
    padding-top: 47.92vw;
    background-color: #fff;
    background-position: center top;
    background-size: 100% auto;
    background-repeat: no-repeat;
  }

  .activity-content {
    width: 100%;
    min-height: 154px;
    margin: 0;
    grid-template-columns: 48px minmax(0, 1fr) 104px;
    grid-template-rows: 54px minmax(100px, auto);
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    background: linear-gradient(to bottom, var(--blue-deep) 0 54px, #fff 54px 100%);
    box-shadow: none;
  }

  .activity-row:nth-child(even) .activity-content {
    right: auto;
    left: auto;
    margin: 0;
  }

  .activity-content h3 {
    font-size: 14px;
  }

  .activity-content p {
    font-size: 12px;
    padding: 17px 16px;
  }

  .supporter-heading {
    margin-bottom: 48px;
  }

  .supporter-copy {
    font-size: 14px;
    line-height: 2;
    margin-bottom: 42px;
  }

  .supporter-panel {
    padding: 30px 18px 38px;
  }

  .supporter-panel h3 {
    margin-bottom: 28px;
  }

  .social-list {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .primary-button,
  .line-button {
    min-width: 100%;
  }

  .social-link {
    min-height: 78px;
    grid-template-columns: 58px 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-nav {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    display: block;
  }

  .footer-bottom > span {
    display: block;
    margin-bottom: 4px;
  }

  .footer-policy-links {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .page-header {
    padding: 68px 0 58px;
  }

  .page-header h1 {
    font-size: 29px;
  }

  .profile-page-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .photo-box {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
    max-height: 440px;
  }

  .photo-box:before {
    font-size: 60px;
  }

  .profile-visual .badge-term {
    display: flex;
    width: 100%;
    min-height: 58px;
    margin-top: 12px;
    padding: 8px 2px;
  }

  .profile-name {
    font-size: 22px;
    line-height: 1.55;
    margin-bottom: 14px;
  }

  .profile-history-title {
    margin-top: 34px;
    font-size: 20px;
  }

  .policy-detail {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 32px 0;
  }

  .policies-hero {
    min-height: 390px;
  }

  .policies-hero__overlay p {
    font-size: 42px;
  }

  .policies-hero__overlay h1 {
    font-size: 14px;
    margin-top: 10px;
  }

  .policies-intro {
    padding: 68px 20px 62px;
  }

  .policies-intro__en {
    font-size: 17px;
  }

  .policies-intro h2 {
    font-size: 23px;
    line-height: 1.6;
  }

  .policy-story__visual {
    height: 66vw;
    min-height: 250px;
  }

  .policy-story__inner {
    width: 100%;
    padding: 64px 24px 76px;
  }

  .policy-story__title {
    min-width: calc(100% - 24px);
    min-height: 78px;
    gap: 18px;
    padding: 15px 22px;
    font-size: 20px;
  }

  .policy-story__title span {
    font-size: 34px;
  }

  .policy-story__inner > p {
    font-size: 14px;
    line-height: 2;
  }

  .news-hero {
    min-height: 390px;
  }

  .news-hero__overlay p {
    font-size: 42px;
  }

  .news-hero__overlay h1 {
    font-size: 14px;
    margin-top: 10px;
  }

  .news-section-heading {
    margin-bottom: 42px;
  }

  .news-section-heading h2 {
    font-size: 24px;
  }

  .news-blog-grid {
    grid-template-columns: 1fr;
    border-left: 0;
  }

  .news-blog-card {
    border-right: 0;
    border-bottom: 1px solid #b8c7d7;
    padding: 0 0 48px;
    margin-bottom: 44px;
  }

  .news-blog-card:last-child {
    margin-bottom: 0;
  }

  .news-blog-cover strong {
    font-size: 24px;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-list-full .card-news {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .article-nav {
    gap: 10px;
    flex-direction: column;
  }

  .article-nav .btn {
    width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .support-form,
  .contact-info-card {
    padding: 25px;
  }

  .profile-facts li {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 15px 0;
    font-size: 13px;
    line-height: 1.75;
  }

  .profile-facts .v {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .profile-timeline {
    padding-left: 24px;
  }

  .profile-timeline li {
    padding-bottom: 26px;
    font-size: 13px;
    line-height: 1.8;
  }

  .profile-timeline li:before {
    left: -29px;
  }

  .profile-timeline .year {
    display: block;
    margin: 0 0 3px;
  }

  .profile-page-body .section--alt {
    padding-top: 68px;
    padding-bottom: 72px;
  }

  .profile-page-body .section-title {
    margin-bottom: 34px;
  }

  .profile-page-body .section-title h2 {
    font-size: 21px;
    line-height: 1.55;
  }

  .profile-message {
    text-align: left;
  }

  .profile-message__lead,
  .profile-message__body {
    font-size: 14px;
    line-height: 2;
  }

  .profile-message__lead {
    text-align: left;
  }

  .profile-message__title {
    margin: 42px 0 20px;
    font-size: 21px;
    line-height: 1.6;
  }

  .profile-message__body p + p {
    margin-top: 24px;
  }

  .section-title h2 {
    font-size: 24px;
  }

}

/* 小型モバイル向け調整
   Tinh chỉnh cho mobile nhỏ */
@media(max-width:390px) {
  .brand-text em {
    display: none;
  }

  .hero {
    padding-top: 72px;
  }

  .section-en {
    font-size: 36px;
  }

  .activity-content {
    align-items: center;
  }

  .footer-nav {
    grid-template-columns: 1fr;
  }

  .support-tiers {
    display: grid;
  }

  .support-tiers label {
    text-align: center;
  }

}

/* モバイル版の市政報告アーカイブ
   Kho báo cáo thành phố trên mobile */
@media(max-width:700px) {
  .archive-intro {
    margin-bottom: 36px;
  }

  .archive-intro h2 {
    font-size: 25px;
  }

  .archive-year summary {
    grid-template-columns: 78px 1fr auto;
    min-height: 78px;
  }

  .archive-year summary span {
    font-size: 23px;
  }

  .archive-year summary b {
    font-size: 13px;
  }

  .archive-year summary i {
    font-size: 0;
    padding-right: 24px;
  }

  .archive-links {
    padding: 0 16px;
  }

  .archive-links a {
    grid-template-columns: 78px 1fr auto;
    min-height: 62px;
    gap: 8px;
  }

  .archive-links span {
    font-size: 12px;
  }

  .archive-links i {
    font-size: 9px;
  }

}
