/* ================================================= */
/* ① Reset & Base */
/* ================================================= */

body {
  margin: 0;
  font-family:
    "Rounded Mplus 1c",
    "Hiragino Maru Gothic ProN",
    "Yu Gothic UI Rounded",
    "Noto Sans JP",
    sans-serif;
  background: url('images/wood-bg.jpg') repeat;
  background-color: #fdf8f3;
}

a {
  position: relative;
  color: #6b4226;
  text-decoration: none;
}

a:hover {
  color: #a0522d;
}

a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, #8b5e3c, #c8a27a);
  transition: all 0.35s ease;
  transform: translateX(-50%);
}

a:hover::after {
  width: 100%;
}

/* ================================================= */
/* ② Layout（Sidebar / Main / Navbar） */
/* ================================================= */

.top-page main {
  flex: 1;
  height: 100vh;
  overflow: hidden;
}

/* コンテナ全体 */
.container {
  display: flex;
  height: 100vh;
}

/* サイドバー */
.sidebar {
  width: 35%;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0px 20px;
  background-color: #fff8f0;
  background: url('images/wood-bg.jpg') repeat;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}

/* ブランドエリア */
.branding {
  background: url('images/woodbase.jpg') center/cover no-repeat;
  background-color: #6b4226;
  color: #fff8f0;
  padding: 40px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.branding h1 {
  font-size: 2.2rem;
  line-height: 1.3;
  margin: 0;
  font-weight: 700;
}

.branding span {
  font-size: 1.2rem;
  color: #d9c2a3;
}

/* キャッチコピー（縦書き） */
.catchphrase {
  background-color: #fff8f0;
  color: #4a2c18;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  writing-mode: vertical-rl;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  padding: 20px;
}

/* メインビジュアル */
.main-visual {
  position: relative;
  height: 100vh;
  flex: 1;
  overflow: hidden;
}

.main-visual-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* スクロールインジケーター */
.scroll-indicator {
  text-align: center;
  margin-top: auto;
  margin-bottom: 30px;
  opacity: 0.7;
}

.scroll-indicator p {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #7b5e47;
}

.scroll-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  color: #7b5e47;
  font-style: italic;
}

.scroll-arrow {
  font-size: 1.5rem;
  animation: bounce 1.5s infinite;
  color: #a0522d;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* LINEバッジ */
.line-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: url('images/woodbase.jpg') center no-repeat;
  background-size: auto;
  background-color: #8b4513;
  color: #fff8f0;
  font-weight: bold;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 100;
}

.line-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.3);
  background-color: #a0522d;
}

/* ================================================= */
/* ②-2 Navigation（Navbar） */
/* ================================================= */

.navbar {
  position: fixed;
  top: 0;
  right: 0;
  width: 65%;
  background-color: rgba(255, 248, 240, 0.95);
  padding: 20px 40px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-container {
  display: flex;
  justify-content: right;
  align-items: center;
}

.hamburger {
  font-size: 1.8rem;
  cursor: pointer;
  display: none;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.navbar li {
  font-size: clamp(10px, 1.2vw, 18px);
  white-space: nowrap;
}

.nav-menu a {
  text-decoration: none;
  color: #6b4226;
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-menu a:hover {
  color: #a0522d;
}


/* ================================================= */
/* ②-3 TOP design（フェードイン） */
/* ================================================= */
/* ページ全体のフェードイン */
body.top-page {
  opacity: 0;
  transition: opacity 0.8s ease;
}

body.top-page.loaded {
  opacity: 1;
}

.sidebar,
.navbar {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

body.top-page.loaded .sidebar {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s; /* 少し遅れて出る */
}

body.top-page.loaded .navbar {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s; /* サイドバーよりさらに遅れて出る */
}


/* ローディング用の水彩グラデーション幕 */
#loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;

  /* ウッド系ブラウンの水彩風グラデーション（強め） */
  background: linear-gradient(
    to bottom,
    rgba(120, 85, 50, 0.55),
    rgba(150, 110, 70, 0.45),
    rgba(180, 145, 100, 0.40),
    rgba(210, 180, 140, 0.35),
    rgba(240, 220, 200, 0.30)
  );

  background-blend-mode: multiply;
  filter: blur(2px);

  transition: opacity 1.4s ease, transform 1.4s ease;
}

/* 上方向へスライドしながら消える */
body.top-page.loaded #loading-overlay {
  opacity: 0;
  transform: translateY(-30px);
}


/* ================================================= */
/* ③ Components */
/* ================================================= */

/* ------------------------------------------------- */
/* ③-1 お知らせ（News） */
/* ------------------------------------------------- */

.news {
  padding: 0 0.5rem;
  border-radius: 2px;
}

.news li {
  position: relative;
  padding: 0.5rem 0 1rem 0.5rem;
}

.news time {
  display: block;
  font-size: 1.1rem;
  color: #7a5a43;
  margin-bottom: 0.25rem;
}

.news span {
  font-size: 1rem;
  color: #3a2a1e;
  line-height: 1.5;
}

.news li:hover span {
  color: #8b5e3c;
  transition: 0.2s;
}

/* スマホ */
@media (max-width: 600px) {
  .news {
    padding: 0;
  }
  .news li {
    padding-left: 0.25rem;
  }
}


/* ------------------------------------------------- */
/* ③-2 私たちについて（About Table） */
/* ------------------------------------------------- */

.about-table {
  width: 60%;
  margin: 0 auto;
  border-collapse: collapse;
  background: none;
}

.about-table th,
.about-table td {
  text-align: left;
  padding: 0.6em 0;
  border-bottom: 1px dashed #6b4226;
}

.about-table th {
  font-weight: bold;
  color: #6b4226;
  width: 30%;
}

.about-table td {
  color: #4a2e1c;
}

.about-table tr:last-child th,
.about-table tr:last-child td {
  border-bottom: none;
  padding-bottom: 2em;
}

/* スマホ */
@media (max-width: 600px) {
  .about-table {
    width: 100%;
    margin: 0;
  }
  .about-table th,
  .about-table td {
    font-size: 0.95rem;
  }
}


/* ------------------------------------------------- */
/* ③-3 サービス（Service Cards） */
/* ------------------------------------------------- */

.service-carousel {
  position: relative;
  padding: 0 16px;
  width: 100%;
  max-width: 900px;
  margin: auto;
  overflow: hidden;
}

.service-card-container {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

/* タブレット（2列） */
@media (max-width: 1024px) {
  .service-card-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-carousel {
    padding: 0;
  }
}

/* スマホ（1列） */
@media (max-width: 768px) {
  .service-card-container {
    grid-template-columns: repeat(1, 1fr);
  }
  .service-carousel {
    padding: 0;
  }
}

.service-card {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
}

.service-card h3 {
  margin: 0;
  font-size: 16px;
  padding: 12px;
  color: #fff;
  background-image: url("images/woodbase.jpg");
  background-size: cover;
  background-position: center;
  position: relative;
  position: relative;
  z-index: 2;
}

.service-card h3::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.05);
  z-index: 1;
}

.service-card p {
  font-size: 14px;
  color: #555;
  padding: 15px;
}


/* ------------------------------------------------- */
/* ③-4 会社概要（Company Table） */
/* ------------------------------------------------- */

.company-table {
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  border-collapse: separate;
  border-spacing: 0 12px;
  font-size: 1rem;
}

.company-table tr {
  background-color: #fffdf8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-radius: 6px;
  overflow: hidden;
}

.company-table th {
  width: 25%;
  text-align: left;
  padding: 14px 18px;
  background: url('images/woodbase.jpg') center/cover no-repeat;
  color: #fff8f0;
  font-weight: bold;
  border-bottom: 1px solid #d9c2a3;
  border-radius: 6px 0 0 6px;
}

.company-table td {
  padding: 14px 18px;
  color: #4a2c18;
  border-bottom: 1px solid #d9c2a3;
  border-radius: 0 6px 6px 0;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: none;
}


/* ------------------------------------------------- */
/* ③-5 公式LINE（LINE Section） */
/* ------------------------------------------------- */

#line p {
  text-align: left;
}

#line ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  color: #4a2c18;
}

#line li {
  margin: 10px 0;
}

.line-cta {
  margin-top: 20px;
}

.line-button {
  display: inline-block;
  background-color: #06c755;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.line-button:hover {
  background-color: #04a944;
}


/* ------------------------------------------------- */
/* ③-6 フォーム（Contact Form） */
/* ------------------------------------------------- */

#contact p {
  text-align: left;
}

form.contact-form {
  width: 800px;
  max-width: 100%;
  margin: 0 auto;
}

form label {
  display: block;
  margin-top: 15px;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  box-sizing: border-box;
}

form button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #6b4226;
  color: #fff8f0;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

form button:hover {
  background-color: #8b4513;
}

/* ================================================= */
/* ④ Overlay（LINE処方箋受付） */
/* ================================================= */

#overlay {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  overflow: hidden;
  padding: 2em;
  box-sizing: border-box;
}

.overlay-content {
  background-color: #fff8f0;
  padding: 0.5em;
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-align: center;
}

/* 閉じるボタン */
.close-btn {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #6b4226;
  color: #fff8f0;
  border: none;
  padding: 0.5em 1em;
  font-size: 1rem;
  border-radius: 5px;
  z-index: 10000;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.close-btn:hover {
  background-color: #8b4513;
}

/* スマホで閉じるボタン表示 */
@media screen and (max-width: 768px) {
  .close-btn {
    display: block;
  }
}

/* 受付セクション */
.reception-section {
  background-color: #fdfaf6;
  padding: 2em;
  border-radius: 8px;
  margin: 2em 0;
  font-family: 'Helvetica', sans-serif;
}

@media screen and (max-width: 768px) {
.reception-section {
  padding: 0.5em;
  margin: 2em 0;
  }
}

.reception-section h2 {
  font-size: 1.8em;
  margin-bottom: 0.5em;
  color: #6b4226;
}

.reception-section h3 {
  font-size: 1.4em;
  margin-top: 1.5em;
  color: #8b5e3c;
}

.reception-section p {
  line-height: 1.6;
  margin: 1em 0;
  color: #333;
}

.reception-section ol {
  padding-left: 1.2em;
}

.reception-section li {
  margin-bottom: 0.5em;
}

/* LINEボタンリスト */
.line-buttons ul {
  list-style: none;
  padding: 1em;
}

.line-buttons li {
  margin-bottom: 1.5em;
}

.line-btn {
  display: inline-block;
  background-color: #6b4226;
  color: #fff8f0;
  padding: 0.6em 1.2em;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.line-btn:hover {
  background-color: #8b4513;
}

/* ガイド画像 */
.guide-image {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ================================================= */
/* ⑤ Section Base（セクション共通） */
/* ================================================= */

.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
  min-height: 20vh;
  border: none;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, #6b4226, #d9c2a3);
  border-image-slice: 1;
}

.section:last-of-type {
  border-bottom: none;
}

.section h2 {
  text-align: left;
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: #6b4226;
  font-weight: bold;
}

.section p {
  text-align: center;
  color: #4a2c18;
}

.section ul,
.section dl {
  margin-left: 20px;
}

/* ================================================= */
/* ⑥-1 Sub page（プライバシーポリシー） */
/* ================================================= */

.policy-page h1 {
  background: url('images/woodbase.jpg') center/cover no-repeat;
  color: #fff8f0;
  padding: 40px 20px;
  text-align: center;
  font-size: 1.8rem;
  border-radius: 6px;
  margin: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.subpage-container section h2 {
  border-left: 6px solid #6b4226;
  padding-left: 12px;
  margin-bottom: 24px;
  color: #6b4226;
  font-weight: bold;
}

.subpage-container section h3 {
  color: #6b4226;
  border-left: 4px solid #d9c2a3;
  padding-left: 10px;
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.subpage-container section p {
  text-align: left;
}


/* ================================================= */
/* ⑦ Footer */
/* ================================================= */

.footer {
  background: url('images/woodbase.jpg') center/cover no-repeat;
  color: #fff8f0;
  text-align: center;
  padding: 10px 10px;
  position: relative;
  font-size: 0.95rem;
  box-shadow: inset 0 4px 8px rgba(0,0,0,0.2);
}

.footer-link {
  color: #fff8f0;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #d9c2a3;
}

.footer p {
  margin: 8px 0;
}

/* ================================================= */
/* ⑧ Global Media Queries（レイアウト全体の調整） */
/* ================================================= */

/* ------------------------------------------------- */
/* 900px 以下：ナビゲーションのレイアウト調整 */
/* ------------------------------------------------- */
@media (max-width: 900px) {
  .navbar {
    width: auto;
    padding: 8px 12px;
    right: 10px;
    top: 10px;
    border-radius: 8px;
  }

  .hamburger {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 20px;
    background-color: #fff8f0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .nav-menu.active {
    display: block;
  }

  .nav-menu ul li a {
    font-size: 14px;
  }
}

/* ------------------------------------------------- */
/* 768px 以下：サイドバー・キャッチコピーなし・MAIN */
/* ------------------------------------------------- */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  main {
    width: 100%;
    padding: 0;
  }

  .container {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    display: block;
    width: 100%;
    min-width: auto;
    min-height: auto;
    padding: 20px 0;
  }

  .branding {
    flex: none;
    height: auto;
    padding: 40px 20px;
  }

  .branding h1 {
    font-size: 1.6rem;
  }

  .branding span {
    font-size: 1rem;
  }

  /* キャッチコピーはスマホでは非表示 */
  .catchphrase {
    display: none;
  }

  .scroll-indicator {
    display: none;
  }

  .main-visual {
    width: 100%;
    height: 60vh;
  }

  .main-visual-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* navbar をスマホ用に調整 */
  .navbar {
    position: fixed;
    top: 10px;
    right: 10px;
    width: auto;
    padding: 8px 12px;
    border-radius: 8px;
  }

  .line-badge {
    bottom: 10px;
    right: 10px;
  }
}

/* ------------------------------------------------- */
/* 600px 以下：セクション余白・サブページ調整 */
/* ------------------------------------------------- */
@media (max-width: 600px) {
  .section {
    padding: 16px 12px;
  }

  .section h2 {
    font-size: 1.4rem;
  }

  .section p {
    font-size: 0.9rem;
  }

  .subpage-container {
    padding: 20px 10px;
  }
}