/* General Body Styles */
body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
}

.page-title {
    color: #00408b;
    font-size: 2.2em;
    margin-bottom: 10px;
    font-weight: 700;
}

/* 開催期間の「<<BACK 2025年 NEXT>>」を削除したので、ナビゲーションスタイルは不要か簡略化 */
/* .navigation {
    font-size: 1.1em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.nav-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.current-year {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
} */


/* Events List */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-card {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.event-card.today {
    border-color: #007bff;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.2);
    background-color: #e6f2ff; /* Light blue background for today's event */
}

.event-date {
    flex-shrink: 0;
    width: 160px;
    padding: 15px;
    background-color: #f8f9fa;
    border-right: 1px solid #eee;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直方向中央揃え */
    align-items: center;
    font-size: 1em;
    color: #555;
}

.event-card.today .event-date {
    background-color: #cce0ff;
    color: #00408b;
}

/* 日付表示形式の調整 */
.event-date .year {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 5px;
}
.event-date .date {
    font-size: 1.1em; /* 月日を少し大きく */
    font-weight: 600;
    margin-bottom: 0; /* 行間調整 */
}

.event-date .day-of-week {
    font-size: 0.9em;
    color: #777;
    margin-left: 3px; /* 括弧との間隔 */
}

.event-date .day-of-week.saturday {
    color: #007bff; /* Blue for Saturday */
}

.event-date .day-of-week.sunday,
.event-date .day-of-week.tuesday { /* Assuming Tuesday was red in original for some reason */
    color: #dc3545; /* Red for Sunday/Tuesday */
}


.event-details {
    flex-grow: 1;
    padding: 15px 20px;
}

.event-title {
    color: #0056b3;
    font-size: 1.3em;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

.event-details p {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.event-details p:last-child {
    margin-bottom: 0;
}

/* Footer Styles */
footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #777;
}

.footer-link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-card {
        flex-direction: column;
    }

    .event-date {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .page-title {
        font-size: 1.8em;
    }

    /* .navigation は削除されたので不要 */

    .event-details {
        padding: 15px;
    }
}

/* input.php/edit.php 固有のスタイル (admin/input.php, admin/edit.php で共通) */
.form-container {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}
.form-group input[type="date"],
.form-group input[type="text"],
.form-group textarea {
    width: calc(100% - 20px); /* Padding adjustment */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.form-actions {
    text-align: center;
    margin-top: 30px;
    display: flex; /* edit.phpのボタン並び用 */
    justify-content: center; /* edit.phpのボタン並び用 */
    gap: 15px; /* edit.phpのボタン並び用 */
}
.form-actions button {
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.form-actions button:hover {
    background-color: #0056b3;
}
.form-actions .delete-button { /* edit.phpの削除ボタン用 */
    background-color: #dc3545;
}
.form-actions .delete-button:hover { /* edit.phpの削除ボタン用 */
    background-color: #c82333;
}
.back-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: #007bff;
    text-decoration: none;
}
.back-link:hover {
    text-decoration: underline;
}

/* ～ を縦向きにするスタイル */
.vertical-tilde {
    display: inline-block; /* インライン要素をブロック要素のように扱いつつ、テキストフローを維持 */
    writing-mode: vertical-rl; /* 縦書き（右から左） */
    transform: rotate(180deg); /* 必要に応じて文字の向きを調整 */
    font-size: 1.2em; /* 必要に応じてサイズ調整 */
    margin: 5px 0; /* 上下の余白調整 */
    line-height: 1; /* 行の高さを1に設定して詰める */
}

/* レスポンシブ対応 (モバイル向け調整) */
@media (max-width: 768px) {
    .event-date {
        /* Mobile layout changes already handle vertical stacking */
        /* If you want the tilde to remain vertical even when the card stacks,
           this specific media query might need further fine-tuning depending on desired outcome.
           For now, the general .vertical-tilde will apply. */
    }
}

/* デスクトップ版の日付表示をデフォルトで表示 */
.event-date .date-desktop {
    display: block;
}

/* スマホ版の日付表示をデフォルトで非表示 */
.event-date .date-mobile {
    display: none;
}

/* 画面幅が768px以下の時に適用されるスタイル（スマートフォン向け） */
@media (max-width: 768px) {
    /* ログアウトボタンの配置を調整 */
    .logout-button {
        position: static; /* 絶対位置指定を解除し、通常のフローに配置 */
        display: block; /* ブロック要素にして幅を占有 */
        margin: 10px auto; /* 上下にマージン、左右中央寄せ */
        width: fit-content; /* コンテンツの幅に合わせる */
    }

    /* ★追加: ページタイトルのフォントサイズを調整して1行に収まるようにする */
    h1.page-title {
        font-size: 1.5em; /* スマホでの見出しのフォントサイズを小さくする */
        white-space: nowrap; /* テキストが折り返さないようにする */
        overflow: hidden; /* はみ出した部分を隠す */
        text-overflow: ellipsis; /* はみ出した場合に...で表示 */
        padding: 10px 0; /* 上下のパディングを調整 */
    }    
    /* デスクトップ版の日付表示を非表示にする */
    .event-date .date-desktop {
        display: none;
    }

    /* スマホ版の日付表示を表示にする */
    .event-date .date-mobile {
        display: block;
        font-size: 1.1em; /* 日付の文字サイズを調整 */
        text-align: center; /* 中央揃え */
        padding: 5px 0; /* 上下のパディングを調整 */
    }

    /* イベントカードのレイアウトを縦並びにする */
    .event-card {
        flex-direction: column; /* flexアイテムを縦方向に配置 */
        align-items: center; /* 縦方向の中央揃え */
        padding: 15px; /* カード全体のパディングを調整 */
    }

    /* 日付セクションの幅を広げ、下部に余白を追加 */
    .event-date {
        width: 100%;
        margin-bottom: 10px;
        border-right: none; /* デスクトップ版にあった右線を削除 */
        padding-right: 0; /* デスクトップ版にあった右パディングを削除 */
        border-bottom: 1px solid #eee; /* 下に区切り線を追加 */
        padding-bottom: 10px; /* 下パディング */
    }

    /* イベント詳細セクションの幅とテキスト配置を調整 */
    .event-details {
        width: 100%;
        text-align: center; /* テキストを中央揃え */
        padding-left: 0; /* デスクトップ版にあった左パディングを削除 */
    }

    /* イベントタイトルのマージンを調整 */
    .event-details h2.event-title {
        margin-top: 10px;
        margin-bottom: 10px;
    }
    /* ★追加: イベント詳細のテキストを左寄せにする */
    .event-details p {
        text-align: left;
    }    
}