@charset "UTF-8";

/* ===============================
   Global Design Concept (共通)
   - Style: Minimal, academic, compact header
   - Main color: vivid orange (#ff7a00)
   - Accent: deep blue (#004ea1)
================================= */

:root {
  --main-orange: #ff7a00;
  --light-orange: #ffb266;
  --accent-blue: #004ea1; /* アクセントカラー */
  --light-blue: #e0f7fa; /* 薄い水色 */
  --bg-white: #fafafa;
  --text-main: #333;
  --max-width: 960px;
  --content-padding: 1.5rem;
  --font-jp: "Noto Sans JP", "Hiragino Sans", "Meiryo", sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-jp);
  color: var(--text-main);
  background: var(--bg-white);
  line-height: 1.7;
}

/* ヒーロー背景（下層ページでは不要） */
.hero-bg, .hero-overlay {
    display: none !important;
}

/* ===============================
   Header & Navigation Container (Mobile Default)
================================= */

/* モバイルではナビゲーションとヘッダーを縦に並べる */
nav.global {
    background: var(--accent-blue); /* モバイルナビにビビッドなブルー */
    padding: 0.5rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav.global ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 0.2rem 1rem;
}

nav.global a {
    color: #fff;
    background: transparent;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

nav.global a:hover, nav.global li.current a {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* ヘッダーコンテナ (大会情報とページタイトル) */
header {
    position: relative;
    background: linear-gradient(135deg, var(--main-orange), #ff9933);
    color: #fff;
    padding: var(--content-padding);
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* 幾何学パターン */
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
      -45deg,
      rgba(255, 255, 255, 0.1) 0px,
      rgba(255, 255, 255, 0.1) 1px,
      transparent 1px,
      transparent 50px
    );
  opacity: 0.5;
  z-index: 0;
}

/* 大会情報ロゴ部分 */
header .logo {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 1rem;
}

/* 大会名 */
header .title {
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  letter-spacing: 0.05em;
  margin: 0;
}

header .title span[lang="en"] {
    display: block;
    font-size: 0.6em;
    font-weight: 400;
    opacity: 0.8;
}

/* テーマ */
header .theme {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  line-height: 1.4;
  font-weight: 500;
  max-width: 95%;
  margin: 0.5rem auto 0.5rem;
}

header .theme .sub-theme {
  display: block;
  font-size: 0.9em;
  color: #ffebcc;
  margin-top: 0.3rem;
  font-weight: 400;
}

/* 開催期間 */
header .period {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

/* ページタイトル (h1) */
header h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--light-blue); /* ヘッダーの目立つ色 */
    margin: 0;
    padding: 0.5rem 0;
    position: relative;
    z-index: 1;
}

/* ===============================
   Main Content
================================= */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--content-padding);
  background: #fff;
  position: relative;
}

/* H2 (セクションタイトル) */
main h2 {
  border-left: 5px solid var(--main-orange);
  padding-left: 0.6rem;
  margin-bottom: 1.5rem;
  color: var(--main-orange);
  font-weight: 700;
  font-size: 1.6rem;
}

/* 定義リスト */
main dl>dd+dt {
  margin-top: 1rem;
}
main dl>dt::before {
  content: "【";
}
main dl>dt::after {
  content: "】";
}


/* 目立つボックス */
ul.embox {
    list-style: none;
}

ul.embox a:link {
  display: block;
  margin: 1rem 0;
  background: var(--light-blue); 
  color: var(--accent-blue);
  border-radius: 8px;
  border: 3px solid var(--accent-blue); /* 実線にしてビビッドに */
  font-weight: 700;
  text-align: center;
  padding: 1.5rem;
  height: 100%;
}

/* 入れ子の場合カラーリングを変える */
li > ul.embox a:link {
    color: var(--main-orange);
    border: 3px solid var(--main-orange);
    background: #ffF2A6; 
    border-radius: 8px;
}

ul.embox a:hover,
ul.embox a:active {
  background-color: white !important;
  color: var(--accent-blue) !important;
}

/* 会場情報テキスト */
.venue-address .em-text {
    font-weight: 700;
    color: var(--accent-blue);
}
.venue-notes {
    padding-left: 1.5rem;
    list-style: disc;
}

.map-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.map-note {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.access-info dt {
    font-weight: 700;
    color: var(--main-orange);
    margin-top: 1rem;
    border-bottom: 1px dashed #f7e0ce;
}

.access-info dd {
    margin: 0.5rem 0 1.5rem 1rem;
    padding-left: 0.5rem;
}

.access-info img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.access-info figcaption {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-light);
}

/* ===============================
   Footer (共通)
================================= */

footer {
  background: #222;
  color: #ddd;
  padding: 2.5rem var(--content-padding);
  font-size: 0.9rem;
  line-height: 1.6;
}

footer h2 {
  color: #fff;
  font-size: 1.1rem;
  border-left: 4px solid var(--light-orange);
  padding-left: 0.6rem;
}

footer .office-name {
  color: var(--light-orange);
  font-weight: 600;
}

footer .email {
    color: var(--light-blue);
}

footer .society {
  text-align: center;
  margin-top: 2rem;
}

footer a[href="https://square.umin.ac.jp/medsocio/"]::after {
  content: none;
}

footer img {
  max-height: 48px;
  max-width: 100%;
  vertical-align: middle;
  background-color: white;
  border-radius: 0.5em;
}


/* ===============================
   PC/Desktop Styles (Min-width 1024px)
   - NavとHeaderを左右に配置
================================= */

@media (min-width: 1024px) {
  
  body {
    display: grid;
    /* nav, header, main, footer を配置するためのグリッド */
    grid-template-columns: minmax(180px, 20%) 1fr; /* 左サイドバー(ナビ)とメインコンテンツ */
    grid-template-rows: auto 1fr auto; /* header, main, footer */
    grid-template-areas: 
        "nav-area header-area"
        "nav-area main-area"
        "nav-area footer-area";
  }

  /* ナビゲーションを左サイドに固定 */
  nav.global {
    grid-area: nav-area;
    position: sticky;
    top: 0;
    height: 100vh; /* 画面いっぱいに広げる */
    background: var(--accent-blue);
    padding: 2rem 0;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    z-index: 20;
  }
  
  nav.global ul {
    flex-direction: column; /* 縦並び */
    align-items: flex-start;
    gap: 0;
  }
  
  nav.global li {
      width: 100%;
  }

  nav.global a {
    display: block;
    width: 100%;
    padding: 1rem var(--content-padding);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    font-weight: 600;
    box-sizing: border-box;
  }
  
  nav.global a:hover, nav.global li.current a {
    background: var(--main-orange); /* ホバーと選択中アイテムをオレンジに */
    color: #fff;
    box-shadow: none;
  }

  /* ヘッダーコンテナ (大会情報とページタイトル) */
  header {
    grid-area: header-area;
    height: 120px; /* PCでのヘッダーの高さを固定 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--content-padding);
    text-align: left;
    background: linear-gradient(90deg, var(--main-orange), #ff9933); /* 横長のグラデーション */
    position: relative;
  }

  /* 幾何学パターンを微調整 */
  header::before {
      opacity: 0.3;
  }
  
  /* 大会ロゴ・情報部分を左側へ */
  header .logo {
    flex-shrink: 0;
    border-bottom: none;
    padding: 0;
    margin: 0;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  header .title {
      font-size: 1.2rem;
  }

  header .title span[lang="en"] {
    font-size: 1em;
  }
  
  header .theme, header .period {
      display: none; /* テーマと期間はトップページに任せ、サブページでは非表示 */
  }

  /* ページタイトルを右側へ大きく配置 */
  header h1 {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background: var(--accent-blue); /* ページタイトル部分をアクセントブルーで強調 */
    padding: 0.5rem 1.5rem;
    border-radius: 0 0 0 8px; /* 右上の角を丸く */
    box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.3);
  }

  /* メインコンテンツエリア */
  main {
    grid-area: main-area;
    padding: 4rem var(--content-padding);
  }
  
  /* フッターエリア */
  footer {
    grid-area: footer-area;
    display: flex;
    justify-content: space-around;
  }
  
  
}

/* ===============================
   Print Styles (共通) - 読みやすさ最優先
================================= */
@media print {
  body {
    display: block !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  /* ナビゲーションとフッターのロゴを非表示 */
  nav.global, footer .society {
    display: none !important;
  }

  header {
    background: #fff !important;
    color: #000 !important;
    height: auto !important;
    min-height: auto !important;
    border-bottom: 3px solid #000;
    padding: 1cm !important;
    display: block !important;
    text-align: center !important;
    box-shadow: none !important;
  }
  
  header::before {
    content: none !important; 
  }
  
  header .logo {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0.5rem !important;
  }

  header .title {
    color: #000 !important;
    font-size: 1.4rem !important;
  }
  header .title span[lang="en"], header .theme, header .period {
    display: block !important;
    font-size: 0.9rem !important;
    color: #333 !important;
  }

  /* ページタイトル */
  header h1 {
    color: #000 !important;
    background: none !important;
    text-shadow: none !important;
    font-size: 1.8rem !important;
    padding: 0 !important;
  }

  main {
    padding: 1cm !important;
    max-width: none !important;
  }

  main h2 {
    color: #000 !important;
    border-left: 5px solid #000 !important;
  }

  .map-note:after {
      content: " (リンク先URL: " attr(href) ")";
      font-size: 9pt;
      word-break: break-all;
      color: #666;
  }

  footer, footer * {
    background: #fff !important;
    color: #000 !important;
  }

  footer {
    border-top: 1px solid #000;
  }
  
  footer .society {
    text-align: left;
  }  
}
