/* ===== おうち先生 カスタムスタイル（Bootstrap 5 補完） ===== */

/* ----- 共通 ----- */
:root {
  --ouchi-primary: #3B5BDB;
  --ouchi-primary-dark: #1C3A8A;
  --ouchi-primary-light: #EDF2FF;
  --ouchi-bg-light: #F8F9FA;
  --ouchi-accent: #F76707;
  --ouchi-accent-hover: #E05A00;
  --ouchi-accent-light: #FFF4E6;
  --ouchi-success: #2F9E44;
  --ouchi-danger: #E03131;
  --ouchi-warning: #F59F00;
  --ouchi-text: #343A40;
  --ouchi-text-muted: #6C757D;
}

/* Bootstrap プライマリーカラー上書き */
.btn-primary {
  --bs-btn-bg: var(--ouchi-primary);
  --bs-btn-border-color: var(--ouchi-primary);
  --bs-btn-hover-bg: var(--ouchi-primary-dark);
  --bs-btn-hover-border-color: var(--ouchi-primary-dark);
  --bs-btn-active-bg: var(--ouchi-primary-dark);
  --bs-btn-active-border-color: var(--ouchi-primary-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--ouchi-primary);
  --bs-btn-border-color: var(--ouchi-primary);
  --bs-btn-hover-bg: var(--ouchi-primary);
  --bs-btn-hover-border-color: var(--ouchi-primary);
  --bs-btn-active-bg: var(--ouchi-primary);
  --bs-btn-active-border-color: var(--ouchi-primary);
}

/* ----- CTA アクセントボタン（オレンジ） ----- */
.btn-accent {
  background-color: var(--ouchi-accent);
  border-color: var(--ouchi-accent);
  color: #fff;
  font-weight: 600;
}

.btn-accent:hover {
  background-color: var(--ouchi-accent-hover);
  border-color: var(--ouchi-accent-hover);
  color: #fff;
  box-shadow: 0 4px 14px rgba(247, 103, 7, 0.3);
}

.btn-accent:active {
  background-color: var(--ouchi-accent-hover);
  border-color: var(--ouchi-accent-hover);
  color: #fff;
}

.btn-accent:focus-visible {
  outline: 3px solid var(--ouchi-accent);
  outline-offset: 2px;
}

/* ----- トースト通知 ----- */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1090;
}

/* ----- 確認モーダル共通 ----- */
.confirm-modal .modal-footer {
  border-top: none;
  padding-top: 0;
}

/* ナビバーのブランドカラー */
.navbar-brand {
  font-weight: 700;
  color: var(--ouchi-primary) !important;
  font-size: 1.25rem;
}

/* ----- ナビゲーション: アクティブリンク ----- */
.navbar-nav .nav-link.active {
  color: var(--ouchi-primary) !important;
  font-weight: 600;
  position: relative;
}

.navbar-nav .nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--ouchi-primary);
  border-radius: 1px;
}

/* ----- LP ヒーロー ----- */
.lp-hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, var(--ouchi-primary-light) 0%, #DBE4FF 100%);
}

/* ヒーロー CSS ビジュアル（PC のみ表示） */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hero-visual__screen {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(74, 108, 247, 0.15);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
}

.hero-visual__header {
  background: #f1f3f5;
  padding: 0.5rem 0.75rem;
  display: flex;
  gap: 6px;
}

.hero-visual__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero-visual__dot--red { background: #ff5f56; }
.hero-visual__dot--yellow { background: #ffbd2e; }
.hero-visual__dot--green { background: #27c93f; }

.hero-visual__body {
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.hero-visual__video {
  width: 140px;
  height: 100px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-visual__video i {
  font-size: 2rem;
}

.hero-visual__video--teacher {
  background: linear-gradient(135deg, #e8f0fe, #d0e0ff);
  color: var(--ouchi-primary);
}

.hero-visual__video--student {
  background: linear-gradient(135deg, #e8ffe8, #c8f0c8);
  color: #27ae60;
}

.hero-visual__chat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 320px;
}

.hero-visual__msg {
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  max-width: 75%;
}

.hero-visual__msg--teacher {
  background: #e8f0fe;
  color: #333;
  align-self: flex-start;
}

.hero-visual__msg--student {
  background: var(--ouchi-primary);
  color: #fff;
  align-self: flex-end;
}

/* ----- 実績バー ----- */
.stats-bar {
  background: var(--ouchi-primary);
  padding: 1.5rem 0;
  color: #fff;
}

.stats-bar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stats-bar__number {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.stats-bar__number small {
  font-size: 1rem;
  font-weight: 600;
}

.stats-bar__label {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* ----- お悩みカード ----- */
.pain-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.pain-card__icon {
  font-size: 2.5rem;
  color: #e74c3c;
  margin-bottom: 1rem;
}

.pain-card__text {
  margin-bottom: 0;
  color: #555;
  line-height: 1.6;
}

/* ----- 選ばれる理由カード ----- */
.reason-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.reason-card__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ouchi-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--ouchi-primary);
}

/* ----- 比較テーブル ----- */
.compare-table {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 0.875rem 1rem;
}

.compare-table thead th {
  border-bottom: 2px solid #e9ecef;
  font-size: 0.95rem;
}

.compare-table__highlight {
  background-color: #f0f4ff !important;
}

/* ----- 信頼バッジ ----- */
.trust-badge {
  padding: 0.5rem;
}

/* ----- LP 3ステップ ----- */
.lp-steps .step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--ouchi-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

/* ----- CTA セクション ----- */
.lp-cta-section {
  background-color: var(--ouchi-bg-light);
}

.lp-cta-final {
  background: linear-gradient(135deg, var(--ouchi-primary-light) 0%, #DBE4FF 100%);
}

/* ----- 先生ピックアップカード ----- */
.teacher-pickup-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.teacher-pickup-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
}

.teacher-pickup-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--ouchi-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--ouchi-primary);
}

/* ----- テスティモニアルカード ----- */
.testimonial-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  border-left: 4px solid var(--ouchi-primary);
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.testimonial-card__stars {
  color: #f5a623;
  font-size: 0.9rem;
}

.testimonial-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #555;
}

.testimonial-card__author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.testimonial-card__author strong {
  font-size: 0.9rem;
}

.testimonial-card__author span {
  font-size: 0.8rem;
}

/* ----- LP 既存コンポーネント ----- */
.lp-features .feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--ouchi-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--ouchi-primary);
}

/* ----- フッター ----- */
footer .footer-link {
  color: #adb5bd;
  text-decoration: none;
  font-size: 0.9rem;
}

footer .footer-link:hover {
  color: #fff;
}

/* ----- 新規ページ共通: 料金・利用の流れ等 ----- */
.page-header {
  background: linear-gradient(135deg, var(--ouchi-primary-light) 0%, #DBE4FF 100%);
  padding: 3rem 0;
  text-align: center;
}

.page-header h1 {
  font-weight: 700;
}

/* 料金ページ: ハイライトカード */
.pricing-card--highlight {
  border: 2px solid var(--ouchi-primary) !important;
  position: relative;
}

.pricing-card--highlight::before {
  content: "人気";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ouchi-primary);
  color: #fff;
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* 利用の流れ: ステップカード */
.flow-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.flow-step__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ouchi-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

/* 法的ページ */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p,
.legal-content li {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #555;
}

/* ----- LP モバイル対応 ----- */
@media (max-width: 767.98px) {
  .lp-hero {
    padding: 3rem 0 2.5rem;
    text-align: center;
  }

  .lp-hero h1 {
    font-size: 1.75rem;
  }

  .lp-hero .lead {
    font-size: 1rem;
  }

  .lp-hero .btn-lg {
    width: 100%;
  }

  .lp-hero .d-flex {
    flex-direction: column;
  }

  .stats-bar__number {
    font-size: 1.5rem;
  }

  .stats-bar__label {
    font-size: 0.8rem;
  }

  .compare-table {
    font-size: 0.85rem;
  }

  .compare-table th,
  .compare-table td {
    padding: 0.625rem 0.5rem;
  }

  .lp-features .col-md-4,
  .lp-steps .col-md-4 {
    margin-bottom: 1rem;
  }

  .lp-cta-section .btn-lg,
  .lp-cta-final .btn-lg {
    width: 100%;
  }

  .reason-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* モバイル固定 CTA */
  .mobile-fixed-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 0.75rem 1rem;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
    z-index: 1030;
    text-align: center;
  }

  .mobile-fixed-cta .btn {
    width: 100%;
    font-weight: 600;
  }

  /* フッターの下にスペースを確保 */
  body.has-mobile-cta {
    padding-bottom: 70px;
  }
}

/* ----- 認証ページ: 区切り線 ----- */
.auth-divider hr {
  border-color: #dee2e6;
  margin: 0;
}

/* ----- 先生カードのテキスト省略 ----- */
.teacher-card__bio {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ----- 空き時間スロットのリスト項目 ----- */
.slot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

/* ----- 予約一覧の項目 ----- */
.booking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.booking-item:last-child {
  border-bottom: none;
}

.booking-info strong {
  display: block;
}

.booking-info span {
  font-size: 0.85rem;
  color: #6c757d;
}

/* ----- 予約アイテム: 過去/今日の視覚的区分 ----- */
.booking-item--past {
  opacity: 0.6;
}

.booking-item--today {
  border-left: 3px solid var(--ouchi-primary);
  padding-left: 0.75rem;
}

/* 通知リンクから遷移した予約を一時的に強調する */
.booking-item--highlight {
  animation: booking-highlight 2.6s ease-out;
}

@keyframes booking-highlight {
  0%, 35% { box-shadow: 0 0 0 3px var(--ouchi-primary); background: var(--ouchi-primary-light); }
  100% { box-shadow: 0 0 0 0 transparent; background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .booking-item--highlight { animation: none; box-shadow: 0 0 0 3px var(--ouchi-primary); }
}

/* ----- 次回の授業ハイライトカード ----- */
.next-lesson-card {
  background: var(--ouchi-primary-light);
  border: 2px solid var(--ouchi-primary);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  position: relative;
}

.next-lesson-card__label {
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--ouchi-primary);
  color: #fff;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.next-lesson-card__body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ----- 先生カード: ホバーエフェクト ----- */
.teacher-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ----- スケルトンローダー ----- */
@keyframes skeleton-pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.skeleton {
  background: #e9ecef;
  border-radius: 4px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-line {
  height: 14px;
  margin-bottom: 0.5rem;
}

.skeleton-line--short { width: 40%; }
.skeleton-line--medium { width: 65%; }
.skeleton-line--long { width: 90%; }

/* ----- ボタン共通エフェクト ----- */
.btn {
  transition: all 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 3px solid var(--ouchi-primary);
  outline-offset: 2px;
}

/* ----- カード共通ホバーエフェクト ----- */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* ----- 通知ベルアイコン ----- */
.nav-notif-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-notif-bell {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0.25rem 0.5rem;
  font-size: 1.25rem;
  color: #6c757d;
  transition: color 0.2s;
}

.nav-notif-bell:hover {
  color: var(--ouchi-primary);
  transform: none;
  box-shadow: none;
}

.nav-notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--ouchi-danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 999px;
  padding: 0 4px;
}

/* ----- 通知ドロップダウン ----- */
.nav-notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-height: 420px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 1050;
  overflow: hidden;
}

.nav-notif-dropdown__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
}

.nav-notif-dropdown__body {
  overflow-y: auto;
  max-height: 360px;
}

.nav-notif-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f3f5;
  transition: background 0.15s;
  /* 通知はクリックで関連予約へ遷移する <a>。リンク既定の装飾を打ち消す */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.nav-notif-item:hover,
.nav-notif-item:focus-visible {
  color: inherit;
}

.nav-notif-item:last-child {
  border-bottom: none;
}

.nav-notif-item:hover {
  background: #f8f9fa;
}

.nav-notif-item--unread {
  background: var(--ouchi-primary-light);
}

.nav-notif-item--unread:hover {
  background: #dbe4ff;
}

.nav-notif-item__icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  padding-top: 2px;
}

.nav-notif-item__content {
  flex: 1;
  min-width: 0;
}

.nav-notif-item__msg {
  font-size: 0.85rem;
  color: #333;
  line-height: 1.4;
}

.nav-notif-item__time {
  font-size: 0.75rem;
  color: #adb5bd;
  margin-top: 2px;
}

@media (max-width: 767.98px) {
  .nav-notif-dropdown {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 60vh;
    border-radius: 0 0 12px 12px;
  }
}

/* ----- 予約アイテム内: 生徒情報 ----- */
.booking-item .badge.bg-info {
  font-size: 0.75rem;
  font-weight: 500;
}

/* ----- 先生プロフィールページ ----- */
.teacher-profile__avatar {
  width: 96px;
  height: 96px;
}

.teacher-profile__slot .card-body {
  transition: background 0.15s;
}

.teacher-profile__slot:hover .card-body {
  background: var(--ouchi-primary-light);
}

.teacher-profile__slot .fw-bold {
  color: var(--ouchi-text);
}

/* ----- Week Strip（日付ナビゲーション） ----- */
.week-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.week-strip__arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #dee2e6;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ouchi-text);
  padding: 0;
  transition: background 0.15s, border-color 0.15s;
}

.week-strip__arrow:hover:not(:disabled) {
  background: var(--ouchi-primary-light);
  border-color: var(--ouchi-primary);
  transform: none;
  box-shadow: none;
}

.week-strip__arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.week-strip__dates {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.week-strip__dates::-webkit-scrollbar {
  display: none;
}

.week-strip__pill {
  flex-shrink: 0;
  min-width: 44px;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #dee2e6;
  background: #fff;
  text-align: center;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--ouchi-text);
  position: relative;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}

.week-strip__pill:hover:not(.week-strip__pill--past) {
  background: var(--ouchi-primary-light);
  border-color: var(--ouchi-primary);
}

.week-strip__pill--active {
  background: var(--ouchi-primary) !important;
  border-color: var(--ouchi-primary) !important;
  color: #fff !important;
}

.week-strip__pill--today:not(.week-strip__pill--active) {
  border-color: var(--ouchi-accent);
  border-width: 2px;
}

.week-strip__pill--past {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.week-strip__dow {
  display: block;
  font-weight: 600;
}

.week-strip__day {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
}

.week-strip__dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ouchi-success);
  margin: 2px auto 0;
}

.week-strip__pill--active .week-strip__dot {
  background: #fff;
}

/* ----- 科目バッジ ----- */
.subject-badge {
  display: inline-block;
  background: var(--ouchi-primary-light);
  color: var(--ouchi-primary);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}
