/* ==========================================================================
   全体設定
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    background-color: #f7f9fa;
    color: #333333;
    line-height: 1.6;
}

/* ==========================================================================
   ヘッダー（背景画像）
   ========================================================================== */
.header {
    background-image: url("header-bg.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
}

.header-overlay {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 60px 16px;
    text-align: center;
}

.site-subtitle {
    font-size: 2.0rem;            /* タイトルより一回り小さいサイズ */
    font-weight: bold;
    letter-spacing: 0.1em;        /* 文字の間隔を少し広げて読みやすく */
    margin-bottom: 6px;           /* 下のタイトルとの間の隙間 */
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6); /* タイトル同様、文字の影 */
}

.site-title {
    font-size: 3.0rem;
    font-weight: bold;
    letter-spacing: 0.05em;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

/* ==========================================================================
   メインレイアウト・コンテンツ枠
   ========================================================================== */
.main-container {
    padding: 24px 16px;
    max-width: 600px;
    margin: 0 auto;
}

section {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

section h2 {
    font-size: 1.2rem;
    border-left: 4px solid #1a365d;
    padding-left: 8px;
    margin-bottom: 16px;
    color: #1a365d;
}

/* 各セクションの個別マージン調整（行間を狭くする） */
.year-section {
    margin-bottom: 12px; /* 「２０２６年度」と「お知らせ」の間を狭く */
}

.news-section {
    margin-bottom: 12px; /* 「お知らせ」と「フッター」の間を狭く */
}

/* ==========================================================================
   Googleカレンダーのスマホ最適化（修正版）
   ========================================================================== */
.calendar-wrapper {
    width: 100%;
    height: 450px; /* ★高さを450pxに固定して、カレンダーがしっかり縦に広がるようにしました */
    margin-bottom: 10px;
    border: 1px solid #cccccc; /* 枠線をうっすらつけて見やすく */
    border-radius: 4px;
    overflow: hidden;
}

.calendar-wrapper iframe {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   メニューボタン（スマホ向け縦1列）
   ========================================================================== */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.menu-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f4f8;
    color: #1a365d;
    padding: 16px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid #bcccdc;
    min-height: 54px;
    font-size: 1.2rem;
}

.menu-card:active {
    background-color: #d9e2ec;
}

/* サブページ内のPDFボタン用（少しだけ見た目を変えてスッキリさせています） */
.pdf-btn {
}
.pdf-btn:active {
    background-color: #eeeeee;
}

/* ==========================================================================
   サブページ専用のスタイル（戻るボタン）
   ========================================================================== */
.back-link-wrapper {
    text-align: center;
    border-top: 1px dashed #e0e0e0;
    padding-top: 20px;
    margin-top: 20px;
}

.btn-back {
    display: inline-block;
    background-color: #f5f5f5;
    color: #1a365d;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.95rem;
    border: 1px solid #dddddd;
    font-weight: bold;
}

.btn-back:active {
    background-color: #e0e0e0;
}


/* ==========================================================================
   通知欄（お知らせ用インラインフレーム）
   ========================================================================== */
.news-wrapper {
    width: 100%;
    height: 110px; /* 💡 約4行分の高さに固定します */
    border: 1px solid #dddddd;
    border-radius: 4px;
    overflow: hidden; /* ★二重スクロールバー防止のため、外枠のスクロールをカット（内部のiframeに任せる） */
    -webkit-overflow-scrolling: touch; /* スマホでツルツルと滑らかにスクロールさせる設定 */
}

.news-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   フッター
   ========================================================================== */
.footer {
    text-align: center;
    padding: 45px 16px; /* 上下の余白（高さの確保） */
    
    background-image: url("header-bg.png");
    
    /* ★ここを変更：横幅が狭いスマホでも、画像の高さを100%（または固定px）に保ち、
       パソコンの時と同じような拡大率（見え方）を維持します */
    background-size: auto 350%; 
    
    /* 左右中央、下辺を基準に配置 */
    background-position: center bottom;
    background-repeat: no-repeat;
    
    position: relative;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.25); 
}

.footer p {
    font-size: 1.3rem;        
    font-weight: bold;        
    color: #ffffff;           
    margin: 0;
    letter-spacing: 0.05em;   
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6); 
}

/* ==========================================================================
   桜の花吹雪（スクロール対応版）
   ========================================================================== */

/* 桜が途中で消えるのを防ぐため、大元のbodyとhtmlに基準を設定 */
html, body {
    position: relative;
    min-height: 100%;
}

/* ページ全体の最上部から最下部までを覆う透明なエリア */
.sakura-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* ボタンのクリックを邪魔しない */
    overflow: hidden;
    z-index: 9999;
}

/* 桜の花びらの基本形 */
.sakura-petal {
    position: absolute;
    background: #7ebeab; /* 桜色のピンク #ffb7c5   夏は若草色 #7ebeab  秋は紅葉色 #c94026  冬は雪の白 #ffffff  */
    border-radius: 150% 0 150% 150% / 150% 0 150% 150%;
    opacity: 0.8;
    animation: fall linear infinite;
}

/* 1枚ずつの動き（大きさ、位置、速度、揺れ方を変える） */
.sakura-petal:nth-child(1) { width: 12px; height: 9px;  left: 10%; animation-duration: 14s; animation-delay: 0s; }
.sakura-petal:nth-child(2) { width: 16px; height: 12px; left: 30%; animation-duration: 18s; animation-delay: 4s; }
.sakura-petal:nth-child(3) { width: 10px; height: 8px;  left: 50%; animation-duration: 12s; animation-delay: 2s; }
.sakura-petal:nth-child(4) { width: 14px; height: 11px; left: 70%; animation-duration: 16s; animation-delay: 6s; }
.sakura-petal:nth-child(5) { width: 12px; height: 9px;  left: 85%; animation-duration: 20s; animation-delay: 1s; }

/* ひらひらと最下部まで舞い落ちるアニメーション */
@keyframes fall {
    0% {
        top: 0px; /* ページの最上部からスタート */
        transform: translateX(0) rotate(0deg);
    }
    50% {
        transform: translateX(40px) rotate(180deg);
    }
    100% {
        /* 💡 calc(100% - 20px) にすることで、見えない画面外ではなく、
           ページの本当の最下部（底面）のギリギリ手前まで降らせます */
        top: calc(100% - 20px);
        transform: translateX(-10px) rotate(360deg);
    }
}