:root {
  --deep-blue: #1a1a4e;
  --blue-accent: #2563eb;
  --accent: #ff5da2;
  --bg: #0f0f2d;
  --card-bg: #ffffff;
  --text-dark: #1c1c2e;
  --text-light: #eaf1ff;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--text-dark);
  background: #f7f6fb;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, var(--deep-blue), var(--blue-accent));
  color: var(--text-light);
  padding: 24px 20px 80px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -20px;
  background-image: url('/images/hero-photo.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.65);
  transform: scale(1.1);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 28, 0.4);
  z-index: 1;
}

.hero .navbar,
.hero .hero-content {
  position: relative;
  z-index: 2;
}

.navbar {
  max-width: 960px;
  margin: 0 auto 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-light);
  text-decoration: none;
}

.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 8px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  opacity: 0.8;
  margin: 0 0 8px;
}

.hero-content h1 {
  font-size: 2.6rem;
  margin: 0 0 12px;
}

.hero-desc {
  font-size: 1.1rem;
  margin: 0 0 4px;
}

.hero-dates {
  opacity: 0.85;
  margin: 0 0 28px;
}

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
}

.hero-deadline {
  margin-top: 16px;
  font-size: 0.9rem;
  opacity: 0.75;
}

main {
  max-width: 960px;
  margin: -48px auto 0;
  padding: 0 20px 80px;
}

.intro, .programs, .gallery, .apply-banner {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  margin-bottom: 32px;
  box-shadow: 0 12px 32px rgba(26, 26, 78, 0.08);
}

.intro h2 {
  margin-top: 0;
  color: var(--deep-blue);
}

.intro p {
  color: #445067;
  line-height: 1.7;
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Scroll-reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.program-grid .program-card,
.gallery-grid .gallery-placeholder {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.program-grid.is-visible .program-card,
.gallery-grid.is-visible .gallery-placeholder {
  opacity: 1;
  transform: translateY(0);
}

.program-grid .program-card:nth-child(1), .gallery-grid .gallery-placeholder:nth-child(1) { transition-delay: 0s; }
.program-grid .program-card:nth-child(2), .gallery-grid .gallery-placeholder:nth-child(2) { transition-delay: 0.1s; }
.program-grid .program-card:nth-child(3), .gallery-grid .gallery-placeholder:nth-child(3) { transition-delay: 0.2s; }
.program-grid .program-card:nth-child(4), .gallery-grid .gallery-placeholder:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .program-grid .program-card,
  .gallery-grid .gallery-placeholder {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.programs h2, .gallery h2 {
  margin-top: 0;
  color: var(--deep-blue);
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.program-card {
  background: #eaf1ff;
  border-radius: 12px;
  padding: 20px;
}

.program-index {
  display: inline-block;
  font-weight: 800;
  color: var(--blue-accent);
  font-size: 1.4rem;
}

.program-date {
  margin: 8px 0 4px;
  color: #5f7290;
  font-size: 0.9rem;
}

.program-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.gallery-placeholder {
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(45deg, #e6eefc, #e6eefc 10px, #dbe8fb 10px, #dbe8fb 20px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7488ad;
  font-size: 0.9rem;
}

.apply-banner {
  text-align: center;
  background: linear-gradient(135deg, var(--deep-blue), var(--blue-accent));
  color: var(--text-light);
}

.apply-banner h2 { color: var(--text-light); }

.sticky-cta {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 50;
}

@media (max-width: 640px) {
  .sticky-cta { display: block; }
  .hero-content h1 { font-size: 2rem; }
}

.site-footer {
  text-align: center;
  color: #7488ad;
  padding: 24px;
  font-size: 0.85rem;
}

/* Form pages (apply, admin login) */
.page-header {
  background: var(--deep-blue);
  padding: 16px 20px;
}

.page-header .brand {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 700;
}

.form-page {
  max-width: 560px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

.form-page h1 {
  color: var(--deep-blue);
}

.apply-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.apply-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--text-dark);
}

.apply-form input[type="text"],
.apply-form input[type="tel"],
.apply-form input[type="password"] {
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid #d2ddf5;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apply-form input[type="text"]:focus,
.apply-form input[type="tel"]:focus,
.apply-form input[type="password"]:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.apply-form select,
.admin-toolbar select {
  appearance: none;
  -webkit-appearance: none;
  padding: 12px 40px 12px 14px;
  border-radius: 10px;
  border: 2px solid #d2ddf5;
  font-size: 1rem;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%232563eb' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apply-form select:focus,
.admin-toolbar select:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.radio-group, .checkbox-group {
  border: none;
  padding: 0;
}

.radio-group legend, .checkbox-group legend {
  display: block;
  width: 100%;
  font-weight: 700;
  color: var(--deep-blue);
  padding: 0;
  margin-bottom: 10px;
}

/* Gender pills */
.radio-group {
  display: flex;
  gap: 10px;
}

.radio-group legend {
  flex-basis: 100%;
}

.radio-group label {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px;
  border: 2px solid #d2ddf5;
  border-radius: 12px;
  font-weight: 600;
  color: #5f7290;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.radio-group label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-group label:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(135deg, var(--deep-blue), var(--blue-accent));
  color: #fff;
}

/* Session checkbox cards */
.checkbox-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.checkbox-group label {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 2px solid #d2ddf5;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checkbox-group label input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-group .check-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #d2ddf5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checkbox-group .check-icon::after {
  content: '';
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
  transition: opacity 0.1s ease;
}

.checkbox-group label:has(input:checked) {
  border-color: var(--blue-accent);
  background: #eaf1ff;
}

.checkbox-group label:has(input:checked) .check-icon {
  background: var(--blue-accent);
  border-color: var(--blue-accent);
}

.checkbox-group label:has(input:checked) .check-icon::after {
  opacity: 1;
}

.error-list {
  background: #fff0f3;
  color: #c0295b;
  border-radius: 10px;
  padding: 16px 20px;
}

.notice {
  background: #eaf1ff;
  color: var(--deep-blue);
  padding: 16px 20px;
  border-radius: 10px;
}

.notice.error {
  background: #fff0f3;
  color: #c0295b;
}

/* Admin */
.admin-page {
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 20px 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.link-button {
  background: none;
  border: none;
  color: var(--blue-accent);
  font-weight: 700;
  cursor: pointer;
}

.cta-button.small {
  padding: 10px 20px;
  font-size: 0.9rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.admin-table th {
  background: var(--deep-blue);
  color: var(--text-light);
}
