/* --- Global Styles & Variables --- */
:root {
    --base-color: #4A90E2;
    --primary-color: var(--base-color);
    --secondary-color: #357ABD;

    /* イベントカテゴリのアクセントカラー */
    --accent-tomidaisai: #4a9ff5;   /* 富大祭運営員会 */
    --accent-gakunai: #7fbd90;      /* 学内団体 */
    --accent-gakugai: #e0aff4;      /* 学外団体 */
    --accent-ceremony: #7f8c8d;     /* 式典 */

    --background-color: #f4f8fb;
    --card-background-color: #ffffff;
    --text-color: #333740;
    --light-text-color: #6c757d;
    --border-color: #dce4ec;
    --font-primary: 'Roboto', 'Noto Sans JP', sans-serif;
    --font-secondary: 'Noto Sans JP', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 3px 8px rgba(0,0,0,0.09);
    --border-radius: 6px;
}

/* アイコンフォント */
@font-face {
  font-family: 'MaterialIcons';
  src: local('Material Icons'), local('MaterialIcons-Regular');
}
.icon-time::before { content: "🕒"; margin-right: 6px; }
.icon-group::before { content: "👥"; margin-right: 6px; }
.icon-info::before { content: "ℹ️"; margin-right: 6px; }


body {
    font-family: var(--font-primary);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Header & Navigation --- */
.site-header {
    text-align: center;
    margin-bottom: 35px;
    padding: 20px 15px;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* ページタイトル */
.site-header h1 {
    font-family: var(--font-secondary);
    color: var(--text-color);
    font-size: 2.6em;
    margin: 0 0 20px 0;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 8px;
}

/* 「1日目」「2日目」のナビゲーションコンテナ */
.day-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

/* ナビゲーションボタンのスタイル */
.nav-button { 
    padding: 10px 22px;
    font-size: 1.05em;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--card-background-color);
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.nav-button:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.nav-button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}

/* --- タイムテーブル (メインエリア) --- */
.timetable-main h2 {
    font-family: var(--font-secondary);
    text-align: center;
    color: var(--secondary-color);
    font-size: 2.2em;
    margin-bottom: 30px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}
.date-display {
    font-size: 0.7em;
    color: var(--light-text-color);
    font-weight: 400;
    display: block;
    margin-top: 5px;
}

.day-timetable {
    display: none;
    background-color: var(--card-background-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}
.day-timetable.active {
    display: block;
}

.locations-wrapper {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.location-column {
    flex: 1;
    min-width: 320px;
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.location-column h3 {
    text-align: center;
    background: var(--secondary-color);
    color: white;
    padding: 18px 15px;
    margin: 0;
    font-size: 1.5em;
    font-weight: 500;
}

.timeline {
    position: relative;
    padding-left: 60px;
    box-sizing: border-box;
    background-image: linear-gradient(to bottom, #e9eef2 1px, transparent 1px);
    background-size: 100% calc(var(--slot-height, 12px) * 12);
}

.time-label {
    position: absolute;
    left: 0px;
    width: 50px;
    text-align: right;
    font-size: 0.75em;
    color: var(--light-text-color);
    transform: translateY(-50%);
    font-weight: 500;
    padding-right: 10px;
}

/* イベントブロックのスタイル */
.event-block {
    position: absolute;
    left: 65px;
    right: 10px;
    background-color: var(--card-background-color);
    border-radius: 6px;
    padding: 8px 12px;
    box-sizing: border-box;
    font-size: 0.85em;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.25s ease-in-out;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 5px solid var(--light-text-color);
}

.event-block:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
    z-index: 15;
}

.event-block .time {
    font-weight: 500;
    font-size: 0.9em;
    color: var(--light-text-color);
    margin-bottom: 4px;
}

.event-block .name {
    font-weight: 700;
    font-size: 1.05em;
    color: var(--text-color);
    line-height: 1.3;
}

/* Event Categories - Accent Colors */
.event-block.category-gakusai {
    border-left-color: var(--accent-gakusai);
}
.event-block.category-gakunai {
    border-left-color: var(--accent-gakunai);
}
.event-block.category-gakugai {
    border-left-color: var(--accent-gakugai);
}
.event-block.category-ceremony {
    border-left-color: var(--accent-ceremony);
}


/* --- Popup Modal Styles --- */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(40, 60, 80, 0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    padding: 15px;
    box-sizing: border-box;
}
.popup-overlay.visible {
    display: flex;
    opacity: 1;
}

.popup-window {
    background-color: var(--card-background-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    width: 90%;
    max-width: 600px;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.25s ease-out;
    position: relative;
}
.popup-overlay.visible .popup-window {
    transform: scale(1);
    opacity: 1;
}

.popup-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.popup-content {
    padding: 25px 30px;
    text-align: left;
}

.popup-title {
    font-family: var(--font-secondary);
    font-size: 2em;
    color: var(--base-color);
    margin: 0 0 20px 0;
    font-weight: 700;
    line-height: 1.3;
}

.popup-detail {
    font-size: 1.05em;
    color: var(--light-text-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}
.popup-detail strong {
    color: var(--text-color);
    font-weight: 500;
    min-width: 80px;
}
.popup-detail i {
    color: var(--base-color);
    margin-right: 10px;
    font-size: 1.3em;
}

.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.8);
    border: none;
    color: var(--text-color);
    font-size: 1.8em;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
    box-shadow: var(--shadow-sm);
}
.popup-close-btn:hover {
    background-color: var(--base-color);
    color: white;
    transform: rotate(90deg);
}

/* ハンバーガーメニュー */
/* hamburger(ハンバーガーアイコン) */
.hamburger {
  position: fixed;
  right: 20px;
  top: 20px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 300;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.hamburger__line {
  position: absolute;
  width: 22px;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.5s;
}

.hamburger__line--1 {
  top: 14px;
}

.hamburger__line--2 {
  top: 21px;
}

.hamburger__line--3 {
  top: 28px;
}

.open .hamburger__line--1 {
  transform: rotate(-45deg);
  top: 21px;
}

.open .hamburger__line--2 {
  opacity: 0;
}

.open .hamburger__line--3 {
  transform: rotate(45deg);
  top: 21px;
}

/* sp-nav(ナビ) */
.sp-nav {
  position: fixed;
  right: -100%;
  top: 0;
  width: 70%;
  max-width: 320px;
  height: 100vh;
  background-color: var(--card-background-color);
  transition: all 0.5s;
  z-index: 200;
  overflow-y: auto;
  box-shadow: -4px 0 10px rgba(0,0,0,0.1);
}

.open .sp-nav {
  right: 0;
}

.sp-nav ul {
    list-style: none;
    padding: 80px 0 20px 0;
    margin: 0;
}
.sp-nav li a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    padding: 18px 25px;
    font-size: 1.1em;
    font-weight: 500;
    transition: background-color 0.2s;
}
.sp-nav li a:hover {
    background-color: var(--background-color);
}

/* black-bg(ハンバーガーメニュー解除) */
.black-bg {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100;
  background-color: rgba(40, 60, 80, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s;
  cursor: pointer;
}

.open .black-bg {
  opacity: 1;
  visibility: visible;
}