@charset "UTF-8";

/* ==================================================
   CSS Variables & Reset
================================================== */
:root {
    --primary-color: #00388D;
    --bg-color: #FFFFFF;
    --text-main: #333333;
    --text-light: #555555;
    --font-mincho: "Zen Old Mincho", serif;
    --font-gothic: "IBM Plex Sans JP", sans-serif;
}

.sp-only {
    display: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-gothic);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.8;
    overflow-x: hidden;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* ==================================================
   Header & Navigation
================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    background-color: #FFFFFF;
    pointer-events: none;
}

.header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
}

.header-spacer {
    flex-grow: 1;
}

.logo-link {
    position: fixed;
    top: 50px;
    left: 70px;
    height: 100px;
    display: flex;
    align-items: center;
    width: 246px;
    z-index: 1002;
}

.logo-blue {
    width: 100%;
    display: block;
}



/* Hamburger Menu */
.hamburger {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 50px;
    height: 50px;
    z-index: 1001;
    padding: 10px;
    transform: translateY(5px);
    pointer-events: auto;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

/* スクロール後はハンバーガーをブルーに */
.header.is-scrolled .hamburger span {
    background-color: var(--primary-color);
}

.hamburger.menu-open span { background-color: var(--primary-color) !important; }

.hamburger.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Global Nav Overlay */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #FFFFFF;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    pointer-events: auto;
}

.global-nav.is-active {
    opacity: 1;
    visibility: visible;
}

.nav-list {
    list-style: none;
    text-align: center;
}

.nav-list li {
    margin-bottom: 35px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

.global-nav.is-active .nav-list li {
    transform: translateY(0);
    opacity: 1;
}
.global-nav.is-active .nav-list li:nth-child(1) { transition-delay: 0.1s; }
.global-nav.is-active .nav-list li:nth-child(2) { transition-delay: 0.15s; }
.global-nav.is-active .nav-list li:nth-child(3) { transition-delay: 0.2s; }
.global-nav.is-active .nav-list li:nth-child(4) { transition-delay: 0.25s; }
.global-nav.is-active .nav-list li:nth-child(5) { transition-delay: 0.3s; }
.global-nav.is-active .nav-list li:nth-child(6) { transition-delay: 0.35s; }
.global-nav.is-active .nav-list li:nth-child(7) { transition-delay: 0.4s; }

.nav-list a {
    text-decoration: none;
    font-size: 1.2rem;
    font-family: var(--font-gothic);
    color: var(--primary-color);
    font-weight: 500;
    letter-spacing: 0.15em;
    transition: opacity 0.3s;
}
.nav-list a:hover { opacity: 0.5; }

/* ==================================================
   Scroll Indicator
================================================== */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    z-index: 20;
}

.scroll-text {
    font-family: var(--font-mincho);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 200;
    animation: textBlink 3s infinite ease-in-out;
}

.scroll-line {
    width: 1px;
    height: 120px;
    position: relative;
}

.scroll-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    animation: dotBounce 6s infinite ease-in-out;
}

.scroll-white .scroll-text { color: var(--bg-color); }
.scroll-white .scroll-line { background-color: var(--bg-color); }
.scroll-white .scroll-dot { background-color: var(--bg-color); }

.scroll-blue .scroll-text { color: var(--primary-color); }
.scroll-blue .scroll-line { background-color: var(--primary-color); }
.scroll-blue .scroll-dot { background-color: var(--primary-color); }

@keyframes textBlink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@keyframes dotBounce { 0% { top: 0; } 50% { top: calc(100% - 7px); } 100% { top: 0; } }

/* ==================================================
   Footer
================================================== */
.footer {
    position: relative;
    background-color: transparent;
    padding: 0 0 80px;
    z-index: 5;
    overflow: visible !important;
}

.footer-line {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 1px;
    background-color: #e0e0e0;
    margin-bottom: 100px !important;
}

.container {
    max-width: 1184px;
    margin: 0 auto;
    padding: 0 20px;
}

#footer-canvas {
    /* Ensure net animation stays behind content */
    position: absolute;
    top: -500px;
    left: 0;
    width: 100%;
    height: calc(100% + 500px);
    z-index: 0;
    pointer-events: none;
    display: block;
}

.footer-content {
    position: relative;
    z-index: 2;
    max-width: 1184px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.footer-logo-wrap {
    margin-bottom: 45px;
}

.footer-logo {
    height: 100px;
    width: auto !important;
}

.footer-info {
    font-family: var(--font-gothic);
    font-size: 0.85rem;
    color: #666;
    line-height: 2.2;
    margin-bottom: 60px;
}

.footer-copyright {
    font-family: var(--font-mincho);
    font-size: 0.7rem;
    color: #aaaaaa;
    letter-spacing: 0.05em;
}

.footer-right {
    margin-top: 0;
}

.univ-logo-box {
    border: 1px solid #eeeeee;
    background-color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-univ-logo {
    height: 77px;
    width: auto !important;
}

/* ==================================================
   Animations Common
================================================== */
.fade-in-target,
.fade-in-blur,
.fade-in-right,
.fade-in-left {
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-target {
    transform: translateY(40px);
}

.fade-in-right {
    transform: translateX(80px);
}

.fade-in-left {
    transform: translateX(-80px);
}

.fade-in-target.is-visible,
.fade-in-right.is-visible,
.fade-in-left.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* 滲み出るアニメーション */
.fade-in-blur {
    filter: blur(15px);
    transform: translateY(10px);
    transition: opacity 1.8s ease-out, filter 1.8s ease-out, transform 1.8s ease-out;
}

.fade-in-blur.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }
.delay-4 { transition-delay: 0.6s; }

/* ==================================================
   Section 1 (FV)
================================================== */
.section1 {
    position: relative;
    width: 100%;
    height: 900px;
    background-color: transparent; /* 背景アニメーションを見せるため */
}

.s1-network {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1800px;
    z-index: 0;
    pointer-events: none;
}

.fv-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1920px;
    height: 100%;
    margin: 0 auto;
}

/* FV テキスト */
.fv-text-wrapper {
    position: absolute;
    top: 18%;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
}

.fv-main-copy {
    position: absolute;
    top: 0;
    left: 12%;
    font-family: var(--font-mincho);
    color: var(--primary-color);
    font-size: 54px;
    line-height: 1.55; /* 修正 */
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.1em; /* 文字間を少し広げる */
    text-indent: -0.5em; /* 括弧の飛び出しを調整して左端を揃える */
}

.kern-tight {
    letter-spacing: -0.3em; /* 記号周辺の余白を詰める */
}

.inline-wrap {
    display: inline-block;
}

.fv-sub-copy {
    position: absolute;
    top: 5%; /* 修正：少し上げる（元7%） */
    right: 12%;
    max-width: 45vw; /* 追加：左側のメインコピーと被る前に自然改行させる */
    font-family: var(--font-gothic);
    color: #333;
    font-size: 16px;
    line-height: 2.4;
    text-align: right;
    margin: 0;
}

/* FV 建物の画像 */
.fv-building {
    position: absolute;
    top: 46%; /* 修正：少し下げる */
    left: 0;
    right: 0;
    margin: 0 auto; /* 修正：中央へ（見切れ防止のためtransformからmargin autoに変更） */
    width: 90%;
    max-width: 1500px;
    z-index: 10;
}

.fv-building img {
    width: 100%;
    height: auto;
    display: block;
}

/* MVV リンクボタン（吹き出し型） */
.mvv-links-container {
    position: absolute;
    top: 48%; /* 少し下にずらす */
    right: 14%; /* 修正：さらに右（外側）へ */
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: auto; /* ラッパーのnoneを上書き */
}

.blob-mvv {
    width: 130px;
    height: 130px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-mincho);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 56, 141, 0.3);
    animation: floatingMain 18s infinite ease-in-out, morphing 8s infinite ease-in-out; /* 修正：さらにゆっくり */
    position: relative;
    z-index: 2;
    transition: scale 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease;
}

.blob-mvv:hover {
    scale: 1.1;
    box-shadow: 0 15px 40px rgba(0, 56, 141, 0.5);
}

.blob-mvv span { display: block; }

.blob-sub-1, .blob-sub-2 {
    position: absolute;
    background-color: var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.blob-sub-1 {
    width: 30px;
    height: 30px;
    top: 50%;
    left: 50%;
    margin-top: -15px;
    margin-left: -15px;
    animation: orbit1 40s infinite linear; /* 修正：さらにゆっくり */
}

.blob-sub-2 {
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-top: -9px;
    margin-left: -9px;
    animation: orbit2 50s infinite linear; /* 修正：さらにゆっくり */
}

@keyframes floatingMain {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(10px, -15px) rotate(2deg); }
    66% { transform: translate(-8px, -10px) rotate(-1deg); }
}

/* 輪郭がたゆむアニメーション */
@keyframes morphing {
    0%, 100% { border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; }
    25% { border-radius: 55% 45% 45% 55% / 55% 45% 55% 45%; }
    50% { border-radius: 45% 55% 55% 45% / 50% 55% 45% 55%; }
    75% { border-radius: 55% 45% 50% 50% / 45% 55% 45% 55%; }
}

/* 周回アニメーション1 */
@keyframes orbit1 {
    from { transform: rotate(0deg) translateX(85px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(85px) rotate(-360deg); }
}

/* 周回アニメーション2 */
@keyframes orbit2 {
    from { transform: rotate(0deg) translateX(-100px) rotate(0deg); }
    to { transform: rotate(360deg) translateX(-100px) rotate(-360deg); }
}

/* スクロールインジケーター（FV用） */
.fv-scroll {
    position: absolute;
    bottom: 120px; /* バナーの上に十分な余白 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
}

/* ==================================================
   固定下部バナー
================================================== */
.fixed-bottom-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    z-index: 2000;
}

.banner-contact {
    flex: 6; /* 60% */
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: var(--font-gothic);
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.banner-contact:hover {
    background-color: #002d72;
}

.banner-tel {
    flex: 4; /* 40% */
    background-color: #7A9BCA;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: var(--font-gothic);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.banner-tel:hover,
.banner-tel:focus,
.banner-tel:active {
    color: #fff;
    text-decoration: none;
}

.banner-icon {
    height: 24px;
    width: auto;
}

/* ==================================================
   Responsive
================================================== */
@media (max-width: 1184px) {
    .fv-main-copy { font-size: 40px; left: 5%; }
    .fv-sub-copy { font-size: 12px; right: 5%; }
}

@media (max-width: 768px) {
    .section1 { height: 700px; }
    .fv-main-copy { font-size: 28px; top: 10%; }
    .fv-sub-copy { position: relative; top: auto; right: auto; text-align: left; padding: 200px 20px 0; }
    .fv-building { bottom: 60px; width: 100%; }
    .mvv-links-container { top: 60%; right: 10%; }
    .fixed-bottom-banner { height: auto; flex-direction: column; }
    .banner-contact, .banner-tel { width: 100%; height: 50px; flex: none; font-size: 14px; }
}
/* ==================================================
   Section 2 (Calendar & News)
================================================== */
.section2 {
    padding: 350px 0 100px 0;
    position: relative;
    z-index: 10;
}

.s2-scroll-indicator {
    margin: 250px auto 30px;
}

.widget-container.vertical-layout {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.widget-box {
    width: 100%;
    background: #FFFFFF;
}

/* Calendar Widget Styles */
.custom-calendar-widget {
    display: flex;
    flex-direction: column;
    height: 398px;
    max-height: 398px;
    overflow: hidden;
}

.custom-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* カレンダー部分のフォント設定：ゴシック体は IBM Plex Sans JP、明朝体は Zen Old Mincho を使用 */
.type-zen, .type-zen * {
    font-family: var(--font-gothic) !important;
}

.custom-calendar-header h2,
#calendar-month-year-4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
    font-family: var(--font-mincho) !important;
    color: var(--primary-color);
    letter-spacing: 0.05em;
}

.custom-calendar-widget.no-border .custom-calendar-grid-header,
.custom-calendar-widget.no-border .custom-calendar-grid-cells {
    border: none;
}

.custom-calendar-widget.no-border .weekday,
.custom-calendar-widget.no-border .calendar-day.empty {
    background-color: #FFFFFF;
}

.custom-calendar-header button {
    background: #f0f4fa;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.custom-calendar-header button:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transform: scale(0.95);
}

.custom-calendar-grid-header,
.custom-calendar-grid-cells {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #e0e0e0; /* 枠線代わり */
    gap: 1px;
    border: 1px solid #e0e0e0;
}

.custom-calendar-grid-cells {
    flex: 1;
    min-height: 0;
    border-top: none; /* ヘッダーとの境界の二重線を防ぐ */
}

.weekday {
    text-align: center;
    padding: 5px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    background-color: #f8f9fa; /* ヘッダーの背景色 */
}

.weekday:nth-child(1) { color: #d50000; } /* 日曜日 */
.weekday:nth-child(7) { color: var(--primary-color); } /* 土曜日 */

.calendar-day {
    background-color: #FFFFFF;
    padding: 5px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.calendar-day.sunday-cell,
.calendar-day.saturday-cell {
    background-color: #f0f4fa !important;
}

.day-number {
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 5px;
    text-align: center;
}

.day-number.sunday span { color: #d50000; }
.day-number.saturday span { color: var(--primary-color); }

.calendar-day.today .day-number span {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.event-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: none;
}

.event-container::-webkit-scrollbar {
    display: none;
}

.calendar-event {
    background-color: var(--primary-color);
    color: #FFFFFF;
    font-size: 0.8125rem;
    padding: 4px 6px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    line-height: 1.3;
    transition: opacity 0.2s;
}

.calendar-event:hover {
    opacity: 0.8;
}

.calendar-event .event-title {
    font-weight: 500;
}

.calendar-event .event-time {
    font-size: 0.75rem;
    margin-top: 2px;
    opacity: 0.9;
}

/* Event Colors */
.event-color-kengaku { background-color: #e91e63; }
.event-color-soudan { background-color: #4caf50; }
.event-color-kashidashi { background-color: #ff9800; }
.event-color-default { background-color: var(--primary-color); }

/* News Widget Styles */
.news-widget.type-3-rows {
    max-height: 360px;
}

.news-content {
    height: 100%;
}

.news-list.text-only {
    list-style: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-item {
    height: 90px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background-color: #f9f9f9;
}

.news-link {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 100%;
    text-decoration: none;
    color: var(--text-main);
    cursor: pointer;
}

.news-content-area {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.news-date {
    font-family: var(--font-gothic);
    font-size: 0.9rem;
    color: var(--text-light);
    width: 75px;
}

.news-category {
    font-size: 0.7rem;
    color: #FFFFFF;
    background-color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 2px;
    font-weight: 500;
}

.news-title {
    font-size: 0.9rem;
    font-family: var(--font-mincho) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.news-arrow-container {
    color: var(--primary-color);
    margin-left: 20px;
    transition: transform 0.3s;
}

.news-item:hover .news-arrow-container {
    transform: translateX(5px);
}

/* Modals */
.calendar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.calendar-modal.active {
    opacity: 1;
    visibility: visible;
}

.calendar-modal-content {
    background: #FFFFFF;
    width: 90%;
    max-width: 600px;
    padding: 40px;
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.calendar-modal-content.news-modal-content {
    max-width: 800px !important;
}

.calendar-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.calendar-modal-title {
    font-family: var(--font-mincho);
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    word-break: break-all;
}

.calendar-modal-time {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.calendar-modal-detail {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-main);
    white-space: pre-wrap;
    word-break: break-all;
}

.news-modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 10px;
}

.news-modal-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.news-modal-meta .news-date {
    font-size: 1rem;
    font-weight: 500;
    width: auto;
    color: var(--text-main);
}

.news-modal-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.news-modal-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    font-family: var(--font-mincho);
}

/* Responsive */
@media (max-width: 768px) {
    .section2 {
        padding: 0px 0 60px 0 !important; /* 上部余白を縮める */
    }
    .news-category {
        font-size: 0.6rem !important; /* カテゴリを少し小さく */
        padding: 2px 8px !important;  /* パディングも調整 */
    }
    .widget-container.vertical-layout {
        gap: 50px;
    }
    .news-content-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .news-link {
        padding: 15px 20px;
    }
    .news-title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .news-modal-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================================================
   Section 3 (Accordion UI from 000)
================================================== */
.section3 {
    --anim-speed: 0.6s;
    --anim-easing: cubic-bezier(0.25, 1, 0.5, 1);
    --darker-color: #001233;
    position: relative;
    width: 100%;
    padding: 100px 0;
    overflow: hidden;
}

.s3-container {
    max-width: 1184px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
}

#network-canvas-bg,
#network-canvas-fg {
    position: absolute;
    top: -300px;
    left: -300px;
    width: 1200px;
    height: 1200px;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 80%);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 0) 80%);
}

#network-canvas-bg {
    z-index: 0;
}

#network-canvas-fg {
    z-index: 5;
}

.section3 .main-title {
    position: absolute;
    top: 0px;
    left: 20px;
    font-size: 45px;
    line-height: 1.6;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin: 0;
    z-index: 10;
    font-family: var(--font-mincho);
    text-indent: -0.45em;
}

.section3 .sub-title {
    position: absolute;
    top: 160px; /* 少し上にずらす */
    left: 20px;
    font-size: 16px;
    font-family: var(--font-gothic);
    line-height: 2.0;
    color: var(--text-main);
    margin: 0;
    z-index: 10;
}

.s3-tags {
    position: absolute;
    top: 290px; /* 上の文字との余白を広げるため元の位置に戻す */
    left: 20px;
    display: flex;
    gap: 25px;
    z-index: 10;
}

.s3-tag-break {
    display: none;
}

.s3-tag {
    font-family: var(--font-mincho);
    font-size: 16px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.s3-tag:hover {
    opacity: 0.7;
}

.accordion-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    margin-top: 140px; /* 85pxから140pxへ。以前の良かった距離感に再調整 */
    position: relative;
    z-index: 5;
}

/* 親要素のフェードイントリガー（自身は動かさない） */
.accordion-wrapper.fade-in-target {
    transform: none !important;
    opacity: 1 !important;
}

.accordion-item {
    height: 38px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--primary-color) 80%, var(--darker-color) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 2500px; 
    
    /* 滑らかなアニメーションのために transform を使用 */
    --container-width: min(1184px, 100vw);
    --offset-val: calc(var(--container-width) * var(--offset-ratio));
    /* 初期状態：JSによって is-visible が付与されるまで右外に待機 */
    opacity: 0;
    transform: translateX(100vw);
    
    /* 登場も開閉もこの transition で一貫して制御 */
    transition: transform 0.6s var(--anim-easing),
                opacity 0.6s ease;
    will-change: transform, opacity;
    
    overflow: hidden;
    position: relative;
}

.accordion-item.is-visible {
    opacity: 1;
    transform: translateX(var(--offset-val));
}

.accordion-item.active {
    transform: translateX(20px) !important;
    opacity: 1 !important;
    transition-delay: 0s !important;
}

/* 1〜3番目は以前のように 480px で停止させる */
.accordion-item:nth-child(1).active,
.accordion-item:nth-child(2).active,
.accordion-item:nth-child(3).active {
    transform: translateX(480px) !important;
}

.accordion-item:hover:not(.active) {
    transform: translateX(calc(var(--offset-val) - 12px));
}

.accordion-item .spacer-left {
    flex: 0 0 30px;
}

.accordion-item .spacer-right {
    flex: 1;
}

.accordion-item .item-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    font-family: var(--font-mincho);
}

.accordion-item .item-number {
    font-family: var(--font-mincho);
    font-style: italic;
    font-size: 16px;
    font-weight: normal;
    margin-right: 8px;
}

.accordion-item .item-icon {
    margin-left: 20px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.accordion-item .item-icon::before {
    content: "＋";
    /* アイコンが変わった際のレイアウト再計算を防ぐためサイズを固定 */
    display: inline-block;
    width: 1em;
    text-align: center;
}

.accordion-item.active .item-icon::before {
    content: "▶";
    font-size: 12px;
}

.accordion-item .item-content {
    display: block;
    max-width: 0;
    padding-left: 0;
    transition: max-width var(--anim-speed) var(--anim-easing),
                padding-left var(--anim-speed) var(--anim-easing),
                opacity var(--anim-speed) ease;
    opacity: 0;
    white-space: nowrap;
    font-size: 13px;
    font-family: var(--font-gothic);
    overflow: hidden;
    will-change: max-width, padding-left;
    position: relative;
    top: 1.5px; /* 縦の均等配置のため少し下に下げます */
}

.accordion-item.active .item-content {
    max-width: 600px;
    padding-left: 20px; /* 30pxから20pxへ狭めて引き締めました */
    opacity: 1;
}

/* 内部のテキストにマージンを持たせるための疑似要素は廃止 */
.accordion-item .item-content::before {
    display: none;
}
/* ==================================================
   Section 4 (Expertise & Space)
================================================== */
.section4 {
    position: relative;
    padding: 220px 0 430px;
    overflow: hidden;
    background-color: #fff;
}

/* 最下部の薄い青グラデーション */
.section4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* 高さを増やしてグラデーションを広げる */
    background: linear-gradient(to top, rgba(0, 56, 141, 0.15), transparent); /* 不透明度を上げて少し強く調整 */
    z-index: 10;
    pointer-events: none;
}

/* 背景の巨大な透かしテキスト（MVV section1に準拠） */
.s4-bg-text {
    position: absolute;
    bottom: 0; /* 下まで完全に出す */
    left: -2vw;
    font-size: 16vw; /* MVVと同じサイズ */
    font-family: var(--font-mincho); /* 明朝体に変更 */
    font-weight: 500;
    color: rgba(0, 56, 141, 0.035);
    pointer-events: none;
    z-index: 1;
    line-height: 0.85; /* 改行時の行間を詰める */
    letter-spacing: -0.04em;
}

.section4-inner {
    position: relative;
    z-index: 2;
}

.s4-row {
    display: flex;
    align-items: stretch; /* 画像の高さをテキストコンテンツに合わせる */
    gap: 50px; /* ギャップを調整してテキストエリアを確保 */
    margin-bottom: 200px;
}

.s4-row:last-child {
    margin-bottom: 0;
}

.s4-image {
    flex: 0 0 48%; /* 画像を可能な限り横に伸ばす */
    overflow: hidden;
    position: relative;
}

.s4-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 拡大された高さに合わせる */
    display: block;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

.s4-content {
    flex: 1;
}

.s4-en-title {
    font-size: 11px; /* さらに小さく */
    color: var(--primary-color); /* 青色に変更 */
    margin-bottom: 10px; /* 余白を縮める */
    letter-spacing: 0.1em;
    font-family: var(--font-gothic);
    font-weight: 600;
}

.s4-jp-title {
    font-size: 34px;
    font-family: var(--font-mincho);
    color: var(--primary-color);
    line-height: 1.6;
    margin-bottom: 25px; /* 余白を縮める */
    font-weight: 600;
    letter-spacing: -0.02em; /* 文字間を詰めるご指示から少しあける */
    white-space: normal; /* PCサイズでも適切に改行させる（右にずれる原因だったnowrapを解除） */
}

.s4-body {
    font-size: 15px;
    line-height: 2.3;
    color: var(--text-main);
    margin-bottom: 35px; /* 余白を縮める */
    text-align: justify;
}

/* ボタン共通設定 */
.s4-btn {
    display: inline-block;
    padding: 10px 50px; /* 上下を削り、横に伸ばす */
    border-radius: 40px;
    font-size: 13px; /* 少し小さく */
    font-weight: 500; /* 少し細く */
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    font-family: var(--font-gothic);
}

/* 塗りつぶしボタン */
.s4-btn-solid {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

.s4-btn-solid:hover {
    background-color: #002a6b;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 56, 141, 0.25);
}

/* 外枠のみボタン */
.s4-btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color); /* 青色に変更 */
}

.s4-btn-outline:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 56, 141, 0.15);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .s4-row {
        flex-direction: column !important;
        gap: 50px;
        margin-bottom: 120px;
    }
    /* reversedブロック（Block2）はスマホ時も「画像→文字」の順に */
    .s4-row.reversed {
        flex-direction: column-reverse !important;
    }
    .s4-image {
        width: 100%;
        height: 400px;
        flex: none;
    }
    .s4-jp-title {
        font-size: 28px;
        white-space: normal; /* モバイルでは自然に改行させる */
    }
    .s4-bg-text {
        font-size: 140px;
        bottom: 0; /* section5の青い背景の上にぴったりくっつける */
    }
}

/* ==================================================
   Section 5 (Flow)
================================================== */
.section5 {
    background-color: var(--primary-color);
    padding: 150px 0;
    position: relative;
    overflow: hidden;
}

.s5-header .s5-en-title,
.s6-header .s6-en-title {
    font-size: 14px;
    letter-spacing: 0.2em;
    margin-bottom: 15px;
    font-family: var(--font-gothic);
}

.s5-header .s5-jp-title,
.s6-header .s6-jp-title {
    font-size: 32px;
    font-family: var(--font-mincho);
    letter-spacing: 0.1em;
}

.s5-header {
    text-align: center;
    margin-bottom: 80px;
    color: #fff;
}

.s5-flow-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    max-width: 1100px; /* 少し絞って全体を中央に寄せる */
    margin: 0 auto;
}

/* カード同士を繋ぐ中央のライン */
.s5-flow-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 9%; /* カードサイズ変更に合わせて調整 */
    width: 82%; 
    height: 4px; /* 少し細く調整 */
    background-color: #fff; /* 不透明度100%の白 */
    z-index: 1;
    transform: translateY(-50%);
}

.s5-card {
    background-color: #fff;
    flex: 0 0 18%; /* 一回り小さく */
    padding: 50px 22px 30px; /* 左右の余白を微調整 */
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25); /* シャドウを強く */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.s5-step-num {
    position: absolute;
    top: -7px; /* さらに5px（合計7px）ずらす */
    left: -7px; /* さらに5px（合計7px）ずらす */
    width: 40px; /* 少し大きく */
    height: 40px; /* 少し大きく */
    background-color: #7A9BCA; /* お電話はこちらバナーと同じ色に変更 */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-gothic);
    font-weight: 600;
    font-size: 18px; /* 文字も大きく */
}

.s5-icon-wrap {
    width: 70px;
    height: 70px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.s5-icon {
    width: 100%;
    height: auto;
}

.s5-card-title {
    font-size: 17px;
    color: var(--primary-color);
    font-family: var(--font-gothic);
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.s5-card-text {
    font-size: 13px;
    line-height: 1.75;
    color: #444;
    text-align: left;
    font-family: var(--font-gothic);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .s5-flow-container {
        flex-direction: column;
        gap: 12px; /* カード間の余白を縮める */
        align-items: stretch; /* カードを横幅いっぱいに広げる */
    }
    .s5-flow-container::before {
        display: none; /* 接続ラインを非表示 */
    }
    .s5-card {
        width: 100%;
        max-width: 457px;
        margin: 12px auto 0; /* step-numが切れないよう上にマージン、中央寄せ */
        /* グリッドで「左アイコン・右テキスト」レイアウトに */
        display: grid;
        grid-template-columns: 55px 1fr;
        align-items: center;
        column-gap: 20px;
        row-gap: 4px;
        padding: 20px 25px 20px 45px;
    }
    /* アイコンを2行分スパンさせてタイトル・本文と並ぶように */
    .s5-icon-wrap {
        grid-row: span 2;
        margin-bottom: 0;
        width: 55px;
        height: 55px;
    }
    .s5-card-title {
        margin-bottom: 0;
        white-space: normal;
        align-self: flex-end;
    }
    .s5-card-text {
        align-self: flex-start;
    }
    .s5-header .s5-jp-title {
        font-size: 24px;
    }
}

/* ==================================================
   Section 6 (Q&A)
================================================== */
.section6 {
    padding: 150px 0;
    background-color: #fff;
}

.s6-header {
    text-align: center;
    margin-bottom: 80px;
}
.s6-header .s6-en-title,
.s6-header .s6-jp-title {
    color: var(--primary-color);
}
/* 英語タイトル・日本語タイトルは s5-header 側で一括定義 */

.s6-accordion {
    /* Reduce extra bottom spacing for accordion */
    margin-bottom: 0;
    padding-bottom: 1rem;

    max-width: 1184px;
    margin: 0 auto;
    height: 520px; /* 展開時に下の要素を押し下げないための固定高さ */
}

.s6-item {
    width: 100%;
    margin-bottom: 15px;
}

.s6-q {
    background-color: #f5f5f5;
    height: 62px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* マウスオーバー時の背景変化を削除 */

.s6-q-icon {
    width: 28px;
    height: 28px;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin-right: 25px;
    flex-shrink: 0;
    font-family: var(--font-gothic);
}

.s6-q-text {
    font-size: 16px;
    color: var(--primary-color);
    font-family: var(--font-gothic);
    font-weight: 600;
    margin: 0;
    line-height: 1.2; /* 垂直中央を際立たせる */
}

.s6-chevron {
    margin-left: auto;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(45deg);
    transition: transform 0.5s ease;
}

/* アコーディオンが開いている時の回転 */
.s6-item.is-open .s6-chevron {
    transform: rotate(-135deg);
}

.s6-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f5f5f5;
    overflow: hidden;
}

.s6-item.is-open .s6-a {
    grid-template-rows: 1fr;
}

.s6-a-inner {
    padding: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-wrap: break-word;
    word-break: break-all;
    min-height: 0;
}

.s6-item.is-open .s6-a-inner {
    opacity: 1;
}

.s6-a-text {
    padding: 0 30px 25px 83px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-main);
    margin: 0;
    font-family: var(--font-gothic);
}

/* 下部ボタン */
.s6-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 20px;
}

.s6-btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-gothic);
    width: 31%; /* 3つ並べて端を揃える */
    text-align: center;
    box-sizing: border-box;
}

.s6-btn:hover {
    background-color: #002a6b;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 56, 141, 0.2);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .section6 {
        padding: 80px 0 120px; /* 下部余白を広げる */
    }
    /* アコーディオンの固定高さを解除して余分な余白をなくす */
    .s6-accordion {
        height: auto;
    }
    .s6-q {
        height: auto;
        min-height: 62px;
        padding: 15px 30px; /* テキスト折返し時にもパディングで余白確保 */
    }
    .s6-buttons {
        flex-direction: column;
        align-items: stretch; /* 左右に広げて改行を防ぐ */
        gap: 15px;
    }
    .s6-btn {
        width: 100%;
        max-width: none; /* 文字が改行しないよう制限を解除 */
        font-size: 13px;
    }
    .s6-a {
        padding: 0;
    }
    .s6-a-inner {
        padding: 0;
    }
    .s6-a-text {
        padding: 0 30px 20px 83px;
    }
}

/* アンカーリンクのジャンプ位置微調整（レイアウト・見た目の変更なし） */
#calendar-widget {
    scroll-margin-top: 120px;
}

#news-widget {
    scroll-margin-top: 120px;
}

/* ==================================================
   Responsive Styles (For Tablet & Smartphone)
   PC版（1920px）のスタイルは上書きせず維持
================================================== */

/* --- 1024px (Tablet / Desktop Small) --- */
@media (max-width: 768px) {
    /* Footer Line Alignment */
    .footer-line {
        background-clip: content-box;
    }
    /* Header Logo */
    .logo-link {
        top: 70px; /* 白い帯(50px)の下、余白を持たせて配置 */
        left: 30px;
        width: 200px;
        height: auto;
    }

    /* Container & Section 3 (Accordion UI) */
    .container {
        padding: 0 80px !important; /* 余白を更に広げる */
    }
    .section3 {
        padding: 80px 0;
    }
    .s3-container {
        padding: 0 80px !important; /* 余白を更に広げる */
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .section3 .main-title {
        position: static;
        font-size: 30px; /* レレスポンシブ用フォントサイズ */
        line-height: 1.4;
        text-indent: 0 !important; /* 中央揃えのため括弧の引き込みを解除 */
        margin-bottom: 20px;
        text-align: center;
    }
    .section3 .sub-title {
        position: static;
        font-size: 14px;
        line-height: 1.8;
        margin-bottom: 20px;
        text-align: center;
    }
    .s3-tags {
        position: static;
        display: flex;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 15px;
        margin-bottom: 40px;
        width: 100%;
    }
    .s3-tag {
        font-size: 13px;
    }
    .accordion-wrapper {
        margin-top: 0;
        width: 100%;
        gap: 12px;
        display: flex;
        flex-direction: column;
    }
    .accordion-item {
        width: 100% !important;
        height: auto;
        min-height: 44px; /* 押しやすく存在感のあるサイズ */
        padding: 0 !important;
        transform: translateX(0) !important;
        opacity: 1 !important;
        transition: none;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        background: var(--primary-color); /* 青いバーの背景 */
        border-radius: 0 !important; /* 角丸なし（直線シャープデザイン） */
        margin-bottom: 12px;
        overflow: hidden;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    }
    .accordion-item.is-visible {
        transform: translateX(0) !important;
        opacity: 1 !important;
    }
    .accordion-item:hover:not(.active) {
        transform: translateX(0) !important;
    }
    .accordion-item.active,
    .accordion-item:nth-child(1).active,
    .accordion-item:nth-child(2).active,
    .accordion-item:nth-child(3).active {
        transform: translateX(0) !important; /* 詳細度を上げてPC版の横スライドを確実に打ち消す */
    }
    .accordion-item .spacer-left,
    .accordion-item .spacer-right {
        display: none !important;
    }
    .accordion-item .item-title {
        font-size: 15px;
        white-space: normal;
        line-height: 1.4;
        display: flex;
        align-items: center;
        padding: 6px 25px; /* 上下パディングを狭めて縦中央揃えを正確にする */
        color: #fff;
        font-family: var(--font-gothic);
        font-weight: 600;
        width: 100%;
        box-sizing: border-box;
        position: relative;
        min-height: 44px; /* アコーディオン全体の高さに合わせる */
    }
    .accordion-item .item-number {
        font-size: 16px;
        font-weight: 700;
        margin-right: 10px;
        color: #fff;
    }
    /* 右端にくの字矢印を配置（Section 6のよくある質問アコーディオンと同じ仕様） */
    .accordion-item .item-icon {
        position: absolute;
        right: 25px;
        top: 22px !important;
        transform: translateY(-50%) rotate(45deg);
        margin: 0;
        width: 10px;
        height: 10px;
        border-right: 2px solid #fff; /* 青背景なので白色 */
        border-bottom: 2px solid #fff;
        transition: transform 0.4s ease;
        pointer-events: none;
    }
    .accordion-item .item-icon::before {
        display: none !important;
    }
    /* 開いたときは上向きの矢印に回転 */
    .accordion-item.active .item-icon {
        transform: translateY(-50%) rotate(-135deg);
    }
    /* コンテンツの滑らかなスライド展開 */
    .accordion-item .item-content {
        width: 100%;
        max-height: 0;
        max-width: none !important; /* PC版のmax-width:0に向かって縮むアニメーションを打ち消す */
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    padding-bottom 0.4s ease,
                    padding-top 0.4s ease,
                    opacity 0.3s ease;
        opacity: 0;
        padding: 0 25px;
        box-sizing: border-box;
        white-space: normal;
        font-size: 13px;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.9);
        border-top: 1px solid transparent; /* 閉じる時は線を消す */
    }
    .accordion-item.active .item-content {
        max-height: 250px; /* テキストが収まるように少し広めに設定 */
        max-width: none !important;
        opacity: 1;
        padding: 15px 25px 20px 25px;
        border-top: 1px solid rgba(255, 255, 255, 0.15); /* 展開時の境界線 */
    }
}

/* --- 768px (Tablet / Smartphone Landscape) --- */
@media (max-width: 768px) {
    /* 左右余白の拡大 */
    .container {
        padding: 0 60px !important; /* 余白を更に広げる */
    }
    .s3-container {
        padding: 0 60px !important; /* 余白を更に広げる */
    }

    /* Header & Navigation */
    .header {
        padding: 0 20px 0 35px; /* ハンバーガー右側の余白を少し狭く */
        height: 70px; /* 白い帯を70pxに広げる */
    }
    .logo-link {
        top: 16px; /* 上下中央に配置 (70-38)/2 = 16px */
        left: 35px; /* 余白に合わせて微調整 */
        height: 38px; /* ロゴを38pxに拡大 */
        width: auto;
    }
    .logo-blue {
        height: 100%;
        width: auto;
    }

    .hamburger {
        transform: translateY(0);
        gap: 7px;
        width: 50px; /* ハンバーガーを大きく */
        height: 50px;
        padding: 10px;
    }
    .hamburger span {
        width: 30px; /* 線の幅を戻して大きく表示 */
    }
    
    .nav-list a {
        font-size: 1.1rem;
        letter-spacing: 0.1em;
    }
    .nav-list li {
        margin-bottom: 25px;
    }

    /* PC専用改行タグの無効化 */
    .pc-only {
        display: none !important;
    }
    .sp-only {
        display: block !important;
    }

    /* Section 1 (FV) - フレックス縦並びによる被り防止 */
    .section1 {
        height: auto;
        padding-bottom: 0px !important; /* 建物の下の余白を縮める */
        overflow: hidden; /* 横スクロールバー防止 */
    }
    .fv-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        height: auto;
        padding: 110px 50px 0 !important; /* 青いコピーの上の余白を狭める */
        position: relative;
    }
    .fv-text-wrapper {
        order: 1;
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        pointer-events: auto;
        z-index: 20;
        margin-bottom: 30px;
    }
    .fv-main-copy {
        position: relative;
        top: auto;
        left: auto;
        font-size: 6.5vw !important;
        font-weight: 500;
        line-height: 1.45;
        margin-bottom: 20px;
        text-indent: -0.45em;
        text-align: left;
        letter-spacing: 0.05em !important;
    }
    .fv-sub-copy {
        position: relative;
        top: auto;
        right: auto;
        font-size: 16px !important;
        line-height: 2.0;
        text-align: left;
        padding: 0;
        margin: 0;
        max-width: calc(100% - 150px); /* ふよふよ左寄せに伴い幅制限を緩和 */
    }
    .mvv-links-container {
        position: absolute !important;
        top: 383px !important; /* サブコピーの横（少し下へ） */
        right: 80px !important; /* ふよふよをさらに左寄せ */
        z-index: 30;
        transform: scale(1.1) !important; /* 青いふよふよをさらに大きく */
        transform-origin: top right !important;
        margin: 0 !important;
    }
    .fv-building {
        order: 2; /* テキストの直後に配置 */
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        transform: none !important;
        width: 125% !important; /* 右側にはみ出させて大きく */
        max-width: none !important;
        margin: 25px 0 -35px -5% !important; /* サブコピー下余白を狭め、左寄りに配置して右側を見切れさせる、建物下余白をさらに狭める */
        z-index: 10;
    }

    /* Section 2 (Calendar Widget) */
    .custom-calendar-widget {
        height: auto;
        max-height: none;
    }
    .custom-calendar-header h2,
    #calendar-month-year-4 {
        font-size: 1.2rem !important; /* カレンダーの月のフォントサイズを縮小 */
    }
    .weekday {
        font-size: 0.65rem;
        padding: 4px 0;
    }
    .day-number {
        font-size: 0.7rem;
        margin-bottom: 3px;
    }
    .calendar-day {
        padding: 3px;
        min-height: 110px; /* カレンダーのセルの高さを拡大 */
    }
    .calendar-event {
        font-size: 0.65rem;
        padding: 2px 4px;
        border-radius: 2px;
        line-height: 1.2;
    }
    .calendar-event .event-time {
        font-size: inherit; /* 予定の文字をタイトルと同じ大きさに統一してはみ出し防止 */
    }

    /* Section 3 Canvas & Title Adjustment */
    .section3 .main-title {
        font-size: 26px !important;
    }
    #network-canvas-bg,
    #network-canvas-fg {
        display: none !important; /* スマホ版: Section3のネットアニメーションを非表示 */
    }

    /* Section 4 (Expertise & Space) Extra Mobile Adjustments */
    .s4-en-title {
        display: none !important;
    }
    .s4-row {
        gap: 25px !important;
    }
    .s4-jp-title {
        font-size: 26px !important;
        line-height: 1.4;
        margin-bottom: 12px !important;
    }
    .s4-body {
        font-size: 13px;
        line-height: 1.7;
        margin-bottom: 20px !important;
    }
    .s4-btn {
        display: block !important;
        margin: 0 auto !important;
        width: fit-content;
        text-align: center;
    }
    .s4-image {
        height: 250px;
    }
    .section4 {
        padding: 80px 0 120px;
    }
    
    /* Section 5 (Flow) Extra Mobile Adjustments */
    .section5 {
        padding: 80px 0;
    }
    .s5-header {
        margin-bottom: 35px !important;
    }
    .s5-card {
        padding: 18px 20px 18px 45px; /* グリッドレイアウト用に調整 */
        column-gap: 25px; /* アイコンと文字の間を少しあけ、文字幅を少し縮める */
        max-width: 380px !important;
    }
    .s5-card-title {
        font-size: 16px;
    }
    .s5-card-text {
        font-size: 12px;
        height: 63px !important; /* 3行分の高さに固定して白いボックスの高さを揃える */
    }
    
    /* Section 6 (Q&A) Extra Mobile Adjustments */
    .section6 {
        padding: 80px 0 160px; /* 下部余白をさらに広げる */
    }
    .s6-q-text {
        font-size: 14px;
    }
    .s6-a-text {
        font-size: 13px;
    }

    /* Footer */
    .footer {
        padding-bottom: 180px;
    }
    .footer-content {
        position: relative;
        display: block;
        width: 100%;
    }
    .footer-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        width: 100%;
    }
    .footer-logo-wrap {
        margin-bottom: 25px;
        height: 60px;
        display: flex;
        align-items: center;
    }
    .footer-logo {
        height: 60px;
        width: auto;
    }
    .footer-info {
        margin-bottom: 30px;
        font-size: 0.8rem;
        width: 100%;
    }
    .footer-copyright {
        font-size: 0.7rem;
        text-align: left;
        width: 100%;
        position: relative;
        z-index: 2;
        line-height: 1.35 !important;
    }
    .footer-right {
        position: absolute;
        top: 0;
        right: 60px;
        margin-top: 0;
        display: flex;
        align-items: center;
        height: 60px;
    }
    .univ-logo-box {
        padding: 10px 20px;
        max-width: 100%;
        box-sizing: border-box;
    }
    .footer-univ-logo {
        height: 50px;
        width: auto;
    }
    .footer-line {
        margin-bottom: 60px !important;
    }
    .banner-tel span {
        line-height: 1.35;
        font-size: 13px;
        text-align: center; /* 文字は中央揃え */
    }
    .banner-tel span br {
        display: none !important; /* タブレット版では改行を消して1行にする */
    }
    .s3-tag-break {
        display: block;
        width: 100%;
        height: 0;
    }
    .s3-tags {
        flex-wrap: wrap;
        column-gap: 24px;
        row-gap: 8px;
    }
    .s3-tag {
        font-size: 14px !important;
    }

    /* Section 3 アコーディオンのスマホ縦位置個別調整 */
    .accordion-item .item-title {
        align-items: flex-start !important;
        padding: 12px 25px 8px 25px !important;
    }
    .accordion-item .item-number {
        position: relative !important;
        top: -2px !important;
    }
    .accordion-item .item-icon {
        top: 24px !important;
    }

    /* Section 6 (Q&A) ヘッダー下の余白調整 */
    .s6-header {
        margin-bottom: 35px !important;
    }

    /* Footer スマホ用の大学ロゴ調整 */
    .footer-univ-logo-sp {
        margin-bottom: 20px;
    }
    .footer-univ-logo-sp .footer-univ-logo {
        height: 45px;
        width: auto;
        display: block;
    }

    /* 追加のタブレット文字サイズ・改行調整 */
    .main-title br.sp-only {
        display: none !important;
    }
    .sub-title {
        font-size: 16px !important;
    }
    .sub-title br:nth-of-type(2),
    .sub-title br:nth-of-type(4) {
        display: none !important;
    }
    .s3-tag {
        font-size: 16px !important;
    }
    .space-row .s4-jp-title br:nth-of-type(2) {
        display: none !important;
    }
    .s6-q-text br {
        display: none !important;
    }
    .s6-btn {
        font-size: 16px !important;
    }
}

/* Footer & Copyright PC/SP adjustments */
.contact-link {
    color: inherit;
    text-decoration: none;
}
.contact-link:hover {
    opacity: 0.7;
}

/* --- 450px (Smartphone Portrait) --- */
@media (max-width: 450px) {
    /* 左右余白の拡大 */
    .container {
        padding: 0 30px !important;
    }
    .s3-container {
        padding: 0 30px !important;
    }

    /* Header & Navigation */
    .header {
        padding: 0 15px 0 25px !important; /* ハンバーガー右の余白をさらに狭く */
        height: 70px !important; /* 白帯を上下に広げる */
    }
    .logo-link {
        left: 25px; /* 左余白に揃える */
    }

    /* Section 1 (FV) */
    .fv-content {
        padding: 115px 25px 0 !important; /* メインコピー、サブコピー、建物をまとめて下に下げる（下げ幅を半分の20pxに調整） */
    }
    .fv-main-copy {
        line-height: 1.4;
        left: auto;
        text-indent: -0.45em;
    }
    .fv-sub-copy {
        font-size: 14px;
        line-height: 1.8;
        padding: 0;
        max-width: 100%; /* 右側に範囲を広げて改行を防ぐ */
        position: relative;
        z-index: 1;
    }
    .mvv-links-container {
        position: absolute !important;
        top: 330px !important;
        right: 28px !important;
        transform: none !important; /* クリック領域のズレをなくすため解除 */
        margin: 0 !important;
        z-index: 30; /* テキストエリア(z-index: 20)より前面に出してクリックを確実にする */
    }
    .fv-building {
        width: 164% !important;
        max-width: none !important;
        margin-top: 10px !important; /* さらに少し下げる (-10pxから変更) */
        margin-left: 44% !important;
        margin-bottom: -35px !important;
    }

    .blob-mvv {
        width: 90px; /* 見た目のサイズを維持 (元の100px * scale0.9) */
        height: 90px;
        font-size: 13px; /* 14pxから微縮小してバランスを維持 */
    }
    /* スマホ用にタップ領域（見えない部分）を広げる */
    .blob-mvv::after {
        content: "";
        position: absolute;
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
        background-color: transparent;
    }
    .blob-sub-1, .blob-sub-2 {
        display: none;
    }

    /* Section 2 (Calendar) */
    .section2 {
        padding: 0px 0 40px 0 !important; /* 建物下の余白を縮める */
    }
    .s2-scroll-indicator {
        margin: 60px auto 60px !important; /* 上下の余白を詰めて揃える */
    }
    .custom-calendar-header h2,
    #calendar-month-year-4 {
        font-size: 0.95rem !important; /* 月のフォントサイズを縮小 */
    }
    .weekday {
        font-size: 0.5rem; /* 曜日を縮小 */
    }
    .day-number {
        font-size: 0.6rem; /* 日付を縮小 */
    }
    .calendar-day {
        min-height: 80px; /* カレンダーのセルの高さをさらに拡大 */
    }
    .calendar-event {
        font-size: 0.55rem; /* イベント文字をさらに縮小 */
        padding: 1px 2px;
    }
    .news-arrow-container {
        margin-top: -15px !important; /* スマホ版: 新着情報の矢印を上に上げる */
    }
    .news-modal-gallery {
        grid-template-columns: 1fr;
    }

    .section3 {
        padding-top: 40px !important; /* 上のpaddingを狭める */
    }
    .sub-title {
        font-size: 14px;
    }
    .s3-tags {
        column-gap: 16px !important;
        row-gap: 6px !important;
    }

    /* Section 3 (Accordion UI) スマホ向け微調整 */
    .section3 .main-title {
        font-size: 21px !important;
    }
    .accordion-item .item-title {
        font-size: 13px;
        align-items: flex-start !important;
        padding: 13px 20px 3px 20px !important; /* 上余白を増やして文字を下げる */
        min-height: 38px;
    }
    .accordion-item .item-number {
        position: relative !important;
        top: -2px !important;
    }
    .accordion-item .item-icon {
        top: 21px !important;
        right: 20px;
    }
    .accordion-item .item-content {
        padding: 0 20px;
        font-size: 12px;
    }
    .accordion-item.active .item-content {
        padding: 12px 20px 16px 20px;
    }

    /* Section 4 & 5 & 6 */
    .s4-jp-title {
        font-size: 21px !important;
        letter-spacing: -0.05em !important; /* 少し文字間を詰める */
    }
    .s4-row.space-row .s4-jp-title {
        letter-spacing: 0.1em !important; /* 二つ目の青い文字は文字間を少し開ける */
    }
    .s4-image {
        height: 180px;
    }
    .s5-header .s5-jp-title,
    .s6-header .s6-jp-title {
        font-size: 20px;
    }
    .s6-q-text {
        font-size: 13px;
    }
    .s6-a-text {
        font-size: 12px;
    }
    .s5-header .s5-en-title,
    .s6-header .s6-en-title {
        margin-bottom: 5px !important; /* 英語の下の余白を狭める */
    }
    .section5 {
        padding-top: 80px !important; /* FLOW上の余白を狭める */
        padding-bottom: 80px !important; /* 白いボックス下の余白を広げる */
    }
    .section6 {
        padding-bottom: 80px !important;
    }
    .s6-buttons .s6-btn:nth-child(1) {
        letter-spacing: -0.03em !important; /* スマホ版: 1個目のボタンの文字間を少し空ける（-0.08emから緩和） */
    }
    .footer-right {
        right: 30px;
    }
    .footer-logo-wrap {
        height: 75px !important;
        margin-bottom: 30px !important;
    }
    .footer-logo {
        height: 75px !important;
    }
    .fv-sub-copy {
        font-size: 14px !important;
    }
    .pc-tb-only {
        display: none !important;
    }
    .sub-title {
        font-size: 14px !important;
    }
    .faq-btn,
    .s6-btn {
        font-size: 14px !important;
    }
    .banner-tel {
        gap: 5px !important;
        flex-direction: row !important;
        text-align: left;
        align-items: center !important;
        justify-content: center !important;
    }
    .banner-tel span {
        line-height: 1.2;
    }
    .banner-tel span .sp-only {
        display: inline !important;
    }
    .banner-tel span br {
        display: inline !important;
    }
    .sub-title br,
    .sub-title br.sp-only,
    .sub-title br:nth-of-type(2),
    .sub-title br:nth-of-type(4) {
        display: inline !important;
    }
    .sub-title br.pc-tb-only,
    .sub-title br.pc-only {
        display: none !important;
    }
    .main-title br.sp-only {
        display: inline !important;
    }
    .s6-q-text br.sp-only {
        display: inline !important;
    }
}

/* --- 新規追加: Section4のスマホ用改行調整 --- */
.s4-br-sp {
    display: none;
}
@media (max-width: 450px) {
    .s4-row.space-row .s4-jp-title .s4-br-sp {
        display: block !important;
    }
}
