/* ============================================================
   順康復健科診所 — Pure Static CSS
   色彩: red #b81010, accent #d4441a, light bg #f7f8fa
   字型: Noto Sans TC + Roboto
   ============================================================ */

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 18.5px; }
body { font-family: 'Noto Sans TC', 'Roboto', sans-serif; color: #333; background: #fff; line-height: 1.7; font-size: 18.5px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-block; padding: 11px 28px; border-radius: 4px; font-size: 17px; font-weight: 500; transition: background 0.25s, color 0.25s, border-color 0.25s; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: #d4441a; color: #fff; border-color: #d4441a; }
.btn-primary:hover { background: #b83515; border-color: #b83515; }

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: rgba(255,255,255,0.97); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 80px; }
.brand img { height: 56px; width: auto; }
.site-nav { display: flex; gap: 4px; }
.nav-link { display: flex; flex-direction: column; align-items: center; padding: 8px 14px; font-size: 17px; font-weight: 500; color: #333; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; line-height: 1.3; }
.nav-link small { font-size: 10px; font-weight: 400; color: #d4441a; display: block; }
.nav-link:hover { color: #d4441a; border-bottom-color: #d4441a; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #333; transition: all 0.3s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   TOP CONTACT BAR
   ============================================================ */
.top-contact-bar { background: #b81010; color: #fff; font-size: 15px; margin-top: 80px; }
.top-contact-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 20px; }
.contact-item a { color: #fff; }
.contact-item a:hover { text-decoration: underline; }
.contact-divider { color: rgba(255,255,255,0.5); }
.contact-en { opacity: 0.9; }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-section { position: relative; width: 100%; height: 70vh; min-height: 400px; max-height: 700px; overflow: hidden; }
.hero-slider { position: relative; width: 100%; height: 100%; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; opacity: 0; transition: opacity 0.7s ease-in-out; display: flex; align-items: flex-end; }
.hero-slide.active { opacity: 1; }
.hero-caption { background: rgba(0,0,0,0.52); color: #fff; padding: 24px 36px; margin-bottom: 60px; margin-left: 40px; border-left: 4px solid #d4441a; max-width: 600px; }
.hero-caption h2 { font-size: clamp(20px, 3vw, 32px); font-weight: 700; margin-bottom: 6px; }
.hero-caption p { font-size: clamp(12px, 1.5vw, 16px); opacity: 0.9; }
.hero-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.25); color: #fff; font-size: 36px; width: 48px; height: 64px; border-radius: 4px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; z-index: 10; line-height: 1; }
.hero-btn:hover { background: rgba(212,68,26,0.75); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.hero-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); border: 2px solid rgba(255,255,255,0.7); transition: background 0.2s; }
.hero-dot.active, .hero-dot:hover { background: #d4441a; border-color: #d4441a; }

/* ============================================================
   INFO BAND
   ============================================================ */
.info-band { background: #f7f8fa; padding: 40px 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-card { background: #fff; padding: 28px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.info-card-header { display: flex; align-items: flex-start; gap: 10px; font-size: 18px; font-weight: 600; margin-bottom: 16px; color: #333; border-bottom: 2px solid #f0f0f0; padding-bottom: 12px; }
.info-icon { font-size: 20px; color: #d4441a; flex-shrink: 0; }
.hours-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: 17px; }
.hours-table td { padding: 6px 8px; }
.hours-label { color: #555; }
.hours-value { font-weight: 600; color: #333; text-align: right; }
.hours-value.closed { color: #b81010; }
.services-list { margin-bottom: 18px; }
.services-list li { padding: 9px 0; font-size: 17px; border-bottom: 1px solid #f5f5f5; color: #444; }
.services-list li::before { content: "✓ "; color: #d4441a; font-weight: 700; }

/* ============================================================
   PAGE SECTIONS
   ============================================================ */
.page-section { padding: 60px 0; }
.section-light { background: #f7f8fa; }
.section-title { font-size: clamp(32px, 4vw, 44px); font-weight: 700; color: #b81010; text-align: center; margin-bottom: 8px; }
.section-subtitle { font-size: 0.6em; font-weight: 400; color: #d4441a; display: block; }
.section-divider { text-align: center; margin: 12px 0 28px; }
.divider-line { display: inline-block; width: 80px; height: 3px; background: #d4441a; border-radius: 2px; }
.section-lead { text-align: center; font-size: 25px; color: #b81010; font-weight: 600; margin-bottom: 10px; letter-spacing: 0.3px; }
.section-lead-en { text-align: center; font-size: 14px; color: #888; margin-bottom: 28px; }
.section-intro { font-size: 18px; color: #555; margin-bottom: 8px; line-height: 1.9; text-align: center; }
.section-intro-en { font-size: 13px; color: #888; margin-bottom: 32px; line-height: 1.7; text-align: center; }

/* ============================================================
   DOCTORS
   ============================================================ */
.doctors-grid { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.doctor-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  padding: 32px;
  max-width: 800px;
  width: 100%;
  display: flex;
  gap: 32px;
  align-items: center;
}
.doctor-photo {
  flex: 0 0 240px;
  width: 240px;
  height: 280px;
  object-fit: cover;
  border-radius: 6px;
}
.doctor-info { flex: 1; min-width: 0; }
.doctor-name { font-size: 22px; font-weight: 700; color: #b81010; margin-bottom: 16px; text-align: left; }
.doctor-credentials { text-align: left; }
@media (max-width: 768px) {
  .doctor-card { flex-direction: column; padding: 24px; }
  .doctor-photo { flex: none; width: 100%; max-width: 240px; height: auto; aspect-ratio: 240/280; margin: 0 auto; }
  .doctor-name { text-align: center; }
}
.doctor-credentials li { padding: 9px 0; font-size: 17px; color: #444; border-bottom: 1px solid #f5f5f5; }
.doctor-credentials li::before { content: "✓ "; color: #d4441a; font-weight: 700; }

/* ============================================================
   TREATMENT
   ============================================================ */
.treatment-layout { display: grid; grid-template-columns: 300px 1fr; gap: 32px; margin-bottom: 36px; align-items: start; }
.treatment-main-img { width: 100%; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.treatment-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.treatment-list li { padding: 8px 0; font-size: 17px; color: #444; border-bottom: 1px solid #f0f0f0; }
.treatment-list li::before { content: "› "; color: #d4441a; font-weight: 700; }
.first-visit-notice { background: #f7f8fa; border-left: 4px solid #d4441a; padding: 20px 24px; border-radius: 0 6px 6px 0; }
.first-visit-notice h4 { color: #b81010; font-size: 18px; margin-bottom: 12px; }
.notice-list li { padding: 10px 0; font-size: 17px; color: #444; border-bottom: 1px solid #e8e8e8; line-height: 1.7; }
.notice-list li small { color: #888; font-size: 12px; }

/* ============================================================
   PEDIATRIC
   ============================================================ */
.pediatric-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 24px; }
.pediatric-img { width: 100%; height: 220px; object-fit: cover; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.10); }

/* ============================================================
   GALLERY GRID
   ============================================================ */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-item { display: block; position: relative; overflow: hidden; border-radius: 4px; cursor: pointer; }
.gallery-item img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-caption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; text-align: center; padding: 8px 6px; line-height: 1.4; transform: translateY(100%); transition: transform 0.3s ease; }
.gallery-caption small { font-size: 10px; opacity: 0.85; }
.gallery-item:hover .gallery-caption { transform: translateY(0); }

/* ============================================================
   LOCATION
   ============================================================ */
.location-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }
.map-wrap iframe { border-radius: 6px; width: 100%; }
.location-info { display: flex; flex-direction: column; gap: 20px; }
.location-block h3 { font-size: 14px; font-weight: 700; color: #b81010; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.location-block p { font-size: 14px; color: #444; line-height: 1.7; }
.location-block a { color: #d4441a; }
.location-block a:hover { text-decoration: underline; }
.location-block small { font-size: 12px; color: #888; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #222; color: #ccc; padding: 28px 0; text-align: center; }
.footer-inner p { font-size: 13px; margin: 4px 0; }
.site-footer a { color: #d4441a; }
.site-footer a:hover { text-decoration: underline; }

/* ============================================================
   MODAL (HOURS)
   ============================================================ */
.modal { display: none; position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.modal-content { position: relative; background: #fff; border-radius: 8px; padding: 32px; max-width: 700px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.25); }
.modal-close { position: absolute; top: 12px; right: 16px; font-size: 28px; color: #666; line-height: 1; }
.modal-close:hover { color: #b81010; }
.modal-title { font-size: 20px; font-weight: 700; color: #b81010; margin-bottom: 20px; }
.clinic-schedule-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.clinic-schedule-table th, .clinic-schedule-table td { border: 1px solid #ddd; padding: 8px 10px; text-align: center; line-height: 1.4; }
.clinic-schedule-table thead th { background: #b81010; color: #fff; }
.clinic-schedule-table tbody th { background: #f7f8fa; font-weight: 600; }
.schedule-li { background: #d4f0d4; color: #1a6b1a; font-weight: 600; font-size: 12px; }
.schedule-zhang { background: #ffd4d4; color: #9b1c1c; font-weight: 600; font-size: 12px; }
.rehab { background: #fff9e6; color: #7a6000; font-size: 12px; }
.schedule-notes { margin-top: 12px; }
.schedule-notes li { font-size: 13px; color: #666; padding: 4px 0; }
.schedule-notes li::before { content: "※ "; color: #d4441a; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox { display: none; position: fixed; inset: 0; z-index: 3000; align-items: center; justify-content: center; flex-direction: column; }
.lightbox.open { display: flex; }
.lightbox-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.88); }
.lightbox-close { position: absolute; top: 16px; right: 20px; font-size: 40px; color: #fff; z-index: 10; line-height: 1; opacity: 0.8; }
.lightbox-close:hover { opacity: 1; color: #d4441a; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); color: #fff; font-size: 48px; width: 56px; height: 80px; border-radius: 4px; display: flex; align-items: center; justify-content: center; z-index: 10; transition: background 0.2s; }
.lightbox-nav:hover { background: rgba(212,68,26,0.7); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-img-wrap { position: relative; z-index: 5; max-width: 90vw; max-height: 80vh; display: flex; align-items: center; justify-content: center; }
.lightbox-img { max-width: 90vw; max-height: 78vh; border-radius: 4px; object-fit: contain; }
.lightbox-footer { position: relative; z-index: 5; text-align: center; margin-top: 12px; }
.lightbox-caption { color: #fff; font-size: 14px; }
.lightbox-counter { color: rgba(255,255,255,0.6); font-size: 13px; margin-top: 4px; }

/* ============================================================
   RESPONSIVE — 992px
   ============================================================ */
@media (max-width: 992px) {
  .nav-toggle { display: flex; }
  .site-nav { display: none; position: absolute; top: 80px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px 0; box-shadow: 0 4px 12px rgba(0,0,0,0.12); gap: 0; }
  .site-nav.open { display: flex; }
  .nav-link { flex-direction: row; gap: 8px; align-items: center; padding: 12px 24px; border-bottom: 1px solid #f0f0f0; }
  .nav-link small { font-size: 11px; }
  .info-grid { grid-template-columns: 1fr; }
  .treatment-layout { grid-template-columns: 1fr; }
  .treatment-image-wrap { max-width: 320px; }
  .location-layout { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-en, .contact-en-divider { display: none; }
}

/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */
@media (max-width: 768px) {
  .hero-caption { margin-left: 16px; margin-bottom: 50px; padding: 16px 20px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .pediatric-gallery { grid-template-columns: 1fr; }
  .pediatric-img { height: 200px; }
  .treatment-lists { grid-template-columns: 1fr; }
  .doctors-grid { gap: 24px; }
  .doctor-card { padding: 20px; }
  .page-section { padding: 40px 0; }
}

/* ============================================================
   RESPONSIVE — 480px
   ============================================================ */
@media (max-width: 480px) {
  .brand img { height: 44px; }
  .hero-section { height: 55vh; min-height: 300px; }
  .hero-caption { margin: 0 12px 40px; padding: 12px 16px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery-item img { height: 140px; }
  .info-card { padding: 18px; }
  .clinic-schedule-table { font-size: 11px; }
  .clinic-schedule-table th, .clinic-schedule-table td { padding: 5px 4px; }
}
