/*
 Theme Name:   lightning Child
 Template:     lightning
 Version:      0.0.1
*/

/* Align site header elements with logo on the left and menu button on the right */
header.site-header .container > .navbar,
header.site-header .navbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between;
  flex-wrap: nowrap;
  width: 100%;
  gap: 1rem;
}

header.site-header .navbar-header,
header.site-header .navbar-brand {
  display: flex !important;
  align-items: center !important;
  order: 1 !important;
  margin-right: auto !important;
  flex: 0 0 auto;
}

header.site-header .navbar-collapse {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  order: 2 !important;
  flex: 1 1 auto;
  width: auto !important;
}

header.site-header .navbar-toggler,
header.site-header .vk-mobile-nav-menu-btn {
  order: 3 !important;
  margin-left: auto !important;
  flex: 0 0 auto;
  position: static !important;
}

@media (min-width: 992px) {
  header.site-header .navbar-collapse {
    order: 2 !important;
  }
  header.site-header .navbar-toggler,
  header.site-header .vk-mobile-nav-menu-btn {
    order: 3 !important;
  }
}

header.site-header .navbar > .container,
header.site-header .navbar > .container-fluid {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  width: 100%;
  gap: 1rem;
}

header.site-header .navbar-header {
  flex: 1 1 auto !important;
}

header.site-header .navbar-header .navbar-brand {
  order: 1 !important;
  margin-right: auto !important;
}

header.site-header .navbar-header .navbar-toggler,
header.site-header .navbar-header .vk-mobile-nav-menu-btn {
  order: 2 !important;
  margin-left: auto !important;
}

/* Hero Image Header page template */
.page-template-page-hero-header .page-header {
  display: none;
}

.page-template-page-hero-header .hero-breadcrumbs {
  background: transparent;
  margin: 0;
  padding: 1rem 0 0;
}

.page-template-page-hero-header .hero-breadcrumbs-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
}

.page-template-page-hero-header .hero-breadcrumbs-list li::after {
  content: "/";
  margin-left: 0.5rem;
  color: #777;
}

.page-template-page-hero-header .hero-breadcrumbs-list li:last-child::after {
  content: '';
}

.page-template-page-hero-header .hero-breadcrumbs-list a {
  color: inherit;
  text-decoration: none;
}

.page-template-page-hero-header .hero-breadcrumbs-list .current {
  color: #555;
  font-weight: 600;
}

.hero-header-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
}

.hero-header-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-header-content {
  position: relative;
  z-index: 1;
  padding: 3rem 1rem;
}

.hero-header-title {
  font-size: clamp(2.5rem, 4vw + 1rem, 4rem);
  font-weight: 700;
  margin: 0;
}

.hero-main-container {
  padding: 3rem 0;
}
/* コンテンツ全体のコンテナ */
.custom-content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    line-height: 1.8;
    color: #333;
}

/* 装飾付きタイトル */
.decorated-title {
    position: relative;
    /* 上下は1.5rem、左右は2remの余白 */
    padding: 1.5rem 2rem;
    background-color: #f9f9f9; /* 薄いグレーの背景 */
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    
    /* --- 幅をいっぱいにする設定 --- */
    width: 100% !important;   /* コンテンツエリアの横幅いっぱいに広げる */
    box-sizing: border-box;  /* paddingを含めて100%にする設定 */
    display: block;          /* 確実にブロック要素として扱う */
    
    /* 不要な制限をリセット */
    max-width: none !important; 
    margin-left: 0 !important;
    margin-right: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.decorated-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    /* ACFで設定した色を反映。未設定なら茶色(#5d3523) */
    background-color: var(--page-main-color, #5d3523);
}

/* 3枚の円形画像レイアウト */
.image-circle-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 2rem;
}

.circle-item {
    flex: 1;
    max-width: 150px;
}

.circle-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
}

/* 説明文 */
.description-text {
    margin-bottom: 3rem;
    font-size: 1rem;
    text-align: justify;
}

/* カスタムボタン */
/* ボタンの外側の余白を調整するエリア */
.button-area {
    text-align: center;
    margin-top: 0.5rem;    /* 上の隙間を少し詰めました */
    margin-bottom: 2rem; /* 下の隙間 */
}

/* ボタン本体のデザイン */
.custom-theme-button {
    display: inline-flex;
    align-items: center;      /* 縦方向の中央揃え */
    justify-content: center;  /* 横方向の中央揃え */
    flex-direction: column;   /* 要素を縦に並べる */

    /* --- サイズ固定の設定 --- */
    width: 320px;             /* ★ボタンの横幅を固定（お好みの数値に） */
    max-width: 100%;          /* スマホで画面からはみ出さないように */
    min-height: 5rem;         /* ★高さも固定したい場合は指定（任意） */

    /* --- 折り返しの設定 --- */
    padding: 1rem 1.5rem !important; /* 左右のpaddingを少し減らすと文字が入りやすい */
    white-space: normal !important;  /* ★自動折り返しを許可 */
    word-break: break-all;           /* 英数字でも強制的に折り返す */
    text-align: center;
    
    /* line-heightを少し広げると、折り返した時に読みやすくなります */
    line-height: 1.4 !important; 
    
    /* 以下、共通デザイン */
    background-color: var(--page-main-color, #5d3523);
    color: #fff !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: opacity 0.3s;
    margin-bottom: 0 !important;
}

/* brタグがある場合の制御も維持 */
.custom-theme-button br {
    display: block;
    content: "";
    margin-top: 0.3rem;
}

/* 改行（br）がある場合の隙間を微調整 */
.custom-theme-button br {
    margin-top: 0.3rem;
}

.custom-theme-button:hover {
    opacity: 0.8;
}

/* モバイル対応 */
@media (max-width: 600px) {
    .image-circle-row {
        gap: 8px;
    }
    .decorated-title {
        font-size: 1.2rem;
    }
}
/* 受験料セクション全体のコンテナ */
.fee-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    color: #333;
}

/* 「受験料」タイトル */
.fee-title {
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* 説明文 */
.fee-description {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* テーブルのデザイン */
.fee-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #eee;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* テーブルヘッダー */
.fee-table thead th {
    background-color: var(--page-main-color, #5d3523);
    color: #fff;
    padding: 12px;
    font-weight: 700;
    text-align: center;
}

/* テーブルセル */
.fee-table td {
    padding: 15px;
    border: 1px solid #eee;
    vertical-align: middle;
}

/* =========================
   価格表示まわり（修正点）
========================= */

/* 価格列 */
.price-cell {
    text-align: right;
    white-space: nowrap;
    line-height: 1.3; /* ← 価格ブロック全体の行間を詰める */
}

/* 打ち消し価格 */
.original-price {
    display: block;
    font-size: 0.8rem;
    color: #666;
    text-decoration: line-through;
    margin-bottom: 2px; /* ← 下の余白を最小限に */
}

/* セール価格 */
.sale-price {
    display: block;
    color: #ff0000;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0; /* ← 上の余白を消す */
}

/* モバイル対応 */
@media (max-width: 600px) {
    .fee-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }
}

/* =========================
   試験概要セクション
========================= */

.exam-summary-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* タイトル */
.exam-summary-title {
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

/* テーブル本体 */
.exam-summary-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #bfbfbf;
    font-size: 10pt;
}

/* 左：見出し */
.exam-summary-table th {
    width: 40%;
    background-color: var(--page-main-color, #5d3523);
    color: #ffffff;
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
    border: 1px solid #bfbfbf;
}

/* 右：内容 */
.exam-summary-table td {
    width: 60%;
    background-color: #ffffff;
    color: #333;
    padding: 12px 15px;
    border: 1px solid #bfbfbf;
    font-weight: 400;
}

/* モバイル対応 */
@media (max-width: 600px) {
    .exam-summary-table th,
    .exam-summary-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* 申し込みボタン基本スタイル */
.jsada-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  /* グラデーション */
  background: linear-gradient(135deg, #F08A4B 0%, #E36B2C 100%);
  color: #fff !important;

  padding: 14px 26px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  line-height: 1.4;
  text-align: center;
  border: none;

  /* ボタンらしさ */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
  margin: 10px 0;
}

/* ホバー時 */
.jsada-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  text-decoration: none;
}

/* クリック時 */
.jsada-btn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

/* アイコン */
.jsada-btn .icon {
  font-size: 18px;
  line-height: 1;
}

/* スマホ用（縦並びにしない） */
@media (max-width: 600px) {
  .jsada-btn {
    flex-direction: row;   /* ← 縦並びをやめる */
    width: 100%;           /* 横幅いっぱい */
    padding: 16px 18px;
    font-size: 15px;
    box-sizing: border-box;
  }
}

/* 1. ページ全体の左右パディング */
body {
  padding-left: 15px;
  padding-right: 15px;
}

@media (max-width: 768px) {
  .flex-container {
    display: flex !important;
    flex-direction: column !important; /* 縦並びを強制 */
  }

  .flex-container img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    flex: none !important; /* PC用の幅固定を解除 */
  }

  .flex-container .description-text {
    width: 100% !important;
    min-width: 0 !important;
  }
}
/* 既存の回り込み設定を解除 */
.flex-container img.alignleft {
  float: none !important;
  margin: 0 auto 15px auto !important;
  display: block;
}