:root {
  --bg-ivory: #fcf2de;
  --navy: #1c2655;
  --amber: #ffd885;
  --text: #111;
  --muted: #eaeaea;
  --shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* 기본 설정 */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Pretendard, Arial, sans-serif;
  color: var(--text);
  background: #f8f8f8;
  overflow-x: hidden;
}

/* 공통 래퍼 */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* 상단 배경 섹션 */
.hero {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  background-image: url(https://i.imgur.com/KJKViK3.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero h2 {
  font-size: clamp(20px, 2.8vw, 34px);
  font-weight: 600;
  color: #000; /* 콴다일로 / 프로그램 */
}
.hero h2 .highlight {
  color: #ff6609; /* 중등부 겨울학기 강조 */
}

/* 메뉴 버튼 */
.subcats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 auto 8px;
  max-width: 1100px;
}
@media (max-width:900px){ .subcats{grid-template-columns:repeat(2,1fr);} }
@media (max-width:520px){ .subcats{grid-template-columns:1fr;} }

.pill {
  display: block;
  text-align: center;
  background: #000;
  color: #fff;
  padding: 18px 14px;
  font-weight: 800;
  font-size: 20px;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.pill:hover {
  background: #ff7b00;
}
.pill[aria-selected="true"] {
  border: 2px solid #ff7b00;
}

/* 콘텐츠 공통 */
.content {
  background: #fff;
  padding: 60px 20px 40px;
  box-shadow: var(--shadow);
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 12px;
}
.panel { display: none; animation: fadeIn .4s ease; }
.panel.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* 이미지 */
.panel-img {
  width: 95%;
  max-width: 900px;
  height: auto;
  margin-top: 12px;
}

/* 하단 문구 */
.term-info {
  text-align: left;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  line-height: 1.6;
  color: #222;
  padding-left: 70px;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.term-info .bullet {
  color: #ff6609;
  margin-right: 6px;
  font-size: 0.5em;
  vertical-align: 0.3em;
}
.term-info .term-highlight {
  color: #ff6609;
  font-weight: 700;
}

/* 중등정규반, 예비중1 등 주요행 */
.term-info-main {
  font-size: 22px;
  font-weight: 700;
  color: #111;
}

/* 버튼 */
.apply-btn {
  display: inline-block;
  background: #000;
  color: #ff7b00;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 60px;
  margin: 14px 0 8px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.25s ease;
}
.apply-btn:hover {
  background: #ff7b00;
  color: #fff;
  transform: translateY(-2px);
}

/* 버튼 다음 문구 간격 */
.apply-btn + .term-info {
  margin-top: 24px;
}

/* 모바일 대응 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (max-width: 520px){
  .term-info {
    padding-left: 18px;
    margin-bottom: 12px;
    font-size: clamp(16px, 4.6vw, 18px);
    line-height: 1.5;
  }
  .term-info-main {
    font-size: clamp(18px, 5vw, 20px);
  }
  .term-info .bullet {
    font-size: 0.7em;
    margin-right: 4px;
  }
  .content {
    font-size: clamp(16px, 4vw, 18px);
    padding: 32px 16px 28px;
  }
  .apply-btn {
    display: block;
    width: 100%;
    padding: 14px 0;
    text-align: center;
  }
}

/* 타이틀 색상 보정 (최종 우선순위 보장) */
.hero h2 { color: #000; }
.hero h2 .highlight { color: #ff6609 !important; }

/* 수업구성 박스: 표 이미지(panel-img)와 동일 너비 + 중앙 정렬 */
.sub-desc-box {
  /* 표 이미지와 동일한 폭 기준: 95% / max 900px */
  width: 95%;
  max-width: 900px;
  margin: 8px auto 24px;        /* 가운데 정렬(좌우 auto) */
  
  background: #f7f7f7;
  border-left: 4px solid #ff7b00;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);

  /* 박스 내부 세로 중앙정렬 */
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 16px 20px;
  text-align: left;
}

/* 제목과의 간격 조금만 */
.term-info.term-info-main { margin-bottom: 6px; }

/* 박스 내부 타이틀/리스트 폰트 크기(작게) */
.sub-desc-title {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  margin: 0 0 6px 0;
}

.sub-desc-list {
  margin: 0;
  padding-left: 18px;
  font-size: 16px;
  font-weight: 500;
  color: #444;
  line-height: 1.6;
}
.sub-desc-list li { list-style-type: "– "; }

/* 모바일 */
@media (max-width:520px){
  .sub-desc-box{
    width: 100%;
    max-width: 900px;
    padding: 14px 16px;
    margin: 6px auto 18px;
  }
  .sub-desc-title{ font-size: 16px; }
  .sub-desc-list{ font-size: 14.5px; }
}

/* 하단 교육상담 안내 바 */
.info-bar {
  width: 95%;
  max-width: 900px;
  margin: 30px auto 0;
  background: #f1f1f1;
  color: #222;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  padding: 14px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

/* 모바일 대응 */
@media (max-width:520px){
  .info-bar {
    font-size: 16px;
    padding: 12px 0;
    width: 100%;
  }
}
