/* ============================================
   ななつ星調剤薬局 東山崎店
   森・木のイメージ - さわやかで明るいデザイン
   ============================================ */

/* --- リセット & ベース --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Forest Green Palette */
  --green-dark: #2d5a3d;
  --green-main: #3d7a52;
  --green-medium: #5a8f5a;
  --green-light: #7db87d;
  --green-pale: #a8d5a8;
  --green-bg: #e8f5e8;

  /* Wood / Earth Tones */
  --wood-dark: #6b4423;
  --wood-main: #8b6f47;
  --wood-light: #c9a96e;
  --wood-pale: #f0e6d3;

  /* Neutral */
  --white: #ffffff;
  --off-white: #fafcfa;
  --cream: #f7f9f4;
  --gray-light: #e8ebe8;
  --gray: #9ca39c;
  --gray-dark: #5a615a;
  --text: #2c3e2c;
  --text-light: #5a6b5a;

  /* Sizing */
  --header-height: 70px;
  --container-width: 1100px;
  --radius: 12px;
  --radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(45, 90, 61, 0.08);
  --shadow-md: 0 4px 20px rgba(45, 90, 61, 0.12);
  --shadow-lg: 0 8px 40px rgba(45, 90, 61, 0.15);

  /* Transition */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  overflow-x: hidden;
}

body {
  font-family: 'Noto Sans JP', 'Zen Maru Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  color: var(--text);
  background: var(--off-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- ヘッダー --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(93, 143, 93, 0.1);
  transition: box-shadow 0.3s var(--ease);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img,
.logo-img {
  height: 55px;
  width: auto;
}

.footer-logo-img {
  height: 50px;
  width: auto;
  margin-bottom: 4px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.logo-stars {
  font-size: 8px;
  color: var(--green-main);
  letter-spacing: 2px;
}

.logo-name {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--green-dark);
}

.logo-branch {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 500;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-main);
  border-radius: 1px;
  transition: width 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--green-main);
}

.nav-link:hover::after {
  width: 100%;
}

/* ハンバーガー */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--green-dark);
  border-radius: 1px;
  position: absolute;
  left: 0;
  transition: all 0.3s var(--ease);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* --- ヒーロー --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    #e8f5e8 0%,
    #d4edda 25%,
    #c3e6cb 50%,
    #d4edda 75%,
    #e8f5e8 100%
  );
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(125, 184, 125, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(93, 143, 93, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 80%, rgba(168, 213, 168, 0.3) 0%, transparent 50%);
}

/* 葉っぱアニメーション */
.hero-leaves {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.leaf {
  position: absolute;
  font-size: 24px;
  opacity: 0.2;
  animation: float 20s infinite ease-in-out;
}

.leaf-1 { top: 10%; left: 5%; animation-delay: 0s; font-size: 32px; }
.leaf-2 { top: 20%; right: 10%; animation-delay: -4s; font-size: 20px; }
.leaf-3 { top: 60%; left: 15%; animation-delay: -8s; font-size: 28px; }
.leaf-4 { top: 40%; right: 20%; animation-delay: -12s; }
.leaf-5 { bottom: 20%; left: 40%; animation-delay: -16s; font-size: 36px; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(10px, -20px) rotate(5deg); }
  50% { transform: translate(-5px, 10px) rotate(-3deg); }
  75% { transform: translate(15px, 5px) rotate(4deg); }
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 0 24px;
  margin-top: calc(var(--header-height) / 2);
}

.hero-title-block {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  opacity: 0;
  -webkit-animation: fadeUp 0.8s 0.5s forwards;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero-logo {
  height: 80px;
  width: auto;
  display: block;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.hero-sub {
  font-size: 14px;
  color: var(--green-medium);
  font-weight: 500;
  letter-spacing: 3px;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards var(--ease);
}

.hero-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1.4;
  margin-bottom: 0;
}

.hero-title span {
  display: inline-block;
  background: linear-gradient(135deg, var(--green-main), var(--green-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards var(--ease);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards var(--ease);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s var(--ease);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--green-main);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(61, 122, 82, 0.3);
}

.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(61, 122, 82, 0.4);
}

.btn-secondary {
  background: var(--white);
  color: var(--green-main);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--green-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* スクロールインジケーター */
.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeIn 1s 1.5s forwards;
}

.hero-scroll span {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--green-medium);
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--green-pale);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--green-main);
  animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
  0% { top: -100%; }
  100% { top: 100%; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 0.6; }
}

/* --- セクション共通 --- */
.section {
  padding: 100px 0;
  overflow-x: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--green-light);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

/* --- 当薬局について --- */
.about {
  background: var(--white);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-photo {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  object-fit: cover;
}

.about-text h3 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 24px;
  color: var(--green-dark);
  margin-bottom: 20px;
  line-height: 1.6;
}

.about-text p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 15px;
}

.about-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--green-bg);
  color: var(--green-dark);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
}

.feature-tag svg {
  color: var(--green-main);
  flex-shrink: 0;
}

/* --- サービス --- */
.services {
  background: var(--cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  padding: 40px 28px;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-sm);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: var(--green-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card h3 {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 18px;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

/* --- 店舗情報 --- */
.info {
  background: var(--white);
}

.info-card {
  max-width: 800px;
  margin: 0 auto;
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid var(--gray-light);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table th {
  width: 130px;
  padding: 20px 16px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  font-weight: 500;
  color: var(--green-dark);
  white-space: nowrap;
}

.info-table td {
  padding: 20px 16px;
  font-size: 15px;
  color: var(--text);
}

.tel-link {
  color: var(--green-main);
  font-size: 20px;
  font-weight: 700;
  transition: color 0.3s var(--ease);
}

.tel-link:hover {
  color: var(--green-dark);
}

/* info-tableのth幅指定がhoursテーブルに影響しないようリセット */
.hours th {
  width: auto;
}

/* 営業時間テーブル */
.hours {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  margin-bottom: 16px;
  background: #7a6b5a;
  border-radius: var(--radius);
  overflow: hidden;
  table-layout: fixed;
}

.hours thead th {
  padding: 14px 6px;
  font-weight: 500;
  color: var(--white);
  background: #7a6b5a;
  font-size: 16px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.hours thead th.hours-head-label {
  text-align: left;
  padding-left: 16px;
  font-size: 15px;
}

.hours tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.hours tbody tr:last-child {
  border-bottom: none;
}

.hours tbody td {
  padding: 16px 4px;
  font-size: 20px;
  color: var(--white);
  font-weight: 400;
  text-align: center;
  background: #7a6b5a;
}

.hours .time-label {
  text-align: left;
  font-size: 15px;
  color: var(--white);
  font-weight: 400;
  padding-left: 16px;
}

.hours .dot {
  color: var(--white);
  font-size: 18px;
}

.hours .slash {
  color: rgba(255,255,255,0.5);
  font-size: 18px;
}

.hours-note {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

.closed-badge {
  display: inline-block;
  padding: 4px 16px;
  background: #fdeaea;
  color: #cc5555;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
}

/* --- アクセス --- */
.access {
  background: var(--cream);
}

.access-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}

.map-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-wrapper iframe {
  display: block;
}

.access-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.access-detail {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.access-icon {
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.access-detail h4 {
  font-size: 13px;
  color: var(--green-medium);
  font-weight: 500;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.access-detail p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.6;
}

/* --- お問い合わせ --- */
.contact {
  background: var(--white);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card {
  text-align: center;
  padding: 48px 32px;
  background: var(--cream);
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--ease);
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
}

.contact-icon {
  margin-bottom: 20px;
}

.contact-card h3 {
  font-size: 15px;
  color: var(--text-light);
  font-weight: 500;
  margin-bottom: 16px;
}

.contact-tel {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 12px;
  transition: color 0.3s var(--ease);
}

.contact-tel:hover {
  color: var(--green-main);
}

.contact-tel.fax {
  font-size: 24px;
  color: var(--text);
  cursor: default;
}

.contact-note {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.8;
}

.contact-warning {
  font-size: 12px;
  color: #cc5555;
  margin-top: 10px;
  font-weight: 500;
}

/* --- フッター --- */
.footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo .logo-stars {
  color: var(--green-pale);
  font-size: 10px;
}

.footer-name {
  display: block;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin: 4px 0 8px;
}

.footer-address {
  font-size: 13px;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  opacity: 0.7;
  transition: opacity 0.3s var(--ease);
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  opacity: 0.5;
}

/* --- トップへ戻る --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--green-main);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s var(--ease);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

/* --- スクロールアニメーション --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 968px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .access-content {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .section {
    padding: 70px 0;
  }

  /* モバイルナビ */
  .hamburger {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 100px 40px 40px;
    gap: 0;
    box-shadow: var(--shadow-lg);
    -webkit-clip-path: inset(0 0 0 100%);
    clip-path: inset(0 0 0 100%);
    pointer-events: none;
    transition: clip-path 0.3s var(--ease), -webkit-clip-path 0.3s var(--ease);
  }

  .nav.active {
    -webkit-clip-path: inset(0);
    clip-path: inset(0);
    pointer-events: auto;
  }

  .nav-link {
    font-size: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--gray-light);
    width: 100%;
  }

  .nav-link::after {
    display: none;
  }

  /* モバイルオーバーレイ */
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease);
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-content {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 28px 20px;
  }

  /* info-table の直接の子セルのみブロック表示（入れ子テーブルには影響しない） */
  .info-table > tbody > tr > th {
    display: block;
    padding: 16px 8px 4px;
    width: 100%;
  }

  .info-table > tbody > tr > td {
    display: block;
    padding: 4px 8px 16px;
  }

  /* 営業時間セル */
  .hours-cell {
    padding: 8px 0 16px !important;
    overflow: hidden;
  }

  .hours-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* hours テーブルは必ずテーブル表示を維持（念のため !important も残す） */
  .hours {
    display: table !important;
    width: 100%;
    min-width: 300px;
  }

  .hours thead {
    display: table-header-group !important;
  }

  .hours tbody {
    display: table-row-group !important;
  }

  .hours tr {
    display: table-row !important;
  }

  .hours th,
  .hours td {
    display: table-cell !important;
  }

  .hours thead th {
    font-size: 11px;
    padding: 6px 4px;
  }

  .hours thead th.hours-head-label {
    font-size: 12px;
    padding-left: 10px;
  }

  .hours tbody td {
    font-size: 13px;
    padding: 6px 4px;
  }

  .hours .time-label {
    font-size: 12px;
    padding-left: 10px;
  }

  .hours .dot,
  .hours .slash {
    font-size: 15px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .hero-scroll {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .contact-tel {
    font-size: 22px;
  }
}
