:root {
  --primary-color: #0056b3;
  --accent-color: #e63946;
  --ad-bg: #e9ecef;
  --main-color: #021535;
  --sub-color: #0066d3;
  --main-fonts:
    "Noto Sans JP", "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
  --num-font: "Roboto", sans-serif;


  --color-primary-dark: #051a3f;
  --color-primary-mid: #043562;
  --color-primary-light: #094070;
  --bg-main-gradient: linear-gradient(
    0deg,
    var(--color-primary-dark) 0%,
    var(--color-primary-mid) 50%,
    var(--color-primary-light) 100%
  );
  --link-hover-opacity: 0.7;
  --transition-speed-base: 0.3s ease;
}
body {
  font-family: var(--main-fonts);
  background-color: #f5f5f5;
}

a:not(.btn) {
  transition: opacity var(--transition-speed-base);
  cursor: pointer;
}

a:not(.btn):hover {
  opacity: var(--link-hover-opacity);
}

/* Navbar Customization */
header {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: padding, box-shadow;
    border-top:15px solid #003366; /* ロゴの紺色に合わせる */
}
/* ロゴ上のテキスト */
.header-text {
    transition: all 0.3s ease;
    max-height: 50px; /* テキストが表示される十分な高さ */
    opacity: 1;
    overflow: hidden;

    font-size: 0.8rem;  /* 文字サイズ */
    white-space: nowrap; /* 改行防止 */
    color: #6c757d;
}

/* ロゴ画像本体 */
.header-logo {
    transition: all 0.3s ease;
    width: 150px; /* 初期のロゴ横幅。px指定の方が安定します */
    height: auto;
}

/* --- 2. スクロールした時のスタイル (.scrolledが付いた時) --- */

/* ヘッダー全体の余白を詰める */
header.scrolled {
    padding-top: 5px;
    padding-bottom: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

/* テキストを消す（高さを0にして吸い込ませる） */
header.scrolled .header-text {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0 !important;
}

/* ロゴを小さくする */
header.scrolled .header-logo {
    width: 110px; /* 小さくなった時の横幅 */
}

/* ロゴとテキストを囲むリンクの隙間(gap)をゼロにする */
header.scrolled .navbar-brand {
    gap: 0 !important;
}
.navbar-nav .nav-link.active {
    color: var(--sub-color);
}
.navbar-brand {
  font-weight: bold;
  color: var(--primary-color) !important;
}
.navbar-brand span {
  font-size: 0.6em;
  color: #6c757d;
  font-weight: normal;
}
.nav-link {
  font-weight: 500;
  color: #333;
}
.nav-link:hover {
  color: var(--primary-color);
}

/* Hero Ad Placeholder */
.hero-ad-placeholder {
  width: 100%;
  height: 350px;
  background-color: var(--ad-bg);
  border: 2px dashed #adb5bd;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #6c757d;
  position: relative;
}
.ad-label {
  position: absolute;
  top: 0;
  right: 0;
  background: #6c757d;
  color: white;
  font-size: 0.75rem;
  padding: 2px 8px;
}

/* Section Titles */
.section-title {
  background-image: url("../img/background-title.jpg");
  background-size: cover; /* 領域全体を覆うように伸縮 */
  background-position: center; /* 画像の中央を表示 */
  background-repeat: no-repeat; /* 画像を繰り返さない */
  margin-bottom: 1.5rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  padding: 0.5rem 0.7rem;
}
.section-title h3 {
  font-size: 115%;
}
.section-title span {
  font-size: 90%;
}

/* Sidebar Widgets */
aside div.card {
    border: none;
    border-radius: 0;
}
.widget-title {
  font-weight: bold;
  border-bottom: 2px solid var(--color-primary-dark);
  padding-bottom: 0.5rem;
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
}
.aside-banner:not(:last-child) {
    margin-bottom: 1.5rem !important; /* バナー間の距離 */
}

/* Ad Slots Custom Sizes */
.ad-rectangle-l {
  width: 300px;
  height: 250px;
  background: var(--ad-bg);
  border: 1px solid #dee2e6;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ad-rectangle-m {
  width: 300px;
  height: 100px;
  background: var(--ad-bg);
  border: 1px solid #dee2e6;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ad-rectangle-m img {
  width: 300px;
  height: 100px;
  border: .5px solid #ccc;
}
.new-badge {
background: #c40000;
background: linear-gradient(0deg, rgba(196, 0, 0, 1) 0%, rgba(212, 0, 0, 1) 50%, rgba(240, 0, 0, 1) 100%);
    font-size: 90%;
    background-color: transparent;
}
.num-fonts {
  font-family: var(--num-font);
}

.btn {
  background-color: var(--color-primary-dark); 
  background-image: var(--bg-main-gradient);
  color: #fff;
  border-radius: 0%;
  text-decoration: none;
  display: inline-block;
  border: 1.5px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  opacity: 1;
  border-color: var(--color-primary-dark);
  color: var(--color-primary-dark);
  background-color: #fff;
  background-image: none;
}
.btn:hover i {
  color: var(--color-primary-dark) !important;
}
/* Footer */
footer {
  background: var(--color-primary-dark);
  background: var(--bg-main-gradient);
}
footer h3 {
  border-left: 5px solid #fff;
  padding-left: 10px;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
}

footer a {
  text-decoration: none;
  color: #fff;
}
footer a:hover {
  text-decoration: underline;
}

/* 1. ページリンク共通（aでもspanでも当たるように調整） */
.pagination .page-link, 
.pagination .page-item span.page-link {
    color: var(--bs-btn-active-color);
    background-color: #fff;
    border: 1px solid var(--bs-btn-active-border-color); /* border-colorを明示 */
    border-radius: 0% !important;
    margin: 0 3px;
    text-decoration: none; /* 下線を消す */
}

/* 2. アクティブ（現在地） */
.pagination .page-item.active .page-link {
    background-color: var(--color-primary-dark) !important;
    background-image: var(--bg-main-gradient) !important;
    color: #fff !important;
    border: 1px solid var(--color-primary-dark);
    cursor: default; /* クリックできない感を出す */
}

/* 3. 無効化（前へ/次へが押せない時） */
.pagination .page-item.disabled .page-link {
    color: #323232 !important;
    background-color: #c1c1c1 !important;
    border: 1px solid #c1c1c1; /* グレーに合わせる */
    cursor: not-allowed;
}

/* 4. ホバー設定 */
.pagination .page-link:hover:not(.disabled) {
    background-color: var(--color-primary-dark);
    background-image: var(--bg-main-gradient);
    color: #fff;
    transition: all 0.3s ease;
    border: 1px solid var(--color-primary-dark);
}

/* タブレット以上（MD） */
@media (min-width: 768px) {
header {
  background-image: url("../img/header-img.jpg");
  background-size: cover; /* 領域全体を覆うように伸縮 */
  background-position: center; /* 画像の中央を表示 */
  background-repeat: no-repeat; /* 画像を繰り返さない */
}
.header-logo {
  width: 230px;
}
header.scrolled .header-logo {
  width: 200px;
}
}