/* ============================================================
   安元クリニック 共通スタイルシート
   YASUMOTO CLINIC — Shared CSS
   ============================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --primary:        #4A7C7E;
  --primary-dark:   #1E3A3C;
  --primary-light:  #7AADAF;
  --accent:         #BF9B6A;
  --accent-light:   #D4B98A;
  --bg-light:       #F5F7F6;
  --bg-warm:        #FAF8F5;
  --text:           #2D4748;
  --text-light:     #5E7475;
  --white:          #FFFFFF;
  --border:         #E0E8E8;
  --shadow:         0 4px 20px rgba(74,124,126,0.12);
  --shadow-hover:   0 8px 30px rgba(74,124,126,0.22);
  --radius:         10px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Noto Sans JP', sans-serif; color: var(--text); background: var(--white); line-height: 1.7; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ===== TYPOGRAPHY HELPERS ===== */
.section-subtitle {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}
.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 1rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 2.5rem; height: 2px;
  background: var(--accent);
}
.section-title.center { text-align: center; }
.section-title.center::after { left: 50%; transform: translateX(-50%); }

/* ===== LAYOUT ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 2rem; }
.section-pad { padding: 5.5rem 0; }
section, .anchor-target { scroll-margin-top: 72px; }

/* ===== BUTTONS ===== */
.btn-gold {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--accent); color: white;
  padding: 0.82rem 1.8rem; border-radius: 4px;
  font-size: 0.88rem; font-weight: 700;
  letter-spacing: 0.06em; transition: all 0.3s;
  border: 2px solid var(--accent);
}
.btn-gold:hover { background: transparent; color: var(--accent); }

.btn-teal {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--primary); color: white;
  padding: 0.82rem 1.8rem; border-radius: 4px;
  font-size: 0.88rem; font-weight: 700;
  letter-spacing: 0.06em; transition: all 0.3s;
  border: 2px solid var(--primary);
}
.btn-teal:hover { background: transparent; color: var(--primary); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: transparent; color: white;
  padding: 0.82rem 1.8rem; border-radius: 4px;
  font-size: 0.88rem; font-weight: 500;
  letter-spacing: 0.06em;
  border: 2px solid rgba(255,255,255,0.55);
  transition: all 0.3s;
}
.btn-ghost:hover { background: white; color: var(--primary-dark); border-color: white; }

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.header.scrolled { box-shadow: 0 2px 24px rgba(0,0,0,0.09); }

/* Logo */
.logo-wrap {
  display: flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: inherit; /* when used as <a> */
}
.logo-wrap:hover .logo-name { color: var(--primary); }
.logo-img-block {
  height: 46px;
  display: flex; align-items: center;
}
.logo-img-block img {
  height: 46px; width: auto;
  object-fit: contain;
}
.logo-svg-fallback {
  width: 42px; height: 42px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem; font-weight: 600;
  flex-shrink: 0;
}
.logo-text-block { display: flex; flex-direction: column; }
.logo-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.05rem; font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: 0.05em; line-height: 1.3;
}
.logo-sub { font-size: 0.6rem; color: var(--text-light); letter-spacing: 0.12em; }

/* Nav */
.nav-menu { display: flex; }
.nav-menu li a {
  display: block; padding: 0.42rem 0.72rem;
  font-size: 0.78rem; color: var(--text);
  letter-spacing: 0.04em; border-radius: 4px;
  transition: all 0.2s;
}
.nav-menu li a:hover,
.nav-menu li a.active { color: var(--primary); background: var(--bg-light); }

.header-phone {
  display: flex; align-items: center; gap: 0.42rem;
  background: var(--primary); color: white;
  padding: 0.42rem 0.9rem; border-radius: 24px;
  font-size: 0.84rem; font-weight: 700;
  letter-spacing: 0.04em; transition: background 0.2s;
  white-space: nowrap; flex-shrink: 0;
}
.header-phone:hover { background: var(--primary-dark); color: white; }

.hamburger {
  display: none; flex-direction: column;
  cursor: pointer; gap: 5px; padding: 6px; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--primary-dark); border-radius: 2px; transition: all 0.3s;
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 72px; left: 0; right: 0; bottom: 0;
  background: white; z-index: 999;
  padding: 1.5rem 1.5rem 3rem;
  display: none; flex-direction: column; overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 0.95rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem; color: var(--text);
}
.mobile-nav a.phone-link {
  color: var(--primary); font-weight: 700; font-size: 1.1rem;
  border-bottom: none; margin-top: 1rem;
}

/* ===== INFO BAR ===== */
.info-bar {
  background: var(--primary); padding: 0.85rem 2rem;
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
}
.info-bar-item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; color: rgba(255,255,255,0.9);
}
.info-bar-item svg { opacity: 0.8; flex-shrink: 0; }

/* ===== NEWS TICKER ===== */
.news-strip { background: var(--bg-light); border-bottom: 1px solid var(--border); overflow: hidden; }
.news-strip-inner {
  max-width: 1180px; margin: 0 auto; padding: 0.7rem 2rem;
  display: flex; align-items: center; gap: 1.5rem;
}
.news-tag {
  background: var(--primary); color: white;
  padding: 0.18rem 0.65rem; border-radius: 3px;
  font-size: 0.66rem; letter-spacing: 0.1em;
  font-weight: 500; white-space: nowrap; flex-shrink: 0;
}
.ticker-wrap { overflow: hidden; flex: 1; }
.ticker-list {
  display: flex; gap: 4rem;
  animation: ticker 24s linear infinite; white-space: nowrap;
}
.ticker-item { font-size: 0.78rem; color: var(--text-light); display: flex; gap: 1rem; align-items: center; }
.ticker-date { color: var(--accent); font-size: 0.7rem; white-space: nowrap; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ===== PAGE HERO (subpages) ===== */
.page-hero {
  margin-top: 72px;
  background: var(--primary-dark);
  position: relative; overflow: hidden;
  padding: 4rem 0 3.5rem;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(30,58,60,0.95), rgba(74,124,126,0.7));
  background-image: inherit;
  background-size: cover; background-position: center;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.3;
}
.page-hero-inner {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto; padding: 0 2rem;
}
.page-hero-en {
  font-size: 0.68rem; letter-spacing: 0.28em;
  color: var(--accent-light);
  text-transform: uppercase; margin-bottom: 0.6rem;
  display: block;
}
.page-hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: white; font-weight: 600;
  letter-spacing: 0.06em; margin-bottom: 1rem;
}
.breadcrumb {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; color: rgba(255,255,255,0.6);
}
.breadcrumb a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb-sep { opacity: 0.4; }

/* ===== INNER PAGE LAYOUT ===== */
.inner-section { padding: 5rem 0; }
.inner-section:nth-child(even) { background: var(--bg-light); }

/* Content card */
.content-card {
  background: white; border-radius: var(--radius);
  padding: 2.5rem; box-shadow: var(--shadow);
}

/* Section heading line */
.sec-heading {
  font-family: 'Noto Serif JP', serif;
  font-size: 1.2rem; font-weight: 600;
  color: var(--primary-dark);
  padding-bottom: 0.8rem; margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.sec-heading::after {
  content: '';
  position: absolute; bottom: -2px; left: 0;
  width: 3rem; height: 2px;
  background: var(--accent);
}

/* ===== FOOTER ===== */
footer {
  background: #0C1F21;
  padding: 3.5rem 2rem 2rem;
}
.footer-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo-wrap { display: flex; align-items: center; gap: 0.75rem; }
.footer-logo-img { height: 40px; width: auto; object-fit: contain; }
.footer-logo-svg {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  font-family: 'Noto Serif JP', serif;
  font-size: 1.1rem; font-weight: 600;
}
.footer-logo-name { color: rgba(255,255,255,0.9); font-family: 'Noto Serif JP', serif; font-size: 1rem; font-weight: 600; letter-spacing: 0.05em; line-height: 1.3; }
.footer-logo-sub { font-size: 0.6rem; color: rgba(255,255,255,0.4); letter-spacing: 0.12em; }
.footer-address { font-size: 0.78rem; color: rgba(255,255,255,0.5); line-height: 2; margin-top: 1rem; }
.footer-address a { color: inherit; }
.foot-col-title { font-size: 0.68rem; letter-spacing: 0.18em; color: var(--accent-light); margin-bottom: 1rem; font-weight: 500; }
.foot-col ul li + li { margin-top: 0.5rem; }
.foot-col ul a { font-size: 0.78rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.foot-col ul a:hover { color: var(--accent-light); }
.footer-bottom {
  max-width: 1180px; margin: 0 auto; padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.68rem; color: rgba(255,255,255,0.3);
}

/* ===== SCROLL TOP BTN ===== */
.scroll-top-btn {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--primary); color: white;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 900;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0; transform: translateY(10px);
  transition: all 0.3s;
}
.scroll-top-btn.show { opacity: 1; transform: translateY(0); }

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; } .d4 { transition-delay: 0.4s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .header { padding: 0 1.2rem; }
  .nav-menu, .header-phone { display: none; }
  .hamburger { display: flex; }
  .info-bar { gap: 0.8rem; flex-direction: column; align-items: flex-start; padding: 1rem 1.5rem; }
  .section-pad { padding: 3.5rem 0; }
  .inner-section { padding: 3.5rem 0; }
  .container { padding: 0 1.2rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .page-hero { padding: 3rem 0 2.5rem; }
}
@media (max-width: 480px) {
  .news-strip-inner { padding: 0.7rem 1.2rem; }
}
