/* ベーススタイル */
body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa; /* よりクリーンで明るいグレー */
    margin: 0;
    padding: 0;
}

/* スマホ用改行 */
.sp-br {
    display: none;
}

@media screen and (max-width: 768px) {
    .sp-br {
        display: block;
    }
}

/* ヘッダー */
header {
    /* 紫紺とシアンを少し明るくした爽やかなグラデーション */
    background: linear-gradient(135deg, #2c31a6 0%, #1ec8f2 100%);
    color: white;
    text-align: center;
    padding: 4rem 1rem;
}

/* ヘッダー文字のアニメーション */
@keyframes headerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3); /* 文字をくっきりとさせる */
    opacity: 0;
    animation: headerFadeIn 1s ease-out forwards;
}

header p {
    margin-top: 10px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9); /* opacityの代わりに色で少し透け感を出す */
    opacity: 0;
    animation: headerFadeIn 1s ease-out 0.3s forwards; /* 0.3秒遅れてフワッと現れる */
}

/* ナビゲーションメニュー */
nav {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    justify-content: center;
    padding: 1rem;
    flex-wrap: wrap;
}

nav a {
    color: #1d2088; /* 関西大学紫紺 */
    text-decoration: none;
    margin: 5px 15px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s, color 0.3s;
}

nav a:hover {
    background-color: #00b5e2; /* アクセントカラー（デジタル感のあるシアン） */
    color: white;
}

/* --- ハンバーガーメニュー（スマホ向け設定） --- */
.hamburger {
    display: none; /* PCでは非表示 */
    cursor: pointer;
    padding: 15px 20px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0 5px auto; /* 右寄せ */
    background-color: #1d2088; /* 紫紺 */
    transition: all 0.3s ease-in-out;
}

/* 画面幅が768px以下（スマホ・タブレット）の時の設定 */
@media screen and (max-width: 768px) {
    .hamburger {
        display: block;
    }
    .nav-links {
        display: none; /* 初期状態は隠す */
        flex-direction: column;
        padding: 0 0 15px 0;
    }
    .nav-links.active {
        display: flex; /* ボタンが押されたら表示 */
    }
    nav a {
        margin: 5px 20px;
        text-align: center;
    }
    
    /* メニューが開いた時の「×」アニメーション */
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* メインコンテンツ（カード風レイアウト） */
main {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* --- カウントダウンタイマー --- */
.countdown-section {
    text-align: center;
    margin-bottom: 40px;
}

.countdown-container {
    background: linear-gradient(135deg, #1d2088 0%, #00b5e2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(29, 32, 136, 0.2);
}

.countdown-container h3 {
    margin-top: 0;
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.9;
}

.countdown-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.countdown-item span:first-child {
    font-size: 2.5rem;
    font-weight: bold;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1;
}

.countdown-label {
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0.8;
}

@media screen and (max-width: 480px) {
    .countdown-display {
        gap: 10px;
    }
    .countdown-item {
        min-width: 60px;
    }
    .countdown-item span:first-child {
        font-size: 1.8rem;
    }
}

/* 見出しスタイル */
h2, .category-title {
    background-color: #e6f7fc; /* 薄いシアン背景 */
    border-left: 5px solid #00b5e2; /* 左側にシアンの線 */
    padding: 12px 15px;
    margin-top: 40px;
    color: #1d2088; /* 関西大学紫紺 */
    border-radius: 0 4px 4px 0; /* 右側の角だけ少し丸くして柔らかさを出す */
}

/* --- 共通コンポーネント --- */
.card {
    background-color: #ffffff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 20px 25px;
}
.card-accent {
    border-left: 5px solid #00b5e2; /* シアンのアクセントライン */
}

h2:first-child {
    margin-top: 0;
}

/* フッター */
footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
    background-color: #121455; /* 紫紺よりさらに深いネイビー */
    color: white;
}

.sns-links {
    margin-bottom: 15px;
}

.sns-links a {
    color: #00b5e2; /* シアン色 */
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    transition: color 0.3s;
}

.sns-links a:hover {
    color: white;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- ボタンスタイル --- */
.btn {
    display: inline-block;
    background-color: #ffffff; /* 背景を白に */
    color: #00b5e2; /* 文字色をシアンに */
    padding: 12px 28px;
    text-decoration: none;
    border: 2px solid #00b5e2; /* シアンの枠線 */
    border-radius: 30px; /* 角を丸く */
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #00b5e2; /* ホバー時にシアンで塗りつぶす */
    color: white;
    transform: translateY(-2px); /* ホバー時に少し浮き上がる */
    box-shadow: 0 4px 10px rgba(0, 181, 226, 0.3); /* シアン色の淡い影をつける */
}

.button-container {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 40px; /* ボタンの下にゆったりとした余白を作る */
}

/* --- お知らせ一覧スタイル --- */
.news-list {
    list-style-type: none; /* 先頭の黒丸を消す */
    padding: 0;
}

.news-item {
    margin-bottom: 30px; /* カード同士の隙間を広げてゆったりさせる */
}

.news-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.news-date {
    color: #1d2088;
    background-color: #e6f7fc; /* 薄いシアン背景でバッジ風に */
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.news-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    margin: 0 0 10px 0;
}

.news-content {
    margin: 0;
    color: #444;
}

/* --- テーブル（スケジュール等）のスタイル --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 30px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden; /* テーブルの角を丸くするため */
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background-color: #1d2088; /* 関西大学紫紺 */
    color: white;
    font-weight: bold;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f4fcff; /* マウスを乗せたときにほんのりシアン系の色に */
}

/* --- 企画一覧（カード形式）のスタイル --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    border-top: 4px solid #00b5e2; /* シアンのアクセント */
}

.project-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1d2088; /* 関西大学紫紺 */
    margin-bottom: 10px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 8px;
}

.project-description {
    color: #444;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

/* --- 企画カテゴリーのタイトル --- */
.category-title {
    margin-bottom: 15px;
}

/* --- 開催情報ボックスのスタイル --- */
.info-box p {
    margin: 5px 0;
    font-size: 1.1rem;
}

/* --- アクセスページのスタイル --- */
.access-info-card {
    margin-bottom: 30px;
    border-top: 4px solid #1d2088;
}

.access-info-card h3 {
    color: #1d2088;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.access-info-card h4 {
    color: #00b5e2;
    margin-top: 20px;
    margin-bottom: 5px;
}

.map-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 の比率でマップを表示 */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.map-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* スケジュールヘッダー */
.schedule-header {
    text-align: center;
    margin-bottom: 20px;
}

/* --- タイムライン（スケジュール用）のスタイル --- */
.timeline {
    position: relative;
    max-width: 600px;
    margin: 40px auto;
    padding: 0;
}

/* タイムラインの縦線 */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 80px; /* 時間テキストの横幅に合わせて配置 */
    width: 3px;
    background-color: #00b5e2; /* シアン色 */
}

.timeline-item {
    position: relative;
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
}

/* タイムラインの丸いポインタ */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 74px; /* 縦線の位置に合わせて微調整 */
    top: 15px; /* 高さの微調整 */
    width: 15px;
    height: 15px;
    background-color: #1d2088; /* 紫紺 */
    border-radius: 50%;
    z-index: 1;
}

.timeline-time {
    width: 70px;
    font-weight: bold;
    color: #1d2088;
    text-align: right;
    padding-right: 25px;
    padding-top: 10px;
}

.timeline-content {
    flex: 1;
    padding: 15px 20px; /* 少し小さめの余白で上書き */
    margin-left: 20px;
}

/* タイムラインのスマホ用調整 */
@media screen and (max-width: 480px) {
    .timeline::before { left: 60px; }
    .timeline-item::before { left: 54px; }
    .timeline-time {
        width: 50px;
        font-size: 0.9rem;
        padding-right: 15px;
    }
    .timeline-content {
        margin-left: 15px;
        padding: 10px 15px;
    }
}

/* --- スクロールアニメーション --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- ページトップへ戻るボタン --- */
.page-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #00b5e2; /* シアン */
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
}

.page-top.show {
    opacity: 1;
    visibility: visible;
}

.page-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* --- ローディング画面 --- */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa; /* 背景色に合わせる */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* 一番手前に表示 */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #eee;
    border-top: 5px solid #00b5e2; /* シアン色で回る部分 */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}