/* ======== 青雲寮だより専用CSS - Liquid Glass Design & Apple-style UI ======== */

/* ----------------------------------------------
 * 基本変数定義
 * ---------------------------------------------- */
:root {
    --primary-blue-start: #007aff;
    --primary-blue-end: #5ac8fa;
    --primary-gradient: linear-gradient(135deg, var(--primary-blue-start) 0%, var(--primary-blue-end) 100%);
    --text-gradient-up: linear-gradient(to top, #5ac8fa, #007aff);

    --text-dark: #1a1a1a;
    --text-light: #737373;
    --text-lighter: #a3a3a3;

    --glass-bg: rgba(242, 242, 247, 0.75);
    --glass-border-color: rgba(255, 255, 255, 0.6);
    --glass-blur: blur(20px);
    --glass-saturate: saturate(180%);

    --border-radius: 20px;
    --soft-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --soft-shadow-hover: 0 12px 40px 0 rgba(31, 38, 135, 0.15);

    --header-height: 72px;
    --mobile-nav-padding-top: 100px;

    --accent-color: #2563eb;
    --accent-hover: #1d4ed8;
}

/* ----------------------------------------------
 * 基本スタイル
 * ---------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ユーザーの簡易モーション設定に配慮 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ----------------------------------------------
 * ヘッダー
 * ---------------------------------------------- */
.header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-bottom: 1px solid var(--glass-border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
    min-height: var(--header-height);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section h1,
.seiun-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-section .subtitle {
    font-size: 0.875rem;
    color: var(--primary-blue-start);
    font-weight: 500;
}

.seiun-title {
    font-size: 2rem;
}

/* ----------------------------------------------
 * ハンバーガーメニュー
 * ---------------------------------------------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: var(--primary-blue-start);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    position: relative;
    transform-origin: center;
}

.hamburger.active span:first-child {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger.active span:last-child {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* ----------------------------------------------
 * ナビゲーション
 * ---------------------------------------------- */
.nav-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-bottom: 1px solid var(--glass-border-color);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 999;
    transition: all 0.3s ease;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-item {
    flex-shrink: 0;
}

.nav-link {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-blue-start);
    background: rgba(255, 255, 255, 0.3);
}

.nav-link.active {
    color: var(--primary-blue-start);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

@media (min-width: 992px) {
    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        overflow-x: visible;
    }
}

.additional-nav {
    background: rgba(242, 242, 247, 0.3);
    padding: 0.5rem 0;
}

.additional-nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    font-size: 0.875rem;
}

.additional-nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin-right: 1.5rem;
    transition: color 0.3s ease;
}

.additional-nav a:hover {
    color: var(--primary-blue-start);
}

/* ----------------------------------------------
 * モバイルナビゲーション
 * ---------------------------------------------- */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .seiun-title {
        display: none;
    }

    .nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--glass-bg);
        backdrop-filter: var(--glass-saturate) var(--glass-blur);
        -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
        border-left: 1px solid var(--glass-border-color);
        transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: none;
        overflow-y: auto;
    }

    .nav-container.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        padding-top: var(--mobile-nav-padding-top);
        padding-bottom: 2rem;
    }

    .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        font-size: 1rem;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.2);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .overlay.active {
        display: block;
        opacity: 1;
    }
}

/* ----------------------------------------------
 * メインコンテンツ
 * ---------------------------------------------- */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 280px 1fr;
    }
}

.content-area {
    min-width: 0;
}

/* ----------------------------------------------
 * サイドバー
 * ---------------------------------------------- */
.sidebar {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--soft-shadow);
    padding: 1.5rem;
    height: fit-content;
    transition: all 0.4s ease;
}

.sidebar:hover {
    box-shadow: var(--soft-shadow-hover);
    transform: translateY(-5px);
}

.sidebar h3 {
    color: var(--primary-blue-start);
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.sidebar-links {
    list-style: none;
    margin-bottom: 2rem;
}

.sidebar-links li {
    margin-bottom: 0.5rem;
}

.sidebar-links a {
    display: block;
    padding: 0.75rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sidebar-links a:hover {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-blue-start);
    transform: translateX(4px);
}

.cta-button {
    display: block;
    background: var(--primary-gradient);
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
}

.contact-card {
    background: rgba(0, 122, 255, 0.05);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--soft-shadow);
    padding: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.8;
}

.contact-card a {
    color: var(--primary-blue-start);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--primary-blue-end);
}

/* ----------------------------------------------
 * コンテンツセクション
 * ---------------------------------------------- */
.content-section {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    padding: 3rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.6s ease;
}

@media (max-width: 767px) {
    .content-section {
        padding: 2rem 1.5rem;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid;
    border-image: var(--primary-gradient) 1;
    display: block;
}

.content-text {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1rem;
}

/* ----------------------------------------------
 * news/index.html専用スタイル（他のページと統一）
 * ---------------------------------------------- */
.content-section.index-style {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--soft-shadow);
    padding: 2rem;
    transition: all 0.4s ease;
}

.content-section.index-style:hover {
    box-shadow: var(--soft-shadow-hover);
    transform: translateY(-5px);
}

.section-title.index-style {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--text-gradient-up);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid;
    border-image: var(--primary-gradient) 1;
    display: inline-block;
}

.content-with-image {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 768px) {
    .content-with-image {
        grid-template-columns: 1fr 300px;
    }
}

.image-container {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--soft-shadow);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.facility-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--soft-shadow);
    padding: 2rem;
    transition: all 0.4s ease;
}

.facility-card:hover {
    box-shadow: var(--soft-shadow-hover);
    transform: translateY(-5px);
}

.facility-card h4 {
    color: var(--primary-blue-start);
    margin-bottom: 0.5rem;
}

.facility-card ul {
    padding-left: 20px;
    margin-top: 1rem;
}

.content-subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 1rem 0;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

/* ----------------------------------------------
 * ニュース記事専用スタイル (NYT風)
 * ---------------------------------------------- */
.news-article {
    margin-top: 2rem;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.article-date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0 0 1rem 0;
    font-weight: 400;
    display: block;
    font-style: normal;
}

.article-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@media (max-width: 767px) {
    .article-title {
        font-size: 2.125rem;
    }

    .news-article {
        max-width: 100%;
    }
}

/* ----------------------------------------------
 * 画像ギャラリー
 * ---------------------------------------------- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    background: var(--glass-bg);
}

.gallery-item:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: var(--soft-shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem;
    font-size: 0.875rem;
    text-align: center;
    font-weight: 500;
}

/* NYTスタイル記事画像 */
.article-image {
    margin: 2rem 0;
    width: 100%;
}

.article-image img {
    width: 100%;
    max-height: 500px;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.article-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
    text-align: left;
}

@media (max-width: 767px) {
    .article-image {
        margin: 2rem 0;
        width: 100%;
    }

    .article-image img {
        width: 100%;
        max-width: 100%;
        max-height: none;
        height: auto;
        border-radius: 0;
        aspect-ratio: auto;
        object-fit: contain;
    }

    .article-image figcaption {
        padding: 0 1rem;
    }
}

/* NYTスタイル導入文 */
.article-lead {
    font-size: 1.25rem;
    line-height: 1.75;
    color: var(--text-dark);
    margin: 2rem 0;
    font-weight: 400;
}

/* NYTスタイル段落 */
.news-article p {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: #333;
    margin: 1.75rem 0;
    font-weight: 400;
}

.news-article h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2.5rem 0 1rem 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.news-article h4 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

/* イベントボックス */
.event-box {
    padding: 1.5rem 0;
    margin: 2rem 0;
    border: none;
    background: none;
}

.event-box h4 {
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.event-time {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 400;
    display: block;
}

.event-box p {
    margin: 0.5rem 0 0 0;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #333;
}

/* 記事フッター */
.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.article-footer p {
    font-size: 0.9375rem;
    margin: 1rem 0;
    color: var(--text-light);
    line-height: 1.6;
}

/* ----------------------------------------------
 * パンくずリスト
 * ---------------------------------------------- */
.breadcrumb {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: 12px;
    border: 1px solid var(--glass-border-color);
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.breadcrumb li::after {
    content: "›";
    margin: 0 0.5rem;
    color: var(--text-light);
}

.breadcrumb li:last-child::after {
    content: "";
}

.breadcrumb a {
    color: var(--primary-blue-start);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary-blue-end);
}

.breadcrumb li[aria-current="page"] {
    color: var(--text-light);
}

/* ----------------------------------------------
 * ソーシャルシェアボタン
 * ---------------------------------------------- */
.social-share {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border-color);
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.social-share h4 {
    color: var(--primary-blue-start);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.social-share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.share-button.twitter {
    background: #1DA1F2;
}

.share-button.facebook {
    background: #4267B2;
}

.share-button.line {
    background: #00B900;
}

/* ----------------------------------------------
 * 記事ナビゲーション
 * ---------------------------------------------- */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    margin: 3rem 0 2rem 0;
    align-items: center;
}

.article-navigation a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: 12px;
    border: 1px solid var(--glass-border-color);
    color: var(--primary-blue-start);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.article-navigation a:hover {
    background: rgba(0, 122, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--soft-shadow);
}

.article-navigation .article-list {
    background: var(--primary-gradient);
    color: white;
}

.article-navigation .article-list:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.3);
}

@media (max-width: 767px) {
    .article-navigation {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------
 * キャッシュクリア注釈（元のデザイン維持）
 * ---------------------------------------------- */
/* インラインスタイルで記述されているため、CSSでは最小限のサポートのみ */

/* スマホでのキャッシュクリア注釈のレスポンシブ対応 */
@media (max-width: 767px) {
    .cache-instructions-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ----------------------------------------------
 * イベント情報ボックス（元のデザイン維持）
 * ---------------------------------------------- */
/* インラインスタイルで記述されているため、CSSでは最小限のサポートのみ */

/* ----------------------------------------------
 * Instagram関連
 * ---------------------------------------------- */
.instagram-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 4px;
    font-size: 0.875rem;
}

.instagram-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(188, 24, 136, 0.3);
    color: white;
    text-decoration: none;
}

.instagram-icon {
    margin-right: 6px;
    font-size: 1rem;
}

.instagram-cta {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.instagram-cta h3 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.instagram-cta p {
    margin-bottom: 1.25rem;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.9375rem;
}

.instagram-large-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.instagram-large-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(188, 24, 136, 0.3);
    color: white;
    text-decoration: none;
}

/* ----------------------------------------------
 * フッター
 * ---------------------------------------------- */
.footer {
    background: var(--text-dark);
    color: #d1d1d6;
    padding: 3rem 1rem 1rem;
    margin-top: 4rem;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.footer-section p {
    color: #d1d1d6;
    line-height: 1.8;
}

.footer-section a {
    color: #8e8e93;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-blue-end);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #3a3a3c;
    color: #8e8e93;
    font-size: 0.875rem;
}

/* ----------------------------------------------
 * ニュースアーカイブ（バックナンバーページ用）
 * ---------------------------------------------- */
.news-archive {
    display: grid;
    gap: 2rem;
}

.year-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--soft-shadow);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.year-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--soft-shadow-hover);
}

.year-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue-start);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
    border-image: var(--primary-gradient) 1;
}

.news-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.news-link {
    display: block;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.news-link:hover {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary-blue-start);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2);
}

/* ----------------------------------------------
 * 記事一覧用スタイル（個別記事ページ用）
 * ---------------------------------------------- */
.news-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    display: grid;
    gap: 1rem;
}

.news-list li {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-saturate) var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-saturate) var(--glass-blur);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border-color);
    box-shadow: var(--soft-shadow);
    padding: 1.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.news-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 0 4px 4px 0;
}

.news-list li:hover {
    box-shadow: var(--soft-shadow-hover);
    transform: translateY(-5px) scale(1.02);
}

.news-list a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    display: block;
    font-size: 1rem;
    line-height: 1.6;
    transition: all 0.3s ease;
    position: relative;
}

.news-list a:hover {
    background: var(--text-gradient-up);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 日付部分のスタイル */
.news-list a::after {
    content: attr(data-date);
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 400;
    background: rgba(0, 122, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.news-list li:hover a::after {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.05);
}

/* ----------------------------------------------
 * バックナンバーリンク
 * ---------------------------------------------- */
.backnumber-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue-start);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-bottom: 2rem;
}

.backnumber-link:hover {
    color: var(--primary-blue-end);
}

.backnumber-link::after {
    content: "→";
    transition: transform 0.3s ease;
}

.backnumber-link:hover::after {
    transform: translateX(3px);
}

/* ----------------------------------------------
 * 青雲寮だよりサンプルセクション
 * ---------------------------------------------- */
.sample-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.sample-content {
    order: 1;
}

.sample-image-container {
    max-width: 350px;
    order: 2;
}

.sample-image {
    border: 4px solid var(--primary-blue-start);
    width: 100%;
    height: auto;
}

.sample-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* ----------------------------------------------
 * モバイル対応
 * ---------------------------------------------- */
@media (max-width: 767px) {
    .content-section {
        padding: 1rem 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .sidebar {
        order: 2;
        margin: 0 1rem;
    }

    .main-content {
        margin-top: 1rem;
        padding: 0;
    }

    /* index.html用のコンテンツセクション */
    .content-section.index-style {
        margin: 0 1rem 2rem 1rem;
    }

    /* 記事ページ用のコンテンツセクション */
    .content-area > .content-section {
        margin: 0 1rem 2rem 1rem;
    }

    /* テキストコンテンツにパディングを追加 */
    .content-text,
    .article-date,
    .article-title,
    .article-lead,
    .news-article p,
    .news-article h3,
    .news-article h4,
    .news-article ul,
    .news-article ol,
    .section-title,
    .backnumber-link {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .article-date {
        font-size: 1.125rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

    /* 画像ギャラリーのモバイル最適化 */
    .image-gallery {
        margin: 2rem 0;
        width: 100%;
        gap: 0;
        grid-template-columns: 1fr;
    }

    .gallery-item {
        border-radius: 0;
    }

    .gallery-item img {
        height: auto;
        aspect-ratio: 3 / 2;
    }

    /* ニュース記事のモバイル最適化 */
    .news-article {
        margin-left: 0;
        margin-right: 0;
    }

    /* Instagram CTA のモバイル最適化 */
    .instagram-cta {
        margin: 2rem 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* 記事フッターのモバイル最適化 */
    .article-footer {
        margin-left: 0;
        margin-right: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* ソーシャルシェアのモバイル最適化 */
    .social-share {
        margin: 2rem 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* パンくずリストのモバイル最適化 */
    .breadcrumb {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* 記事ナビゲーションのモバイル最適化 */
    .article-navigation {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        padding: 0 1rem;
    }

    /* イベントボックスのモバイル最適化 */
    .event-box {
        padding: 1rem;
        margin: 1.5rem 0;
    }

    /* バックナンバー用モバイル対応 */
    .news-list {
        gap: 0.75rem;
    }

    .news-list li {
        padding: 1rem;
    }

    .news-list a::after {
        position: static;
        display: block;
        margin-top: 0.5rem;
        text-align: right;
    }

    /* ニュースアーカイブのモバイル対応 */
    .news-links {
        grid-template-columns: 1fr;
    }

    /* 青雲寮だよりサンプルセクションのモバイル対応 */
    .sample-grid {
        grid-template-columns: 1fr;
    }

    .sample-content {
        order: 2;
    }

    .sample-image-container {
        order: 1;
        max-width: 100%;
    }

    /* facility-cardのモバイル対応 */
    .facility-card {
        margin: 0;
    }

    /* cta-buttonのモバイル対応 */
    .cta-button {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    /* インラインスタイルのバックナンバーボタンも対応 */
    .content-section.index-style > div[style*="text-align: center"] {
        padding: 0 1rem;
    }
}

/* ----------------------------------------------
 * アクセシビリティ
 * ---------------------------------------------- */
:focus {
    outline: 2px solid var(--primary-blue-start);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------------
 * ヒーローセクション（背景画像タイトルバー）
 * ---------------------------------------------- */
.hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-bg.show {
    opacity: 1;
}

.hero-bg-1,
.hero-bg-2 {
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-content h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.25rem;
    opacity: 0.95;
}

@media (max-width: 768px) {
    .hero {
        min-height: 300px;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}

/* ----------------------------------------------
 * ダークモード対応
 * ---------------------------------------------- */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #e0e0e0;
        --text-light: #a0a0a0;
        --text-lighter: #707070;
        --glass-bg: rgba(30, 30, 30, 0.75);
        --glass-border-color: rgba(255, 255, 255, 0.1);
    }

    body {
        background-color: #121212;
        color: var(--text-dark);
    }

    .content-section {
        background: #1a1a1a;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .content-section.index-style, .sidebar, .facility-card, .contact-card {
        background: rgba(30, 30, 30, 0.75);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .hero {
        color: #ffffff;
    }

    .footer {
        background: #0a0a0a;
        color: #d1d1d6;
    }

    .footer-section h3 {
        color: #ffffff;
    }

    .nav-link, .sidebar-links a, .additional-nav a {
        color: var(--text-dark);
    }

    .nav-link:hover, .sidebar-links a:hover {
        background: rgba(0, 122, 255, 0.2);
    }

    .contact-card {
        background: rgba(0, 122, 255, 0.1);
    }

    .news-article p, .news-article h3, .news-article h4,
    .content-subtitle, .article-title, .article-lead {
        color: var(--text-dark);
    }

    .breadcrumb, .social-share {
        background: rgba(30, 30, 30, 0.75);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .year-section, .news-list li {
        background: rgba(30, 30, 30, 0.75);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .news-link {
        background: rgba(40, 40, 40, 0.5);
        border-color: rgba(255, 255, 255, 0.05);
    }

    .news-link:hover {
        background: rgba(0, 122, 255, 0.2);
    }

    .article-navigation a {
        background: rgba(30, 30, 30, 0.75);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .instagram-cta {
        background: #1a1a1a;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .event-box h4, .event-box p {
        color: var(--text-dark);
    }
}
