/* 全体のレイアウト */
html {
  font-size: 1em;
  background: var(--primary-bg-color);
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: メイリオ, Meiryo, ヒラギノ角ゴ ProN W3,
    "Hiragino Kaku Gothic ProN", MS Pゴシック, "MS PGothic", MS UI Gothic,
    Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

/* ==========================================================================
  ヘッダーのスタイル
========================================================================== */
header {
  padding: 10px;
}

.logo {
  width: 30%;
  padding: 1rem 0.25rem 0.25rem 1rem;
}

main {
  padding: 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

h2 {
  font-size: var(--font-size-xlarge);
  color: var(--accent-text-color);
}

/* ==========================================================================
TOPロゴ画像
========================================================================== */

.bg_top {
  background: url(../img/bg.jpg);
}

.logomessage_setting {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
番組内容
========================================================================== */
.bangumi-naiyou {
  width: 90%;
  margin: 0 auto;
}

p {
  color: var(--dark-text-color);
  font-weight: 500;
}

/* ==========================================================================
事前 ティザー画像
========================================================================== */
.teaser {
  list-style: none;
  padding: 0;
  margin: 0;
}

.teaser li {
  margin-bottom: 1rem;
  text-align: center;
}

.teaser img {
  max-width: 100%;
  height: auto;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ==========================================================================
放送日時
========================================================================== */
.p-program__date {
  font-size: var(--font-size-large);
  font-weight: bold;
  margin-bottom: 16px;
}

.accent {
  font-size: 1.5em;
  color: var(--accent-text-color);
}

/* ==========================================================================
出演者
========================================================================== */
.cast-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1200px; /* PCでの最大幅 */
  margin: 0 auto;
  padding: 20px;
}

/* 各プロフィール項目 */
.cast-item {
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 名前 */
.cast-item dt {
  margin: 0;
}

/* 画像 */
.cast-item dd {
  font-weight: bold;
  padding: 12px;
  color: var(--primary-text-color);
  background-color: var(--secondary-bg-color);
}

.cast-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
見逃し配信
========================================================================== */
.haishin {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  box-sizing: border-box;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.haishin > ul {
  background-color: #0ea5e9;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  border-radius: 8px;
  flex-shrink: 0;
  font-weight: 500;
  box-sizing: border-box;
  width: 100%;
  max-width: 500px;
}

/* ==========================================================================
フッター
========================================================================== */
footer {
  width: 100%;
  padding: 1em;
  text-align: center;
  background-color: var(--secondary-bg-color);
}

footer p {
  font-size: var(--font-size-base);
  line-height: 1.5;
  white-space: pre-line; /* スマホでは改行を有効にする */
}

footer a {
  text-decoration: none;
}

/* ==========================================================================
タブレット向けスタイル
========================================================================== */
@media (min-width: 768px) {
  .logo {
    width: 20%;
    padding: 1rem 0.25rem 0.25rem 1.5rem;
  }

  h2 {
    font-size: var(--font-size-large);
  }

  .bangumi-naiyou {
    width: 80%;
    margin: 0 auto;
    text-align: center;
  }

  ul li {
    font-size: var(--font-size-medium);
  }

  .p-program__date {
    font-size: var(--font-size-xlarge);
  }

  .teaser {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 1rem;
  }

  .teaser li {
    margin-bottom: 0;
    flex-grow: 0;
    flex-basis: 100%;
  }

  .teaser li img {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: auto;
  }

  .teaser img {
    width: 500px;
  }

  .haishin {
    flex-direction: row;
    align-items: center;
  }

  .haishin li {
    width: 250px;
  }

  .haishin > ul {
    width: calc(33.333333333333336% - 10.666666666666666px);
    max-width: none;
  }
}

/* ==========================================================================
PC向けスタイル
========================================================================== */
@media (min-width: 1024px) {
  .header-logo {
    width: 150px;
    padding: 0 20px;
  }

  .logo {
    width: 15%;
    padding: 1rem 0.25rem 0.25rem 2.5rem;
  }

  h2 {
    font-size: var(--font-size-xxlarge);
  }

  ul li,
  p {
    font-size: var(--font-size-large);
  }

  .p-program__date {
    font-size: 30px;
  }

  .teaser img {
    width: 800px;
  }

  .cast-list {
    flex-direction: row;
    justify-content: space-between;
  }

  .cast-item {
    flex: 1;
  }
  
}

@media (min-width: 1280px) {
  .logo {
    width: 10%;
  }

  h1 img {
    width: 1280px;
  }

  .p-program__date {
    font-size: 40px;
  }
}
