/* ============================================================
   徳島市歯科医師会 - Jamstack サイト共通CSS
   旧サイト（ut_medico テンプレート）を精密に再現
   ============================================================ */

/* --- リセット・ベース --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  font-size: 15px;
  color: #333;
  background: #fff;
  line-height: 1.7;
}
a { color: #1a6fad; text-decoration: none; }
a:hover { color: #0d4f80; text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   TOP BAR（最上部バー）
   ============================================================ */
#sp-top-bar {
  background: #1a6fad;
  color: #fff;
  font-size: 12px;
  padding: 6px 0;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sp-contact-info { display: flex; align-items: center; gap: 16px; }
.sp-contact-time { color: #fff; font-size: 12px; }
.sp-contact-time .fa-clock { margin-right: 4px; }
.social-icons { display: flex; align-items: center; gap: 10px; }
.social-icons a {
  color: #fff;
  font-size: 14px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s;
}
.social-icons a:hover { background: rgba(255,255,255,0.35); text-decoration: none; }

/* ============================================================
   HEADER BAR 2（ロゴ + クイックリンク）PC専用
   ============================================================ */
#sp-top-bar-2 {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 12px 0;
}
.header-bar2-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header-logo-area a { display: inline-block; }
.logo-image { height: 73px; width: auto; }

.header-quicklinks {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}
.quicklink-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f8fc;
  border: 1px solid #d0e3f0;
  border-radius: 6px;
  padding: 10px 14px;
  min-width: 180px;
  transition: background 0.2s;
}
.quicklink-box:hover { background: #e8f0f8; }
.quicklink-icon {
  font-size: 22px;
  color: #1a6fad;
  min-width: 28px;
  text-align: center;
}
.quicklink-content h3 {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  line-height: 1.4;
  margin-bottom: 2px;
}
.quicklink-content p { margin: 0; }
.quicklink-content a {
  font-size: 11px;
  color: #1a6fad;
  font-weight: 500;
}

/* ============================================================
   NAVBAR（スティッキーナビゲーション）
   ============================================================ */
#sp-navbar {
  background: #1a6fad;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s;
}
#sp-navbar.sticky {
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.navbar-logo { display: flex; align-items: center; }
.navbar-logo .logo-sticky { height: 40px; width: auto; display: none; }
#sp-navbar.sticky .logo-sticky { display: inline-block; }
.navbar-logo .logo-phone { height: 40px; width: auto; }

/* PC メインナビ */
#sp-menu { flex: 1; }
.sp-megamenu-parent {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sp-megamenu-parent > .sp-menu-item > a {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 0 14px;
  height: 56px;
  line-height: 56px;
  white-space: nowrap;
  transition: background 0.2s;
  position: relative;
}
.sp-megamenu-parent > .sp-menu-item > a:hover,
.sp-megamenu-parent > .sp-menu-item:hover > a {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}

/* ドロップダウン */
.sp-has-child { position: relative; }
.sp-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #d0e3f0;
  border-top: 3px solid #1a6fad;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 2000;
  border-radius: 0 0 6px 6px;
}
.sp-dropdown.visible { display: block; }
.sp-dropdown-inner { padding: 8px 0; }
.sp-dropdown-items { list-style: none; margin: 0; padding: 0; }
.sp-dropdown-items li a {
  display: block;
  padding: 9px 20px;
  color: #333;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.sp-dropdown-items li a:hover {
  background: #f0f7ff;
  color: #1a6fad;
  text-decoration: none;
}

/* メガメニュー（歯科医院検索） */
.sp-dropdown-mega {
  left: 50%;
  transform: translateX(-50%);
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 16px;
}
.mega-col { padding: 0 8px; }
.sp-mega-group { list-style: none; margin: 0; padding: 0; }
.sp-mega-group li a {
  display: block;
  padding: 5px 8px;
  color: #333;
  font-size: 12.5px;
  white-space: nowrap;
  border-radius: 4px;
  transition: background 0.15s;
}
.sp-mega-group li a:hover { background: #f0f7ff; color: #1a6fad; text-decoration: none; }
.sp-mega-group li a i { margin-right: 4px; color: #1a6fad; font-size: 11px; }

/* ハンバーガーボタン */
.burger-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.burger-icon { display: flex; flex-direction: column; gap: 5px; }
.burger-icon span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s;
}

/* ============================================================
   モバイルオフキャンバスメニュー
   ============================================================ */
.offcanvas-menu {
  position: fixed;
  top: 0; right: -320px;
  width: 300px; max-width: 90vw;
  height: 100%;
  background: #fff;
  z-index: 9999;
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}
.offcanvas-menu.open { right: 0; }
.offcanvas-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9998;
}
.offcanvas-overlay.open { display: block; }
.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #1a6fad;
}
.offcanvas-close {
  background: none; border: none;
  color: #fff; font-size: 28px;
  cursor: pointer; line-height: 1;
}
.offcanvas-nav { padding: 8px 0; }
.offcanvas-nav ul { list-style: none; margin: 0; padding: 0; }
.offcanvas-nav > ul > li { border-bottom: 1px solid #f0f0f0; }
.offcanvas-nav > ul > li > a,
.offcanvas-nav > ul > li > .menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.offcanvas-nav > ul > li > a:hover,
.offcanvas-nav > ul > li > .menu-toggle:hover {
  background: #f5f8fc;
  text-decoration: none;
}
.offcanvas-nav .sub-menu {
  display: none;
  background: #f8f9fa;
  border-top: 1px solid #e8e8e8;
  list-style: none;
  margin: 0; padding: 0;
}
.offcanvas-nav .has-child.open .sub-menu { display: block; }
.offcanvas-nav .sub-menu li a {
  display: block;
  padding: 10px 20px 10px 32px;
  color: #555;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}
.offcanvas-nav .sub-menu li a:hover { background: #e8f0f8; text-decoration: none; }
.offcanvas-nav .has-child.open .menu-toggle i { transform: rotate(180deg); }
.offcanvas-nav .menu-toggle i { transition: transform 0.3s; }

/* ============================================================
   メインコンテンツ
   ============================================================ */
#sp-main-body { min-height: 60vh; }

/* ============================================================
   ヒーロースライダー（動画背景 + GIFスライダー）
   ============================================================ */
.hero-section {
  position: relative;
  width: 100%;
  height: 620px;
  overflow: hidden;
  background: #000;
}
@media (max-width: 991px) { .hero-section { height: 480px; } }
@media (max-width: 575px) { .hero-section { height: 360px; } }

/* 動画背景（PC専用） */
.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video-bg video {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.75;
}
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
  z-index: 1;
}

/* GIFスライダー（全デバイス） */
.hero-slides-wrapper {
  position: absolute;
  inset: 0;
  z-index: 2;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-slide.active { opacity: 1; }

/* スライドテキスト */
.hero-slide-content {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  text-shadow: 1px 1px 6px rgba(0,0,0,0.6);
  z-index: 3;
  width: 90%;
}
.hero-slide-content .slide-text-main {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.05em;
}
.hero-slide-content .slide-text-sub {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  margin-top: 8px;
}
.hero-slide-content .slide-en-text img {
  margin: 12px auto 0;
  height: 40px;
  width: auto;
  display: inline-block;
}

/* スライダーインジケーター */
.hero-indicators {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}
.hero-indicator {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  padding: 0;
}
.hero-indicator.active {
  background: #fff;
  transform: scale(1.3);
}

/* ============================================================
   クイックリンクセクション（3列）
   ============================================================ */
.quick-links-section {
  background: #f5f8fc;
  padding: 40px 0;
  border-bottom: 1px solid #e0eaf5;
}
.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 767px) {
  .quick-links-grid { grid-template-columns: 1fr; gap: 16px; }
}
.quick-link-card {
  background: #fff;
  border: 1px solid #d0e3f0;
  border-radius: 10px;
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}
.quick-link-card:hover {
  box-shadow: 0 6px 20px rgba(26,111,173,0.12);
  transform: translateY(-3px);
}
.quick-link-card .ql-icon {
  font-size: 2.4rem;
  color: #1a6fad;
  margin-bottom: 12px;
}
.quick-link-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a6fad;
  margin-bottom: 10px;
}
.quick-link-card p {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}
.quick-link-card .ql-tel {
  font-size: 1.1rem;
  font-weight: 700;
  color: #c0392b;
  margin-top: 8px;
}
.quick-link-card .ql-tel a { color: #c0392b; }

/* ============================================================
   お知らせセクション
   ============================================================ */
.news-section {
  padding: 60px 0;
  background: #fff;
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a6fad;
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 60px; height: 3px;
  background: #1a6fad;
  border-radius: 2px;
}
.section-header p {
  font-size: 14px;
  color: #666;
  margin-top: 12px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}
@media (max-width: 991px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.news-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.news-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #e8f0f8, #c8ddf0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a6fad;
  font-size: 2rem;
}
.news-card-body { padding: 16px; }
.news-card-date {
  font-size: 12px;
  color: #888;
  margin-bottom: 6px;
}
.news-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-title a { color: #333; }
.news-card-title a:hover { color: #1a6fad; text-decoration: none; }
.news-card-excerpt {
  font-size: 12.5px;
  color: #666;
  margin-top: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-readmore {
  font-size: 12px;
  color: #1a6fad;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.news-more-btn {
  display: block;
  text-align: center;
  margin: 0 auto;
  width: fit-content;
  padding: 12px 36px;
  background: #1a6fad;
  color: #fff;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}
.news-more-btn:hover { background: #0d4f80; color: #fff; text-decoration: none; }

/* ============================================================
   バナーカードセクション（4枚）
   ============================================================ */
.banner-section {
  padding: 60px 0;
  background: #f5f8fc;
}
.banner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 991px) { .banner-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .banner-grid { grid-template-columns: 1fr; } }

.banner-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  border: 1px solid #d0e3f0;
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
}
.banner-card:hover {
  box-shadow: 0 6px 20px rgba(26,111,173,0.15);
  transform: translateY(-4px);
  text-decoration: none;
}
.banner-card img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  padding: 20px;
  background: #f8fbff;
}
.banner-card-label {
  display: block;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1a6fad;
  border-top: 1px solid #e8f0f8;
}

/* ============================================================
   フッター
   ============================================================ */
#sp-footer {
  background: #1a2a3a;
  color: #ccc;
  font-size: 13px;
}

/* フッター本体 */
.footer-body {
  padding: 50px 0 40px;
  background-image: url('/images/admin/home/footer-bk.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}
.footer-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(20, 35, 55, 0.88);
}
.footer-body .container { position: relative; z-index: 1; }
.footer-body-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
}
@media (max-width: 767px) {
  .footer-body-inner { grid-template-columns: 1fr; }
}

.footer-logo img { height: 60px; width: auto; filter: brightness(0) invert(1); }
.footer-catch {
  color: #aac4e0;
  font-size: 12px;
  margin-top: 12px;
  line-height: 1.6;
}
.footer-contact-info { margin-top: 16px; }
.footer-address { color: #aac4e0; font-size: 12px; margin-bottom: 8px; }
.footer-tel { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.footer-tel a { color: #fff; }
.footer-tel a:hover { color: #aac4e0; }
.footer-tel small { font-size: 11px; font-weight: 400; color: #aac4e0; }
.footer-inquiry-note { font-size: 11.5px; color: #aac4e0; margin-top: 8px; line-height: 1.5; }
.footer-inquiry-note a { color: #7db8e0; }

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 991px) { .footer-nav { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .footer-nav { grid-template-columns: 1fr; } }
.footer-nav-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-nav-col ul { list-style: none; margin: 0; padding: 0; }
.footer-nav-col ul li { margin-bottom: 6px; }
.footer-nav-col ul li a {
  color: #aac4e0;
  font-size: 12px;
  transition: color 0.2s;
}
.footer-nav-col ul li a:hover { color: #fff; text-decoration: none; }

/* フッター下部リンク */
.footer-sub {
  background: #0f1e2e;
  padding: 12px 0;
}
.footer-sub-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-sub-inner a { color: #aac4e0; font-size: 12px; }
.footer-sub-inner a:hover { color: #fff; }
.footer-sub-inner .sep { color: #555; }

/* Linksセクション */
.footer-links-section {
  background: #0f1e2e;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.links-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 16px;
  list-style: none;
  padding: 0;
}
.footer-external-links li a {
  color: #7db8e0;
  font-size: 12px;
}
.footer-external-links li a:hover { color: #fff; }
.footer-bottom-address {
  color: #666;
  font-size: 11px;
  line-height: 1.8;
}
.footer-bottom-address a { color: #7db8e0; }

/* コピーライト */
.footer-copyright {
  background: #080f18;
  padding: 12px 0;
  text-align: center;
}
.footer-copyright p {
  color: #555;
  font-size: 11px;
}

/* ============================================================
   ページ内共通スタイル
   ============================================================ */
.page-header {
  background: linear-gradient(135deg, #1a6fad, #0d4f80);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}
.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-header .breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  list-style: none;
  padding: 0;
  margin: 0;
}
.page-header .breadcrumb a { color: rgba(255,255,255,0.8); }
.page-header .breadcrumb a:hover { color: #fff; }

.page-content { padding: 50px 0; }
.page-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a6fad;
  border-left: 4px solid #1a6fad;
  padding-left: 12px;
  margin: 32px 0 16px;
}
.page-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 24px 0 12px;
}
.page-content p { margin-bottom: 16px; line-height: 1.8; }
.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
}
.page-content table th,
.page-content table td {
  border: 1px solid #d0e3f0;
  padding: 10px 14px;
}
.page-content table th {
  background: #f0f7ff;
  font-weight: 600;
  color: #1a6fad;
}

/* ============================================================
   レスポンシブ補助
   ============================================================ */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
@media (min-width: 768px) {
  .d-md-flex { display: flex !important; }
  .d-none.d-md-flex { display: flex !important; }
}
@media (min-width: 992px) {
  .d-lg-block { display: block !important; }
  .d-lg-none { display: none !important; }
  .d-none.d-lg-block { display: block !important; }
  .d-flex.d-lg-none { display: none !important; }
  .d-inline-block.d-lg-none { display: none !important; }
}

/* ユーティリティ */
.text-dental-blue { color: #1a6fad; }
.bg-dental-light { background: #f0f7fc; }
.btn-dental {
  background: #1a6fad;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s;
  display: inline-block;
}
.btn-dental:hover { background: #0d4f80; color: #fff; }

/* 歯科医院検索 */
.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.district-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
}
.district-card:hover {
  border-color: #1a6fad;
  background: #f0f7fc;
  color: #1a6fad;
}

/* テーブル */
.tcd-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.tcd-table th {
  background: #1a6fad;
  color: #fff;
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
}
.tcd-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #dee2e6;
  vertical-align: top;
}
.tcd-table tr:nth-child(even) td { background: #f8f9fa; }
