 /* ===================================
   Kyushu Lymphedema Treatment Study Group - Common Styles
   =================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&family=Noto+Serif+JP:wght@400;600;700&display=swap');

/* CSS Variables */
:root {
  --primary:       #1a6b8a;
  --primary-dark:  #124f68;
  --primary-light: #e8f4f9;
  --accent:        #4caf8a;
  --accent-dark:   #3a9070;
  --text-main:     #1e2d3a;
  --text-sub:      #5a6a78;
  --border:        #d0e4ef;
  --bg-light:      #f5fafd;
  --bg-white:      #ffffff;
  --shadow-sm:     0 2px 8px rgba(26,107,138,.08);
  --shadow-md:     0 4px 20px rgba(26,107,138,.14);
  --shadow-lg:     0 8px 40px rgba(26,107,138,.18);
  --radius:        10px;
  --radius-lg:     18px;
  --transition:    0.25s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  color: var(--text-main);
  background: var(--bg-white);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }

/* ===== HEADER ===== */
header {
  background: var(--primary-dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}

.site-logo .logo-icon {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.site-logo .logo-text {
  font-size: .78rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: .02em;
}

.site-logo .logo-sub {
  font-size: .68rem;
  font-weight: 400;
  opacity: .8;
}

/* Navigation */
nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}

nav ul li a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius);
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #2a9a8a 100%);
  color: #fff;
  padding: 80px 24px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 5px 18px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 16px;
  letter-spacing: .04em;
}

.hero p {
  font-size: clamp(.9rem, 2vw, 1.1rem);
  opacity: .88;
  max-width: 600px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(76,175,138,.4);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-color: #fff;
}

.btn-secondary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== MAIN CONTENT ===== */
main { flex: 1; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 70px 0;
}

.section-alt {
  background: var(--bg-light);
}

.section-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
  letter-spacing: .03em;
  line-height: 1.35;
}

.section-subtitle {
  font-size: .92rem;
  color: var(--text-sub);
  margin-bottom: 44px;
  line-height: 1.7;
}

.section-header {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}

.section-header .line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--primary), transparent);
}

/* ===== CARD ===== */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

/* ===== FORM STYLES ===== */
.form-container {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 7px;
}

.form-group label .required {
  color: #e05050;
  font-size: .78rem;
  margin-left: 5px;
  padding: 2px 6px;
  background: #fef0f0;
  border-radius: 4px;
}

.form-group label .optional {
  color: var(--text-sub);
  font-size: .76rem;
  margin-left: 5px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .92rem;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,138,.12);
}

.form-control::placeholder { color: #aab8c4; }

textarea.form-control { resize: vertical; min-height: 120px; }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6a78' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-group, .radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.check-item, .radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: .9rem;
}

.check-item input[type="checkbox"],
.radio-item input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-note {
  font-size: .8rem;
  color: var(--text-sub);
  margin-top: 6px;
  line-height: 1.5;
}

.form-submit {
  text-align: center;
  margin-top: 32px;
}

/* ===== SUCCESS / ERROR MESSAGE ===== */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.6;
}

.alert-success {
  background: #f0faf4;
  border: 1px solid #a8dfb4;
  color: #2e7d4f;
}

.alert-error {
  background: #fef6f6;
  border: 1px solid #f5b8b8;
  color: #c0392b;
}

.alert-info {
  background: var(--primary-light);
  border: 1px solid #b0d8ec;
  color: var(--primary-dark);
}

/* ===== PAGE HERO (sub pages) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 52px 24px 48px;
  text-align: center;
}

.page-hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 10px;
}

.page-hero p {
  font-size: .92rem;
  opacity: .85;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--bg-light);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-sub);
  flex-wrap: wrap;
}

.breadcrumb ol li::after { content: '›'; margin-left: 6px; }
.breadcrumb ol li:last-child::after { content: ''; }
.breadcrumb ol li a { color: var(--primary); }

/* ===== FOOTER ===== */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  padding: 48px 24px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.footer-brand .brand-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
}

.footer-brand p {
  font-size: .82rem;
  line-height: 1.7;
  opacity: .75;
}

.footer-nav h4 {
  font-size: .84rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.footer-nav ul li { margin-bottom: 8px; }
.footer-nav ul li a {
  font-size: .82rem;
  color: rgba(255,255,255,.7);
  transition: color var(--transition);
}
.footer-nav ul li a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1100px;
  margin: 20px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  flex-wrap: wrap;
  gap: 8px;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-40 { margin-bottom: 40px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.tag {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: .76rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
}
.tag-accent { background: #e8f7f1; color: var(--accent-dark); }

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  nav {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--primary-dark);
    padding: 24px;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
    z-index: 999;
  }

  nav.open { transform: translateX(0); }

  nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  nav ul li a {
    padding: 14px 16px;
    font-size: .94rem;
    border-radius: var(--radius);
  }

  .form-row { grid-template-columns: 1fr; }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .form-container { padding: 24px 20px; }
  .hero { padding: 56px 20px 50px; }
  .section { padding: 50px 0; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }
}