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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans KR', sans-serif;
  background-color: #faf7f2;
  color: #3a3a3a;
  line-height: 1.8;
}

/* ── 헤더 ── */
header {
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 52px;
  width: auto;
}

.logo-fallback {
  display: none;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background-color: #4a7c59;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text .main {
  font-size: 16px;
  font-weight: 700;
  color: #4a7c59;
}

.logo-text .sub {
  font-size: 11px;
  color: #888;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: #444;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

nav a:hover {
  color: #4a7c59;
}

.nav-login {
  background-color: #4a7c59;
  color: #fff !important;
  padding: 7px 18px;
  border-radius: 20px;
  transition: background-color 0.2s !important;
}

.nav-login:hover {
  background-color: #3a6348 !important;
}

.nav-english {
  border: 1.5px solid #4a7c59;
  color: #4a7c59 !important;
  padding: 6px 16px;
  border-radius: 20px;
  transition: all 0.2s !important;
}

.nav-english:hover {
  background-color: #4a7c59;
  color: #fff !important;
}

/* ── 히어로 ── */
#hero {
  position: relative;
  min-height: 640px;
  background-image:
    url('images/hero.jpg'),
    radial-gradient(ellipse at 20% 50%, #a8d5b5 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, #b8dce8 0%, transparent 50%),
    linear-gradient(170deg, #1a3d2b 0%, #2d5a3d 25%, #4a7c59 55%, #7ab89a 80%, #a8cfc0 100%);
  background-size: cover, auto, auto, auto;
  background-position: center;
  display: flex;
  align-items: flex-end;
  text-align: center;
  padding: 0;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}

#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(74, 124, 89, 0.4) 0%, transparent 70%),
    radial-gradient(ellipse at 10% 80%, rgba(45, 90, 61, 0.5) 0%, transparent 40%),
    radial-gradient(ellipse at 90% 90%, rgba(122, 184, 154, 0.3) 0%, transparent 40%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 60px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-text {
  margin-bottom: 16px;
}

.hero-buttons {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

#hero h1 {
  font-size: 46px;
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 18px;
  letter-spacing: -1px;
  text-shadow: 0 3px 20px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-style: italic;
  margin-bottom: 16px !important;
  font-weight: 300;
}

#hero p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
  font-weight: 300;
}

.btn-primary {
  display: inline-block;
  background-color: #4a7c59;
  color: #fff;
  text-decoration: none;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.25s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #3a6348;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: #4a7c59;
  text-decoration: none;
  padding: 15px 36px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 500;
  border: 2px solid #4a7c59;
  margin-left: 14px;
  transition: all 0.25s;
}

.btn-secondary:hover {
  background-color: #4a7c59;
  color: #fff;
}

/* ── 섹션 공통 ── */
section {
  padding: 80px 24px;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 13px;
  color: #7ab89a;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: #2d5a3d;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 16px;
  color: #777;
  max-width: 580px;
  font-weight: 300;
}

/* ── 페이지 배너 ── */
.page-banner {
  background:
    linear-gradient(rgba(30, 70, 45, 0.75), rgba(30, 70, 45, 0.75)),
    linear-gradient(135deg, #2d5a3d, #4a7c59, #7ab89a);
  padding: 80px 24px;
  text-align: center;
}

.page-banner-inner h1 {
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.page-banner-inner p {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  font-weight: 300;
}

.page-banner-inner .section-label {
  color: rgba(255,255,255,0.7);
  margin-bottom: 12px;
}

.nav-active {
  color: #4a7c59 !important;
  font-weight: 700 !important;
}

/* ── 소개 ── */
#about {
  background-color: #fff;
}

.about-intro-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 70px;
  align-items: center;
}

.about-photo-wrap {
  text-align: center;
}

.about-photo-circle {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4.5;
  margin: 0 auto 20px;
  border-radius: 16px;
  overflow: hidden;
  border: 4px solid #a8cfc0;
  box-shadow: 0 8px 32px rgba(74, 124, 89, 0.15);
}

.about-photo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.photo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #c8e6c9, #a5d6b7);
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.about-name {
  font-size: 22px;
  font-weight: 700;
  color: #4a7c59;
  letter-spacing: -0.3px;
}

.about-intro-text p {
  font-size: 16px;
  color: #555;
  line-height: 1.95;
  margin-bottom: 20px;
  font-weight: 400;
}

.about-intro-text .intro-block {
  line-height: 1.75;
  margin-bottom: 28px;
}

.about-intro-text strong {
  color: #2d5a3d;
  font-weight: 700;
}

.btn-story {
  display: inline-block;
  border: 2px solid #4a7c59;
  color: #4a7c59;
  text-decoration: none;
  padding: 12px 34px;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.25s;
  margin-top: 6px;
}

.btn-story:hover {
  background-color: #4a7c59;
  color: #fff;
}

/* ── 나의 스토리 (홈) ── */
#story {
  background-color: #f5f0e8;
}

/* ── About Judy 페이지 ── */
.about-banner {
  background:
    linear-gradient(rgba(30, 70, 45, 0.72), rgba(30, 70, 45, 0.72)),
    linear-gradient(135deg, #2d5a3d, #4a7c59, #7ab89a);
  padding: 80px 24px;
  text-align: center;
}

.about-banner-inner h1 {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.about-banner-inner p {
  font-size: 16px;
  color: rgba(255,255,255,0.8);
  font-weight: 300;
}

.about-story-section {
  padding: 80px 24px;
  background-color: #fff;
  max-width: 1200px;
  margin: 0 auto;
}

.about-story-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 60px;
  align-items: center;
}

.story-heading {
  font-size: 28px;
  font-weight: 700;
  color: #2d5a3d;
  margin-bottom: 28px;
}

.story-heading span {
  font-size: 18px;
  font-weight: 400;
  color: #7ab89a;
}

.about-story-text .story-lang p {
  font-size: 16px;
  color: #555;
  line-height: 2;
  margin-bottom: 20px;
}

.about-story-text .story-lang strong {
  color: #2d5a3d;
  font-weight: 700;
}

.story-photo-frame {
  width: 100%;
  aspect-ratio: 3 / 4.5;
  border-radius: 16px;
  overflow: hidden;
  border: 4px solid #a8cfc0;
  box-shadow: 0 8px 32px rgba(74, 124, 89, 0.15);
}

.story-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.story-photo-frame .photo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #c8e6c9, #a5d6b7);
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

.empty-frame {
  background-color: #f0f4f1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #a8cfc0;
}

.empty-frame span {
  color: #a8cfc0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
}

@media (max-width: 768px) {
  .about-story-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .about-story-section {
    padding: 48px 20px;
  }
  .story-photo-frame {
    position: static;
    max-width: 260px;
    margin: 0 auto;
  }
  .about-banner-inner h1 {
    font-size: 32px;
  }
}

/* ── 소개 탭 ── */
.story-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 28px;
}

.tab-btn {
  padding: 10px 28px;
  border-radius: 50px;
  border: 2px solid #4a7c59;
  background-color: transparent;
  color: #4a7c59;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active {
  background-color: #4a7c59;
  color: #fff;
}

.tab-btn:hover:not(.active) {
  background-color: #e8f2ec;
}

.story-lang {
  display: none;
  max-width: 760px;
}

.story-lang.active {
  display: block;
}

.story-lang p {
  font-size: 16px;
  color: #555;
  line-height: 2;
  margin-bottom: 20px;
}

.story-lang strong {
  color: #2d5a3d;
  font-weight: 700;
}

/* ── 프로그램 ── */
#programs {
  background-color: #deeee3;
  padding: 0 0 80px;
}

.programs-title-area {
  text-align: center;
  padding: 70px 24px 50px;
}

.programs-main-title {
  font-size: 38px;
  font-weight: 700;
  color: #1e3d2b;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.programs-main-desc {
  font-size: 16px;
  color: #5a7a63;
  font-weight: 300;
  margin-top: 4px;
}

/* ── 프로그램 탭 ── */
.prog-tabs-wrap {
  overflow-x: auto;
  padding: 0 24px 8px;
  margin-bottom: 40px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.prog-tabs-wrap::-webkit-scrollbar { display: none; }

.prog-tabs {
  display: flex;
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.prog-tab {
  padding: 10px 20px;
  border-radius: 14px;
  border: 2px solid #4a7c59;
  background-color: transparent;
  color: #4a7c59;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Noto Sans KR', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  line-height: 1.4;
}

.prog-tab span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  border-top: 1px solid currentColor;
  margin-top: 3px;
  padding-top: 3px;
  opacity: 0.8;
  letter-spacing: 0.3px;
}

.prog-tab.active,
.prog-tab:hover {
  background-color: #4a7c59;
  color: #fff;
}

/* 2컬럼 레이아웃: 카드 목록 + 정보창 */
.programs-layout {
  display: flex;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: flex-start;
}

.prog-cards-col {
  flex: 1 1 0;
  min-width: 0;
}

.program-cards-wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.prog-card {
  background-color: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(45, 90, 61, 0.08);
  transition: transform 0.25s, box-shadow 0.25s, outline 0.15s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.prog-card-selected {
  outline: 3px solid #4a7c59;
  box-shadow: 0 6px 28px rgba(74, 124, 89, 0.22);
}

.prog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(45, 90, 61, 0.15);
}

.prog-card-img {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.prog-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 2;
}

.prog-emoji {
  font-size: 52px;
  position: relative;
  z-index: 1;
  display: none;
}

.prog-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  gap: 6px;
  z-index: 10;
}

.prog-card-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prog-card-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: #1e3d2b;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prog-card-body h3 small {
  font-size: 11px;
  font-weight: 400;
  color: #7ab89a;
  letter-spacing: 0.3px;
  border-top: 1px solid #d4ead9;
  padding-top: 4px;
}

.prog-card-body p {
  font-size: 14px;
  color: #666;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 16px;
  flex: 1;
}

.card-tag {
  display: inline-block;
  background-color: #e8f2ec;
  color: #4a7c59;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 12px;
  align-self: flex-start;
  margin-top: auto;
}

/* ── 갤러리 ── */
#gallery {
  padding: 80px 24px;
  background: #f9fcf9;
}

#gallery .section-title {
  margin-bottom: 8px;
}

.section-desc {
  color: #6b9e7a;
  font-size: 1rem;
  margin-bottom: 40px;
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.gal-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  border: 1.5px solid #a8cfc0;
  background: #fff;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #4a7c59;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.gal-tab span {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 2px;
}

.gal-tab.active,
.gal-tab:hover {
  background: #4a7c59;
  color: #fff;
  border-color: #4a7c59;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.gal-item {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gal-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.gal-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}

.gal-info {
  padding: 10px;
  background: #fff;
  height: 70px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 1px solid #f0f0f0;
}

.gal-info-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  min-height: 50px;
  background: #fafafa;
  transition: border-color 0.2s;
}

.gal-info-input:focus {
  outline: none;
  border-color: #4a7c59;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.1);
}

.gal-info-input:disabled {
  background: #f0f0f0;
  color: #999;
  cursor: default;
}

.gal-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #c8e6c9, #a8cfc0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #4a7c59;
  font-size: 32px;
}

.gal-placeholder span {
  font-size: 13px;
  font-weight: 500;
}

.gal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.gal-item {
  position: relative;
}

.gal-item:hover .gal-overlay {
  opacity: 1;
}

/* ── 강의 신청 ── */
#apply {
  background: #2c4a35;
  text-align: center;
  padding: 90px 24px;
}

#apply .section-label {
  color: #c8e6c9;
}

#apply .section-title {
  color: #fff;
  font-size: 36px;
  margin-bottom: 14px;
}

#apply p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  font-weight: 300;
  margin-bottom: 40px;
}

.btn-white {
  display: inline-block;
  background-color: #fff;
  color: #4a7c59;
  text-decoration: none;
  padding: 16px 44px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  transition: all 0.25s;
  border: none;
  cursor: pointer;
}

.btn-white:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

/* ── 문의 ── */
#contact {
  background-color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 50px;
}

.contact-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: #2d5a3d;
  margin-bottom: 20px;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 15px;
  color: #555;
}

.contact-list .icon {
  width: 38px;
  height: 38px;
  background-color: #e8f2ec;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.contact-list .info-text strong {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 2px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form h3 {
  font-size: 20px;
  font-weight: 700;
  color: #2d5a3d;
  margin-bottom: 6px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  color: #333;
  background-color: #faf7f2;
  transition: border-color 0.2s;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #7ab89a;
}

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

/* ── 푸터 ── */
footer {
  background-color: #2d3d32;
  color: #aaa;
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  color: #7ab89a;
  margin-bottom: 10px;
}

footer p {
  font-size: 13px;
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  #hero {
    min-height: 480px;
  }
}

/* ── 소셜 미디어 섹션 ── */
.social-section {
  background: #2c4a35;
  padding: 60px 20px;
  text-align: center;
}

.social-inner h3 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff;
  font-size: 22px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.social-icon:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/* ── 푸터 ── */
.footer-logo img {
  height: 55px;
  width: auto;
}

.footer-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-right {
  text-align: right;
}

.footer-right p {
  color: #a8cfc0;
  font-size: 0.85rem;
  line-height: 1.8;
}

.footer-copy {
  color: #7aab90 !important;
  font-size: 0.8rem !important;
}

/* ── 갤러리 관리자 모드: 삭제 버튼 / 업로드 모달 (gallery.html 전용) ── */
.gal-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(180, 30, 30, 0.85);
  color: #fff;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#upload-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.upload-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.upload-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
}

.upload-modal-close:hover { color: #333; }

.upload-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #2c4a35;
  margin-bottom: 24px;
}

.upload-modal-cat label {
  display: block;
  font-weight: 600;
  color: #2c4a35;
  margin-bottom: 8px;
  font-size: 14px;
}

.upload-modal-cat select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #a8cfc0;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: #2c4a35;
  background: #fff;
  margin-bottom: 20px;
  cursor: pointer;
}

.upload-drop {
  border: 2px dashed #a8cfc0;
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  background: #f9fcf9;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.upload-drop.dragover { border-color: #4a7c59; background: #e8f5e9; }

.upload-drop-icon { font-size: 40px; margin-bottom: 10px; }

.upload-drop p { color: #4a7c59; font-size: 1rem; font-weight: 500; margin: 0 0 6px; }

.upload-drop small { color: #aaa; font-size: 0.82rem; }

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.upload-preview-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 8px;
  overflow: hidden;
}

.upload-preview-item img { width: 100%; height: 100%; object-fit: cover; }

.upload-preview-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-do-btn {
  width: 100%;
  padding: 14px;
  background: #4a7c59;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
  margin-bottom: 12px;
}

.upload-do-btn:hover { background: #2c4a35; }
.upload-do-btn:disabled { background: #aaa; cursor: not-allowed; }

.upload-result-ok {
  background: #e8f5e9;
  color: #2c4a35;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.upload-result-err {
  background: #ffeaea;
  color: #c0392b;
  padding: 12px 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
}

/* ── 프로그램 정보창 ── */
.prog-detail-panel {
  flex: 0 0 360px;
  position: sticky;
  top: 88px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 28px rgba(45, 90, 61, 0.10);
  min-height: 340px;
  border: 1.5px solid #d6eadc;
  overflow: hidden;
}

#prog-detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 340px;
  padding: 32px 24px;
  text-align: center;
  color: #7ab89a;
}

.pd-placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

#prog-detail-placeholder p {
  font-size: 15px;
  color: #4a7c59;
  line-height: 1.7;
  margin: 0 0 6px;
}

.pd-placeholder-sub {
  font-size: 12px !important;
  color: #a5c8aa !important;
}

#prog-detail-content {
  padding: 28px 24px;
}

.pd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e8f5e9;
}

.pd-header h3 {
  font-size: 19px;
  font-weight: 700;
  color: #1e3d2b;
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

.pd-edit-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1.5px solid #4a7c59;
  border-radius: 8px;
  background: #fff;
  color: #4a7c59;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}

.pd-edit-btn:hover {
  background: #4a7c59;
  color: #fff;
}

.pd-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f0f7f2;
}

.pd-label {
  font-size: 12px;
  font-weight: 600;
  color: #7ab89a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  min-width: 72px;
}

.pd-row span:last-child {
  font-size: 14px;
  color: #2d4a38;
  line-height: 1.5;
}

.pd-desc-wrap {
  margin-top: 16px;
}

.pd-desc-wrap .pd-label {
  display: block;
  margin-bottom: 6px;
  min-width: auto;
}

.pd-desc-wrap p:last-child {
  font-size: 14px;
  color: #3a5c47;
  line-height: 1.75;
  margin: 0;
}

.pd-actions {
  margin-top: 22px;
}

.pd-btn-primary {
  display: block;
  width: 100%;
  padding: 13px;
  background: #1e3d2b;
  color: #fff;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s;
}

.pd-btn-primary:hover {
  background: #4a7c59;
}

/* 관리자 수정 폼 */
.pd-edit-row {
  margin-bottom: 12px;
}

.pd-edit-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #7ab89a;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.pd-edit-row input,
.pd-edit-row textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid #c8dfc8;
  border-radius: 8px;
  font-size: 14px;
  color: #1e3d2b;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.pd-edit-row input:focus,
.pd-edit-row textarea:focus {
  border-color: #4a7c59;
}

.pd-edit-row textarea {
  resize: vertical;
}

.pd-edit-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.pd-btn-cancel {
  flex: 1;
  padding: 10px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 14px;
  cursor: pointer;
}

.pd-btn-save {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #1e3d2b;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.pd-btn-save:hover {
  background: #4a7c59;
}

/* 모바일: 세로 배치 */
@media (max-width: 900px) {
  .programs-layout {
    flex-direction: column;
    padding: 0 16px;
  }

  .prog-cards-col {
    width: 100%;
  }

  .program-cards-wrap {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .prog-detail-panel {
    flex: none;
    position: static;
    width: 100%;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .program-cards-wrap {
    grid-template-columns: 1fr;
  }
}
