/* ──────────────────────────────────────────────────────────────
   로봇학습연구회 (Robot Learning Research Society)
   공통 스타일 — 네 페이지(홈·이전 워크샵·Photo·가입신청)가 함께 사용합니다.
   디자인 토큰·헤더·탭·히어로·카드·푸터를 이 파일에서 일괄 관리합니다.
   ────────────────────────────────────────────────────────────── */

:root {
  /* 웜 뉴트럴 배경 (레드 팔레트에 맞춘 아이보리·웜 그레이 계열) */
  --bg: #faf6f3;
  --bg2: #ffffff;
  --bg3: #f4ece7;
  --border: #ecdfd8;
  /* 브랜드 레드 (#DB2416) 와 파생 톤 */
  --accent: #db2416;
  --accent2: #f5532e;        /* 밝은 주황빛 레드 */
  --accent-dark: #8a1409;    /* 진한 마룬 */
  /* 히어로 전용 눌린 톤 — 원색을 넓은 면적에 깔면 자극이 강해 채도를 낮춘 벽돌·테라코타 계열 */
  --hero-deep: #4e1712;
  --hero-mid: #8e2a1f;
  --hero-soft: #b04a35;
  --accent-dim: rgba(219,36,22,0.08);
  --accent-tint: #fdf2f0;    /* 아주 옅은 레드 틴트 */
  --text: #1f1815;
  --text-muted: #7a6a63;
  --text-dim: #a99b93;
  --green: #059669;
  --amber: #d97706;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Noto Sans KR', sans-serif;
  --shadow: 0 1px 3px rgba(60,20,10,0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Header + 탭 내비게이션 ── */
header {
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  z-index: 100;
}
.logo {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--text-muted); font-weight: 400; }
.logo img { height: 46px; display: block; width: auto; }

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
}
.tab {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: var(--accent); background: var(--accent-dim); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--hero-deep) 0%, var(--hero-mid) 58%, var(--hero-soft) 100%);
  padding: 64px 40px 68px;
  color: white;
  /* 자식을 자르지 않도록 position + z-index 로 아래 섹션보다 위에 그립니다.
     (히어로에 clip-path 를 걸면 일정 추가 팝업처럼 밖으로 나오는 자식까지 잘립니다.) */
  position: relative;
  z-index: 1;
}
/* 하단 사선 마감 — 본문 배경색 삼각형을 덮어 그려 원본의 직선 마감과 구별합니다. */
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26px;
  background: var(--bg);
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { max-width: 900px; margin: 0 auto; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: rgba(255,255,255,0.4);
}
h1 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: white;
}
h1 em { font-style: normal; color: rgba(255,255,255,0.75); }
.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
}
.hero-sub:last-child { margin-bottom: 0; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px; }
.meta-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
}
.meta-chip .icon { font-size: 15px; }
.meta-chip .label { color: rgba(255,255,255,0.6); font-size: 11px; display: block; }
.meta-chip .value { color: white; font-weight: 500; }
.meta-chip .value.tbd { color: rgba(255,255,255,0.6); font-style: italic; font-weight: 400; }
.chip-accent { border-color: rgba(255,255,255,0.4); }

/* 히어로 칩 내부 아이콘 링크 (일시=캘린더 추가, 장소=지도 앱) */
.chip-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  /* 어두운 히어로 배경에서 로고 색이 묻히지 않도록 밝은 배경으로 대비 확보 */
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 3px rgba(60,20,10,0.3);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.chip-icon img { width: 16px; height: 16px; display: block; }
.chip-icon svg { width: 16px; height: 16px; display: block; }
.chip-icon:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(60,20,10,0.35);
}

/* 일시 칩의 "일정 추가" 팝업 */
/* 팝업이 히어로의 사선 마감(.hero::after)과 아래 섹션보다 위에 오도록 */
.cal-add { position: relative; display: inline-flex; z-index: 20; }
.cal-add-btn {
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.cal-add-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 200;
  width: 280px;
  max-width: calc(100vw - 40px);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(60,20,10,0.25);
  padding: 6px;
  /* 밝은 카드이므로 히어로의 흰 글자색을 본문 색으로 되돌립니다. */
  color: var(--text);
}
.cal-add-menu[hidden] { display: none; }
.cal-add-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
}
.cal-add-item:hover { background: var(--bg3); }
.cal-add-item img,
.cal-add-item svg { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.cai-text { display: flex; flex-direction: column; line-height: 1.35; }
.cai-label { font-size: 13px; font-weight: 500; color: var(--text); }
.cai-desc { font-family: var(--mono); font-size: 10px; color: var(--text-muted); }
.cal-add-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 8px 10px 4px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

/* ── Section ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 40px; }
section { padding: 48px 0; border-top: 1px solid var(--border); }
section:first-child { border-top: none; }
.section-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 13px;
  background: var(--accent);
  border-radius: 2px;
}
h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ── Program Table ── */
.program-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.program-table th {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: left;
  padding: 11px 16px;
  border-bottom: 2px solid var(--accent);
  background: var(--accent-tint);
}
.program-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.program-table tr:last-child td { border-bottom: none; }
.program-table tbody tr:hover td { background: var(--accent-tint); }
.time-cell {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  width: 90px;
}
.time-cell.tbd { font-weight: 400; }
.type-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  margin-bottom: 5px;
}
.badge-talk { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(219,36,22,0.2); }
.badge-break { background: var(--bg3); color: var(--text-muted); border: 1px solid var(--border); }
.badge-open { background: rgba(5,150,105,0.08); color: var(--green); border: 1px solid rgba(5,150,105,0.2); }
.badge-discussion { background: rgba(217,119,6,0.08); color: var(--amber); border: 1px solid rgba(217,119,6,0.2); }
.talk-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 4px;
}
.talk-title em { font-style: italic; color: var(--text-muted); }
.talk-speaker { font-size: 12px; color: var(--text-muted); }
.talk-speaker strong { color: var(--text); }
.tbd { color: var(--text-dim); font-style: italic; }

/* ── Speaker Cards ── */
.speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.speaker-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* 카드 상단 레드 액센트 라인 */
.speaker-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.speaker-card.tbd-card::before { background: var(--border); }
.speaker-card:hover { border-color: rgba(219,36,22,0.4); box-shadow: 0 6px 16px rgba(138,20,9,0.12); transform: translateY(-2px); }
.speaker-card.confirmed { border-color: rgba(219,36,22,0.3); background: var(--accent-tint); }
.speaker-card.tbd-card { opacity: 0.72; }
.sc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sc-num { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.sc-status {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 3px;
}
.status-confirmed { background: rgba(5,150,105,0.08); color: var(--green); border: 1px solid rgba(5,150,105,0.2); }
.status-expected { background: rgba(217,119,6,0.08); color: var(--amber); border: 1px solid rgba(217,119,6,0.2); }
.sc-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.sc-name.tbd { font-weight: 500; }
.sc-affil { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.sc-title {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--bg3);
  border-radius: 4px;
  border-left: 2px solid var(--accent);
}
.sc-title.tbd-title {
  color: var(--text-dim);
  border-left-color: var(--border);
  font-style: italic;
}

/* ── Info Grid ── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.info-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 4px 8px 8px 4px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.info-box h3 {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.info-row { display: flex; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.info-row:last-child { margin-bottom: 0; }
.info-key { color: var(--text-muted); min-width: 64px; flex-shrink: 0; }
.info-val { color: var(--text); }

/* ── Notice ── */
.notice {
  background: var(--accent-tint);
  border: 1px solid rgba(219,36,22,0.2);
  border-radius: 8px;
  padding: 14px 18px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 24px;
}
.notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.notice strong { color: var(--accent); }

/* ── Empty State (빈 상태 안내) ── */
.empty-state {
  background: var(--bg2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 60px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.empty-state .es-icon { font-size: 42px; margin-bottom: 14px; line-height: 1; }
.empty-state .es-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.empty-state .es-desc { font-size: 14px; color: var(--text-muted); max-width: 420px; margin: 0 auto; }

/* ── Workshop Archive Cards ── */
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.workshop-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  display: block;
  overflow: hidden;
}
.workshop-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}
.workshop-card:hover { box-shadow: 0 6px 18px rgba(138,20,9,0.14); border-color: rgba(219,36,22,0.35); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.card-num { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.card-badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
  background: rgba(5,150,105,0.08);
  color: var(--green);
  border: 1px solid rgba(5,150,105,0.2);
}
.card-badge.upcoming { background: var(--accent-dim); color: var(--accent); border-color: rgba(219,36,22,0.2); }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.card-meta { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; }

/* ── Photo Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.gallery-grid figure {
  margin: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery-grid figure img { width: 100%; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-grid figcaption {
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Photo 서브탭 (회차별 갤러리) ── */
.subtab-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.subtab-btn {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.subtab-btn:hover { color: var(--accent); background: var(--accent-dim); }
.subtab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.subtab-panel[hidden] { display: none; }
.subtab-panel h2,
.subtab-panel h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.subtab-album { margin-bottom: 20px; }

/* ── 가입신청 폼 영역 ── */
.form-placeholder {
  background: var(--accent-tint);
  border: 1px dashed rgba(219,36,22,0.35);
  border-radius: 12px;
  padding: 44px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.form-placeholder .fp-icon { font-size: 40px; margin-bottom: 12px; line-height: 1; }
.form-placeholder .fp-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.form-placeholder .fp-desc { font-size: 14px; color: var(--text-muted); max-width: 460px; margin: 0 auto 18px; }
.form-embed {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg2);
}
.form-embed iframe { width: 100%; min-height: 900px; border: none; display: block; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg2);
  border: 1px solid rgba(219,36,22,0.3);
  border-radius: 6px;
  padding: 9px 16px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--accent-dim); border-color: var(--accent); }

.prose { font-size: 14px; color: var(--text-muted); line-height: 1.8; }
.prose strong { color: var(--text); }

/* ── Footer ── */
footer {
  border-top: 3px solid var(--accent);
  padding: 30px 40px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.66);
  font-family: var(--mono);
  background: #241512;
}
footer a { color: rgba(255,255,255,0.82); text-decoration: none; }
footer a:hover { color: var(--accent2); }

/* ── 모바일 반응형 ── */
@media (max-width: 640px) {
  header {
    padding: 8px 16px;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .tabs { width: 100%; }
  .hero { padding: 48px 20px 40px; }
  h1 { font-size: 26px; }
  .container { padding: 0 20px; }
  .info-grid { grid-template-columns: 1fr; }
  .speaker-grid { grid-template-columns: 1fr; }
  .workshop-grid { grid-template-columns: 1fr; }
  .subtab-bar { flex-wrap: nowrap; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
