/* ============================================================
   style.css — 医療法人永楓会 つくみクリニック
   Mobile-first (375px baseline)
   Breakpoints: 768px (tablet), 1024px (PC)
   ============================================================ */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --c-main:        #2472A0;
  --c-main-dark:   #1a5880;
  --c-main-light:  #deedf7;
  --c-accent:      #5FA584;
  --c-accent-dark: #4a8568;
  --c-white:       #ffffff;
  --c-off-white:   #F7F9FB;
  --c-text:        #1F2937;
  --c-muted:       #6B7280;
  --c-border:      #E2E8F0;
  --c-open:        #166534;
  --c-closed:      #991b1b;
  --c-soon:        #92400e;

  --ff:      'Noto Sans JP', sans-serif;
  --fs-xs:   13px;
  --fs-sm:   15px;
  --fs-md:   18px;
  --fs-lg:   21px;
  --fs-xl:   26px;
  --fs-2xl:  34px;

  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;

  --sh-sm: 0 1px 4px rgba(0,0,0,0.07);
  --sh-md: 0 4px 20px rgba(0,0,0,0.10);

  --header-h:  60px;
  --ease:      0.2s ease;
  --max-w:     1100px;
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--ff);
  font-size: var(--fs-md);
  color: var(--c-text);
  background: var(--c-white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img   { max-width: 100%; height: auto; display: block; }
a     { color: var(--c-main); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
address { font-style: normal; }

/* ── Utilities ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 20px;
}
@media (min-width: 768px)  { .container { padding-inline: 32px; } }
@media (min-width: 1024px) { .container { padding-inline: 48px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-family: var(--ff);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background var(--ease), color var(--ease),
              box-shadow var(--ease), transform var(--ease),
              border-color var(--ease);
}
.btn:hover         { transform: translateY(-2px); }
.btn:active        { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }

.btn-primary {
  background: var(--c-main);
  color: var(--c-white);
  border-color: var(--c-main);
}
.btn-primary:hover {
  background: var(--c-main-dark);
  border-color: var(--c-main-dark);
  box-shadow: var(--sh-md);
  text-decoration: none;
}

.btn-secondary {
  background: var(--c-accent);
  color: var(--c-white);
  border-color: var(--c-accent);
}
.btn-secondary:hover {
  background: var(--c-accent-dark);
  border-color: var(--c-accent-dark);
  text-decoration: none;
  box-shadow: var(--sh-md);
}

.btn-outline {
  background: transparent;
  color: var(--c-main);
  border-color: var(--c-main);
}
.btn-outline:hover {
  background: var(--c-main);
  color: var(--c-white);
  text-decoration: none;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--header-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--sh-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.header-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  color: var(--c-text);
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo:hover { text-decoration: none; }
.logo-sub  { font-size: 10px; color: var(--c-muted); font-weight: 400; }
.logo-main { font-size: 15px; font-weight: 700; color: var(--c-main); }
@media (min-width: 768px) {
  .logo-sub  { font-size: 11px; }
  .logo-main { font-size: 18px; }
}

/* Nav — mobile: slide-down panel */
.header-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background: var(--c-white);
  z-index: 990;
  transition: max-height 0.3s ease, box-shadow 0.3s ease;
}
.header-nav.is-open {
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  border-top: 3px solid var(--c-main);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

.nav-list { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 40px; }

.nav-link {
  display: block;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--c-text);
  transition: background var(--ease), color var(--ease);
}
.nav-link:hover {
  background: var(--c-main-light);
  color: var(--c-main);
  text-decoration: none;
}

@media (min-width: 1024px) {
  .header-nav {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    max-height: none;
    overflow: visible;
    background: transparent;
    z-index: auto;
    transition: none;
    border-top: none;
    box-shadow: none;
    flex: 1;
  }
  .nav-list {
    flex-direction: row;
    justify-content: flex-end;
    gap: 0;
    padding: 0;
  }
  .nav-link {
    padding: 8px 12px;
    font-size: var(--fs-sm);
  }
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--c-main);
  font-weight: 700;
  font-size: 20px;
  transition: background var(--ease);
}
.header-phone:hover { background: var(--c-main-light); text-decoration: none; }
.phone-num { display: none; }

@media (min-width: 768px) {
  .header-phone {
    background: var(--c-main);
    color: var(--c-white);
    font-size: var(--fs-xs);
    padding: 8px 16px;
  }
  .header-phone:hover { background: var(--c-main-dark); }
  .phone-num { display: inline; }
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: background var(--ease);
}
.hamburger:hover         { background: var(--c-off-white); }
.hamburger:focus-visible { outline: 3px solid var(--c-main); outline-offset: 2px; }

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
  transform-origin: center;
}
.hamburger.is-active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active .hamburger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1024px) { .hamburger { display: none; } }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  margin-top: var(--header-h);
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
@media (min-width: 768px) { .hero { min-height: 620px; } }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(26, 88, 128, 0.82) 0%,
    rgba(36, 114, 160, 0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 56px 72px;
  color: var(--c-white);
}


.hero-title {
  font-size: clamp(28px, 6vw, 52px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.hero-subtitle {
  font-size: var(--fs-sm);
  line-height: 1.85;
  margin-bottom: 36px;
  opacity: 0.92;
}
@media (min-width: 768px) { .hero-subtitle { font-size: var(--fs-md); } }

.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
@media (min-width: 520px) {
  .hero-ctas { flex-direction: row; align-items: flex-start; }
}

.btn-phone-cta {
  background: var(--c-white);
  color: var(--c-main);
  border-color: var(--c-white);
  flex-direction: column;
  gap: 2px;
  padding: 12px 24px;
  text-align: center;
  border-radius: var(--r-md);
}
.btn-phone-cta:hover { background: var(--c-main-light); text-decoration: none; transform: translateY(-2px); }
.btn-phone-cta:focus-visible { outline: 3px solid var(--c-white); }
.cta-label  { font-size: var(--fs-xs); font-weight: 500; display: block; }
.cta-number { font-size: var(--fs-xl); font-weight: 700; display: block; letter-spacing: 0.03em; }

.btn-hero-outline {
  background: rgba(255,255,255,0.12);
  color: var(--c-white);
  border-color: rgba(255,255,255,0.6);
  font-size: var(--fs-sm);
}
.btn-hero-outline:hover { background: rgba(255,255,255,0.25); text-decoration: none; }

/* ── Section Common ──────────────────────────────────────────── */
.section { padding-block: 72px; }
.section--alt { background: var(--c-off-white); }

.section-title {
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  position: relative;
  padding-bottom: 20px;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 4px;
  background: var(--c-main);
  border-radius: 2px;
}
.section-subtitle {
  text-align: center;
  color: var(--c-muted);
  font-size: var(--fs-sm);
  margin-bottom: 48px;
}

/* ── Services ────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px)  { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.service-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease);
}
.service-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-4px);
  border-color: var(--c-main-light);
}
.service-icon { font-size: 40px; line-height: 1; margin-bottom: 14px; }
.service-name { font-size: var(--fs-lg); font-weight: 700; color: var(--c-main); margin-bottom: 10px; }
.service-desc { font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.8; }

/* ── Hours ───────────────────────────────────────────────────── */

/* Desktop table */
.hours-table-wrap {
  display: none;
  overflow-x: auto;
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  margin-bottom: 16px;
}
@media (min-width: 768px) { .hours-table-wrap { display: block; } }

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  background: var(--c-white);
}
.hours-table th, .hours-table td {
  padding: 18px 10px;
  text-align: center;
  border: 1px solid var(--c-border);
}
.hours-table thead th {
  background: var(--c-main);
  color: var(--c-white);
  font-weight: 700;
}
.hours-table thead th.col-closed { background: var(--c-muted); }
.hours-table tbody th {
  background: var(--c-main-light);
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  min-width: 120px;
  padding-left: 16px;
}
.time-range { font-size: 12px; font-weight: 400; color: var(--c-muted); display: block; }
.hours-table td.open    { color: var(--c-open);   font-weight: 700; font-size: 20px; }
.hours-table td.closed  { color: var(--c-closed); font-weight: 700; font-size: 18px; }
.hours-table td.partial { color: var(--c-soon);   font-weight: 700; font-size: 20px; }

.hours-note {
  display: none;
  color: var(--c-muted);
  font-size: var(--fs-xs);
  line-height: 2;
  margin-bottom: 32px;
  text-align: center;
}
@media (min-width: 768px) { .hours-note { display: block; } }

/* Mobile cards */
.hours-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 32px;
}
@media (min-width: 480px) { .hours-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .hours-cards { display: none; } }

.hours-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.hours-card--closed { opacity: 0.6; }
.hours-card-day {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-main);
  min-width: 32px;
  padding-top: 2px;
}
.hours-card--closed .hours-card-day { color: var(--c-muted); }
.hours-card-slots { display: flex; flex-direction: column; gap: 6px; }

.slot {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.slot.open    { background: #dcfce7; color: var(--c-open); }
.slot.closed  { background: #fee2e2; color: var(--c-closed); }
.slot.partial { background: #fef3c7; color: var(--c-soon); }

.tel-cta {
  text-align: center;
  margin-top: 40px;
}
.tel-cta p { color: var(--c-muted); font-size: var(--fs-sm); margin-bottom: 14px; }

/* ── Access ──────────────────────────────────────────────────── */
.access-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
@media (min-width: 768px) {
  .access-inner  { flex-direction: row; align-items: flex-start; gap: 48px; }
  .access-info   { flex: 0 0 280px; }
  .access-map    { flex: 1; }
}

.access-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
.access-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  padding-block: 14px;
  border-bottom: 1px solid var(--c-border);
}
.access-item:first-child { border-top: 1px solid var(--c-border); }
.access-item dt { font-weight: 700; color: var(--c-main); font-size: var(--fs-sm); padding-top: 2px; }
.access-item dd { font-size: var(--fs-sm); line-height: 1.7; }
.access-item dd a { color: var(--c-main); font-weight: 700; }
.access-item dd a:hover { text-decoration: underline; }

.map-btn { width: 100%; justify-content: center; }

.access-map iframe {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
  display: block;
}
@media (min-width: 768px) { .access-map iframe { height: 420px; } }

/* ── First Visit ─────────────────────────────────────────────── */
.fv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .fv-grid { grid-template-columns: repeat(3, 1fr); } }

.fv-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px 24px;
}
.fv-icon  { font-size: 40px; line-height: 1; margin-bottom: 16px; }
.fv-card h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--c-main);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--c-main-light);
}
.fv-list {
  list-style: disc;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--c-text);
  line-height: 1.7;
}

.fv-flow {
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fv-flow li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  font-size: var(--fs-sm);
  line-height: 1.75;
}
.fv-flow li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  background: var(--c-main);
  color: var(--c-white);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  line-height: 30px;
  text-align: center;
}
.fv-flow li strong { display: block; font-weight: 700; margin-bottom: 2px; }

/* ── News ────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow var(--ease), transform var(--ease);
}
.news-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.news-date  { font-size: var(--fs-xs); color: var(--c-muted); }
.news-tag   {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--c-main-light);
  color: var(--c-main);
  font-size: 12px;
  font-weight: 700;
  align-self: flex-start;
}
.news-title { font-size: var(--fs-md); font-weight: 700; line-height: 1.5; }
.news-body  { font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.8; flex: 1; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
  background: #111827;
  color: rgba(255,255,255,0.80);
  padding-block: 52px 24px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-bottom: 36px;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
.footer-corp  { font-size: var(--fs-xs); opacity: 0.6; margin-bottom: 4px; }
.footer-name  { font-size: var(--fs-xl); font-weight: 700; color: var(--c-white); margin-bottom: 14px; }
.footer-addr  { font-size: var(--fs-sm); line-height: 1.9; }
.footer-addr a { color: rgba(255,255,255,0.85); }
.footer-addr a:hover { color: var(--c-white); }

.footer-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a  { font-size: var(--fs-sm); color: rgba(255,255,255,0.70); transition: color var(--ease); }
.footer-nav a:hover { color: var(--c-white); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  text-align: center;
  font-size: var(--fs-xs);
  opacity: 0.45;
}

/* ── Accessibility ───────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--c-main);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
