/* ============================================
   Culture Program - Standalone CSS
   Font: Pretendard (load via HTML <link>)
   https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css
   ============================================ */

/* --- 1. CSS Variables --- */
:root {
  --culture-primary: #C0785C;
  --culture-primary-dark: #A8624A;
  --culture-primary-light: #D4A08A;
  --culture-secondary: #8B5E3C;
  --culture-bg: #FBF8F5;
  --culture-text: #3D3028;
  --culture-text-light: #7A6E64;
  --culture-border: #E8E0D8;
  --culture-card-bg: #FFFFFF;
  --culture-shadow: 0 2px 12px rgba(61,48,40,.08);
  --culture-shadow-lg: 0 8px 24px rgba(61,48,40,.12);
  --culture-radius: 12px;
  --culture-radius-sm: 8px;
  --culture-nav-h: 56px;
  --culture-bottom-nav-h: 60px;
  /* category */
  --cat-music: #7C5CBF;
  --cat-literature: #4A7FBF;
  --cat-craft: #BF7C3C;
  --cat-other: #8A8A8A;
  /* status */
  --status-recruiting: #2D9D5E;
  --status-active: #3B7FD9;
  --status-closed: #999;
}

/* --- 2. Reset / Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--culture-bg);
  color: var(--culture-text);
  line-height: 1.6;
  min-height: 100dvh;
  padding-bottom: var(--culture-bottom-nav-h);
}
a { color: var(--culture-primary-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--culture-secondary); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- 3. Navigation --- */
/* -- Desktop nav (hidden on mobile) -- */
.nav-desktop {
  display: none;
  position: sticky; top: 0; z-index: 100;
  background: var(--culture-card-bg);
  border-bottom: 1px solid var(--culture-border);
  height: var(--culture-nav-h);
}
.nav-desktop-inner {
  max-width: 1024px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 100%;
}
.nav-logo { font-weight: 700; font-size: 1.125rem; color: var(--culture-text); }
.nav-logo span { color: var(--culture-primary); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: .9rem; font-weight: 500; color: var(--culture-text-light); }
.nav-links a:hover, .nav-links a.active { color: var(--culture-primary); }

/* -- Mobile bottom nav -- */
.nav-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--culture-card-bg);
  border-top: 1px solid var(--culture-border);
  height: var(--culture-bottom-nav-h);
  display: flex; align-items: center; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-bottom-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: .65rem; font-weight: 500; color: var(--culture-text-light);
  padding: 6px 12px; transition: color .2s;
}
.nav-bottom-item svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.nav-bottom-item.active, .nav-bottom-item:hover { color: var(--culture-primary); }

/* --- 4. Hero Section --- */
.hero {
  background: linear-gradient(135deg, var(--culture-primary) 0%, var(--culture-secondary) 100%);
  color: #fff; text-align: center;
  padding: 56px 20px 48px;
}
.hero h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 10px; }
.hero p { font-size: .95rem; opacity: .9; max-width: 480px; margin: 0 auto 20px; line-height: 1.5; }
.hero .btn-hero {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--culture-primary-dark);
  font-weight: 700; font-size: .95rem;
  padding: 12px 28px; border-radius: 50px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); transition: transform .2s;
}
.hero .btn-hero:hover { transform: translateY(-2px); color: var(--culture-secondary); }

/* --- 5. Cards --- */
.card {
  background: var(--culture-card-bg);
  border-radius: var(--culture-radius);
  box-shadow: var(--culture-shadow);
  overflow: hidden; transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--culture-shadow-lg); transform: translateY(-3px); }
.card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-body { padding: 16px; }
.card-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.card-desc { font-size: .85rem; color: var(--culture-text-light); line-height: 1.5; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .8rem; color: var(--culture-text-light); }

/* Instructor profile card */
.profile-card { text-align: center; padding: 28px 16px; }
.profile-card .avatar {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 12px;
  border: 3px solid var(--culture-primary-light);
}
.profile-card .name { font-size: 1rem; font-weight: 700; }
.profile-card .role { font-size: .82rem; color: var(--culture-text-light); margin-top: 2px; }

/* --- 6. Category Badges --- */
.badge-cat {
  display: inline-block; font-size: .7rem; font-weight: 600;
  padding: 3px 10px; border-radius: 50px; color: #fff;
}
.badge-cat--music { background: var(--cat-music); }
.badge-cat--literature { background: var(--cat-literature); }
.badge-cat--craft { background: var(--cat-craft); }
.badge-cat--other { background: var(--cat-other); }

/* --- 7. Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600; border-radius: var(--culture-radius-sm);
  padding: 10px 22px; font-size: .9rem; transition: all .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--culture-primary), var(--culture-primary-dark));
  color: #fff; box-shadow: 0 4px 12px rgba(192,120,92,.3);
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); color: #fff; }
.btn-secondary {
  background: transparent; color: var(--culture-primary-dark);
  border: 1.5px solid var(--culture-primary);
}
.btn-secondary:hover { background: var(--culture-primary); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* --- 8. Form Elements --- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.form-input, .form-select {
  width: 100%; padding: 10px 14px; font-size: .9rem;
  border: 1.5px solid var(--culture-border); border-radius: var(--culture-radius-sm);
  background: var(--culture-card-bg); color: var(--culture-text);
  transition: border-color .2s; font-family: inherit;
}
.form-input:focus, .form-select:focus {
  outline: none; border-color: var(--culture-primary);
  box-shadow: 0 0 0 3px rgba(192,120,92,.15);
}
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A6E64' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.form-check input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--culture-primary);
  border-radius: 4px; cursor: pointer;
}
textarea.form-input { resize: vertical; min-height: 100px; }

/* --- 9. Modal --- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.45); display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--culture-card-bg); border-radius: var(--culture-radius);
  width: 100%; max-width: 480px; max-height: 85dvh; overflow-y: auto;
  box-shadow: var(--culture-shadow-lg); padding: 24px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close { font-size: 1.5rem; color: var(--culture-text-light); padding: 4px; line-height: 1; }

/* --- 10. Grid --- */
.grid-2, .grid-3 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

/* --- 11. Section / Container --- */
.container { max-width: 1024px; margin: 0 auto; padding: 0 16px; }
.section { padding: 36px 0; }
.section-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.section-desc { font-size: .88rem; color: var(--culture-text-light); margin-bottom: 20px; }

/* --- 12. Loading Spinner --- */
.spinner-wrap { display: flex; align-items: center; justify-content: center; padding: 60px 0; }
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--culture-border);
  border-top-color: var(--culture-primary); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 13. Footer --- */
.footer {
  text-align: center; padding: 32px 16px;
  font-size: .78rem; color: var(--culture-text-light);
  border-top: 1px solid var(--culture-border); margin-top: 24px;
}
.footer a { color: var(--culture-text-light); text-decoration: underline; }

/* --- 14. Curriculum Timeline --- */
.timeline { position: relative; padding-left: 36px; }
.timeline::before {
  content: ''; position: absolute; left: 14px; top: 4px; bottom: 4px;
  width: 2px; background: var(--culture-border);
}
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-node {
  position: absolute; left: -36px; top: 2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--culture-primary); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.timeline-item.done .timeline-node { background: var(--culture-text-light); }
.timeline-content h4 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.timeline-content p { font-size: .82rem; color: var(--culture-text-light); }

/* --- 15. Status Badges --- */
.badge-status {
  display: inline-block; font-size: .7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px; color: #fff;
}
.badge-status--recruiting { background: var(--status-recruiting); }
.badge-status--active { background: var(--status-active); }
.badge-status--closed { background: var(--status-closed); }

/* --- 16. Empty State --- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--culture-text-light); }
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: .9rem; }

/* --- 17. Share Buttons --- */
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 50px; font-size: .8rem; font-weight: 600;
  border: 1.5px solid var(--culture-border); color: var(--culture-text);
  transition: background .2s, border-color .2s;
}
.share-btn:hover { background: var(--culture-primary); color: #fff; border-color: var(--culture-primary); }
.share-btn svg { width: 16px; height: 16px; }

/* --- 18. Utility Classes --- */
.text-xs { font-size: .75rem; } .text-sm { font-size: .85rem; } .text-base { font-size: 1rem; }
.text-lg { font-size: 1.15rem; } .text-xl { font-size: 1.3rem; }
.text-center { text-align: center; } .text-light { color: var(--culture-text-light); }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.p-1 { padding: 8px; } .p-2 { padding: 16px; } .p-3 { padding: 24px; }
.px-1 { padding-left: 8px; padding-right: 8px; } .px-2 { padding-left: 16px; padding-right: 16px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; } .flex-1 { flex: 1; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded { border-radius: var(--culture-radius); }

/* --- 19. Enrollment Count Bar --- */
.enroll-bar { margin-top: 12px; }
.enroll-bar-label { display: flex; justify-content: space-between; font-size: .78rem; color: var(--culture-text-light); margin-bottom: 4px; }
.enroll-bar-track {
  height: 8px; border-radius: 4px; background: var(--culture-border); overflow: hidden;
}
.enroll-bar-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--culture-primary), var(--culture-primary-dark));
  transition: width .4s ease;
}
.enroll-bar-fill.full { background: var(--status-closed); }

/* --- 20. Responsive Breakpoints --- */

/* Tablet: 768px */
@media (min-width: 768px) {
  .hero { padding: 72px 24px 60px; }
  .hero h1 { font-size: 2.2rem; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 48px 0; }
  .container { padding: 0 24px; }
}

/* Desktop: 1024px */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .nav-desktop { display: block; }
  .nav-bottom { display: none; }
  .hero { padding: 88px 24px 72px; }
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.05rem; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 56px 0; }
  .card-body { padding: 20px; }
}
