/* 행복AI코딩스쿨 디자인 — site.css 위에 덮어쓰는 브랜드 테마 */
:root {
  --navy: #1a2d52;
  --ink: #14213f;
  --ink-2: #1c2c52;
  --sky: #3488f6;
  --sky-dark: #1d5bc0;
  --sun: #fec442;
  --sun-dark: #8a5a00;
  --leaf: #50aa41;
  --cream: #fff8ec;
  --pale: #fdf1dc;
  --muted: #55617a;
  --line: #e7e1d4;
  --orange: #fec442;
  --orange-dark: #1d5bc0;
  --blue-dark: #1d5bc0;
  --radius: 24px;
  --shadow: 0 24px 60px -24px rgba(20, 33, 63, 0.28);
}
body {
  background: var(--cream);
  color: var(--navy);
}
::selection {
  background: var(--sun);
  color: var(--ink);
}

/* 머리말 */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 84px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(26, 45, 82, 0.08);
  transition:
    background 0.25s,
    border-color 0.25s,
    height 0.25s;
}
.brand img {
  height: 54px;
  width: auto;
  display: block;
}
.brand-logo-dark {
  display: none !important;
}
nav a {
  font-weight: 600;
  color: var(--navy);
}
nav a:not(.button):hover {
  color: var(--sky-dark);
}
nav .button.small {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  border-radius: 999px;
  padding: 10px 20px;
}
nav .button.small:hover {
  background: var(--sky-dark);
  border-color: var(--sky-dark);
}
.header.scrolled {
  box-shadow: 0 8px 30px -18px rgba(20, 33, 63, 0.35);
}

/* 버튼 */
.button,
button.primary {
  border-radius: 999px;
  font-weight: 700;
  gap: 12px;
  padding: 15px 28px;
  transition:
    transform 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.button:hover {
  transform: translateY(-1px);
}
.button.sun {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--ink);
  box-shadow: 0 12px 30px -12px rgba(254, 196, 66, 0.7);
}
.button.sun:hover {
  background: #ffd36b;
}
.button.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.button.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}
.button.orange {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--ink);
}

/* 첫 화면: 수업 사진 */
.hero-photo {
  position: relative;
  min-height: min(680px, calc(100svh - 84px - 120px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 45%;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 33, 63, 0.92) 0%, rgba(20, 33, 63, 0.78) 34%, rgba(20, 33, 63, 0.25) 62%, rgba(20, 33, 63, 0.05) 100%),
    linear-gradient(0deg, rgba(20, 33, 63, 0.35), transparent 40%);
}
.hero-inner {
  position: relative;
  padding: 88px 0 96px;
}
.hero-kicker {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: #dbe4f7;
  margin-bottom: 18px;
}
.hero-photo h1 {
  position: relative;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.12;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 22px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}
.spark {
  position: absolute;
  left: -34px;
  top: -18px;
  width: 40px;
  height: 40px;
  background:
    linear-gradient(var(--sun), var(--sun)) 18px 0 / 6px 16px no-repeat,
    linear-gradient(var(--sun), var(--sun)) 0 16px / 14px 6px no-repeat;
  transform: rotate(-20deg);
  border-radius: 3px;
}
.hero-photo .intro {
  font-size: 20px;
  color: #e6ecf8;
  line-height: 1.7;
  max-width: 560px;
}
.hero-photo .badge {
  background: rgba(254, 196, 66, 0.16);
  color: #ffe6a8;
  border: 1px solid rgba(254, 196, 66, 0.45);
}
.hero-photo .badge:before {
  background: var(--sun);
}
.hero-photo .actions {
  margin-top: 28px;
}

/* 숫자 띠 */
.stats-band {
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 44px 0 30px;
}
.stats-band .stats {
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stats-band .stat {
  text-align: center;
  border-right: 1px solid var(--line);
  padding: 4px 12px;
}
.stats-band .stat:last-child {
  border-right: 0;
}
.stats-band .stat b {
  color: var(--navy);
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 800;
  letter-spacing: -0.045em;
}
.stats-band .stat b span {
  font-size: 0.42em;
  font-weight: 800;
  margin-left: 2px;
}
.stats-band .stat p {
  font-size: 16px;
  margin-top: 6px;
}
.stats-band .stats-note {
  text-align: center;
  margin-top: 22px;
}

/* 공통 구역 */
section.section {
  padding: 112px 0;
}
.white {
  background: #fff;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sky-dark);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: var(--sun);
}
h2 {
  font-weight: 800;
  letter-spacing: -0.045em;
}
.section-heading {
  margin-bottom: 44px;
}
.section-heading p {
  font-size: 17px;
}
.text-link {
  font-weight: 700;
  color: var(--sky-dark);
  text-decoration: none;
  white-space: nowrap;
}
.text-link:hover {
  text-decoration: underline;
}

/* 약속 카드 */
.card {
  border: 0;
  background: #fff;
  border-radius: var(--radius);
  padding: 34px 32px 36px;
  box-shadow: 0 1px 0 rgba(26, 45, 82, 0.06), var(--shadow);
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-4px);
}
.card-num {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--c);
  color: var(--ink);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 28px;
}
.card:nth-child(2) .card-num,
.card:nth-child(3) .card-num {
  color: #fff;
}

/* 교육 과정 */
.course-card {
  background: var(--cream);
  border: 0;
  border-radius: 22px;
  position: relative;
  transition: transform 0.2s;
}
.course-card:hover {
  transform: translateY(-4px);
}
.course-card .course-head,
.course-card:nth-child(n) .course-head {
  background: transparent;
  min-height: 0;
  padding: 30px 26px 8px;
  border-top: 6px solid var(--c);
  border-radius: 22px 22px 0 0;
}
.course-card .course-head small {
  color: var(--muted);
  font-weight: 600;
}
.course-card h3 {
  font-size: 26px;
  font-weight: 800;
}
.course-card ul {
  list-style: none;
  padding: 6px 26px 24px;
}
.course-card li {
  position: relative;
  padding-left: 18px;
}
.course-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--c);
}

/* 교구 */
.kit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.kit-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 4px;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.kit-photo {
  height: 100%;
  min-height: 160px;
  background: #f4f6fb;
}
.kit-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.kit-illust {
  display: grid;
  place-items: center;
  background: #fff6dc;
  padding: 14px;
}
.kit-illust img {
  width: auto;
  height: 132px;
  object-fit: contain;
}
.kit-body {
  padding: 20px 22px;
}
.kit-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--sky-dark);
  background: #e7f0fe;
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}
.kit-body h3 {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 6px;
}
.kit-body p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* 지도 (어두운 판) */
.map-section {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.map-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 500px at 15% 30%, rgba(52, 136, 246, 0.22), transparent 60%);
  pointer-events: none;
}
.map-section .container {
  position: relative;
}
.map-section .eyebrow {
  color: #9fc3ff;
}
.map-section .section-heading p {
  color: #b9c5e0;
}
.map-section .tabs button {
  background: rgba(255, 255, 255, 0.06);
  color: #dfe7f8;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 9px 18px;
}
.map-section .tabs button[aria-selected="true"] {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--ink);
  font-weight: 700;
}
.map-visual {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
}
.map-visual path {
  stroke: var(--ink);
  stroke-width: 1.2;
}
.map-visual path:hover,
.map-visual path[aria-pressed="true"] {
  stroke: var(--sun);
  stroke-width: 3;
}
.map-section .legend {
  color: #b9c5e0;
}
.legend i {
  background: #e3ecfa;
}
.legend i:nth-of-type(2) {
  background: #bcd4f8;
}
.legend i:nth-of-type(3) {
  background: #86b3f4;
}
.legend i:nth-of-type(4) {
  background: #3d86ee;
}
.legend i:nth-of-type(5) {
  background: #1d5bc0;
}
.map-summary {
  background: #fff;
  color: var(--navy);
  border-radius: 22px;
}
.map-summary strong {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.map-summary small {
  color: var(--muted);
}
.map-section .ratio {
  color: #b9c5e0;
}
.ratio-bar {
  background: #3d86ee;
}
.ratio-bar span {
  background: var(--sun);
}
.map-section .region-buttons button {
  background: rgba(255, 255, 255, 0.06);
  color: #e4ebf9;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
}
.map-section .region-buttons button:hover {
  border-color: rgba(255, 255, 255, 0.4);
}
.map-section .region-buttons button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.map-section .region-detail {
  border-color: rgba(255, 255, 255, 0.14);
}
.map-section .school-list li {
  border-color: rgba(255, 255, 255, 0.1);
  color: #dfe7f8;
}
.map-section .region-detail p,
.map-section .region-detail small {
  color: #b9c5e0;
}
.school-target {
  font-size: 13px;
  color: #9fb3d9;
  white-space: nowrap;
}
.map-section .school-list {
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* 함께하는 곳 */
.partner-row {
  border: 0;
  gap: 20px;
  overflow: visible;
}
.partner {
  background: var(--cream);
  border: 0 !important;
  border-radius: 24px;
  padding: 34px;
}
.partner h3 {
  font-size: 22px;
  font-weight: 800;
}
.awards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.awards div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 26px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
}
.awards b {
  color: var(--sun);
  font-size: 15px;
}
.awards span {
  font-size: 17px;
  font-weight: 600;
}

/* 쇼츠·게시판 */
.video-placeholder,
.video-play,
.video-frame {
  border-radius: 22px;
  background: var(--pale);
}
.video-card:nth-child(even) .video-placeholder {
  background: #e7f0fe;
}
.video-line {
  color: var(--sky-dark);
}
.play-icon {
  background: var(--sun);
  color: var(--ink);
}
.notice-list {
  border-top: 0;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.white .notice-list {
  background: var(--cream);
  box-shadow: none;
}
.notice-row {
  padding: 22px 28px;
  border-color: var(--line);
  transition: background 0.15s;
}
.notice-row:hover {
  background: rgba(52, 136, 246, 0.06);
}
.notice-row:last-child {
  border-bottom: 0;
}
.notice-row strong {
  font-size: 18px;
}
.pin {
  color: var(--sun-dark);
  background: #fff1cf;
}

/* 한 해의 흐름 */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: none;
}
.steps li {
  background: #fff;
  border-radius: 24px;
  padding: 28px 26px;
  box-shadow: var(--shadow);
  position: relative;
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 52px;
  right: -20px;
  width: 20px;
  height: 2px;
  background: var(--sun);
}
.step-no {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--sun);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 18px;
}
.steps b {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}
.steps p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}
.criteria {
  margin-top: 24px;
  border: 0;
  background: var(--pale);
  border-radius: 24px;
  padding: 28px 32px;
}
.criteria h3 {
  font-size: 20px;
}

/* 마지막 안내 */
.cta-section {
  padding: 0 0 112px;
}
.contact-panel {
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(52, 136, 246, 0.35), transparent 60%),
    var(--ink);
  border-radius: 36px;
  padding: 56px 60px;
  align-items: center;
}
.contact-panel h2 {
  font-size: clamp(28px, 3vw, 40px);
  margin-bottom: 10px;
}
.contact-panel p {
  color: #c4cfe8;
}
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.contact-panel a {
  font-size: 16px;
}
.contact-panel .contact-details {
  color: #c4cfe8;
}
.contact-panel .contact-details a {
  color: #fff;
}

/* 꼬리말 */
footer {
  background: var(--ink);
  color: #c4cfe8;
  border-top: 0;
  padding: 64px 0 40px;
}
.footer-brand img {
  height: 58px;
  width: auto;
  display: block;
}
.footer-inner p,
.copyright {
  color: #9aa8c6;
}
footer a {
  color: #e4ebf9;
}
.footer-links a {
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--sun);
}
.copyright {
  border-color: rgba(255, 255, 255, 0.1);
}
footer .contact-details a,
footer .contact-details span {
  color: #e4ebf9;
}

/* 하위 페이지 머리 */
.page-head .eyebrow {
  color: var(--sky-dark);
}
.page-head h1 {
  font-weight: 800;
  letter-spacing: -0.05em;
}
.form-section {
  border: 0;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.info-box {
  border-left-color: var(--sun);
  background: #fff4d8;
}

/* 나타나기 효과 */
.can-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.can-reveal .reveal.in {
  opacity: 1;
  transform: none;
}
.cards .reveal:nth-child(2),
.course-grid .reveal:nth-child(2),
.steps .reveal:nth-child(2),
.partner-row .reveal:nth-child(2),
.kit-grid .reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.cards .reveal:nth-child(3),
.course-grid .reveal:nth-child(3),
.steps .reveal:nth-child(3),
.partner-row .reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.course-grid .reveal:nth-child(4),
.steps .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

@media (max-width: 1000px) {
  .hero-shade {
    background: linear-gradient(90deg, rgba(20, 33, 63, 0.9) 0%, rgba(20, 33, 63, 0.7) 55%, rgba(20, 33, 63, 0.35) 100%);
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps li::after {
    display: none;
  }
}
@media (max-width: 760px) {
  .header {
    height: 72px;
  }
  .brand img {
    height: 44px;
  }
  .hero-photo {
    min-height: 560px;
  }
  .hero-inner {
    padding: 64px 0 72px;
  }
  .hero-photo h1 {
    font-size: 42px;
  }
  .hero-photo .intro {
    font-size: 17px;
  }
  .spark {
    display: none;
  }
  .hero-bg {
    object-position: 70% 50%;
  }
  .stats-band .stats {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 26px;
  }
  .stats-band .stat:nth-child(2) {
    border-right: 0;
  }
  .kit-grid {
    grid-template-columns: 1fr;
  }
  .kit-card {
    grid-template-columns: 116px 1fr;
  }
  .kit-photo {
    min-height: 140px;
  }
  .kit-illust img {
    height: 104px;
  }
  .awards,
  .steps {
    grid-template-columns: 1fr;
  }
  .contact-panel {
    padding: 36px 26px;
    border-radius: 28px;
  }
  .cta-section {
    padding-bottom: 80px;
  }
  .notice-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    padding: 18px 20px;
  }
  .notice-row .pin,
  .notice-row .category-label {
    grid-column: auto;
    justify-self: start;
    font-size: 13px;
  }
  .notice-row strong {
    grid-column: 1 / -1;
    font-size: 17px;
    line-height: 1.5;
  }
  .notice-row time {
    grid-column: 1 / -1;
    font-size: 13px;
  }
  .notice-row > span[aria-hidden] {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card,
  .course-card,
  .button {
    transition: none;
  }
}

/* ── 고급 움직임 ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 첫 화면: 사진이 천천히 다가오고 글이 차례로 떠오름 */
.hero-bg {
  transform-origin: 65% 50%;
  animation: hero-zoom 16s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes hero-zoom {
  from {
    transform: scale(1.14);
  }
  to {
    transform: scale(1);
  }
}
.hero-inner > * {
  animation: rise 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-inner > :nth-child(1) {
  animation-delay: 0.15s;
}
.hero-inner > :nth-child(2) {
  animation-delay: 0.28s;
}
.hero-inner > :nth-child(3) {
  animation-delay: 0.42s;
}
.hero-inner > :nth-child(4) {
  animation-delay: 0.54s;
}
.hero-inner > :nth-child(5) {
  animation-delay: 0.64s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero-kicker {
  letter-spacing: 0.02em;
}
.hero-kicker::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  background: var(--sun);
  vertical-align: middle;
  margin-right: 10px;
  transform: translateY(-2px);
}

/* 숫자 띠 */
.count {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  text-align: right;
}
.stats-band .stat {
  position: relative;
}
.stats-band .stat::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 3px;
  background: var(--sun);
  transition: width 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.stats-band .stat.done::after {
  width: 34px;
}
.stats-band .stat b {
  background: linear-gradient(180deg, var(--navy) 0%, #2c4a86 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stats-band .stat b span {
  color: var(--sky-dark);
  -webkit-text-fill-color: var(--sky-dark);
}

/* 함께한 학교 이름이 흐르는 띠 */
.school-marquee {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 22px 0 26px;
  overflow: hidden;
}
.school-marquee::before,
.school-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 1;
  pointer-events: none;
}
.school-marquee::before {
  left: 0;
  background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0));
}
.school-marquee::after {
  right: 0;
  background: linear-gradient(270deg, #fff, rgba(255, 255, 255, 0));
}
.marquee-label {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 14px;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}
.school-marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-row {
  display: flex;
  gap: 12px;
  padding-right: 12px;
}
.marquee-row span {
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* 버튼: 은은한 빛 지나가기 */
.button.sun {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.button.sun::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.65) 50%, transparent 70%);
  transform: translateX(-120%);
  z-index: -1;
}
.button.sun:hover::after {
  transition: transform 0.8s ease;
  transform: translateX(120%);
}
.button.sun:hover {
  box-shadow: 0 18px 40px -14px rgba(254, 196, 66, 0.9);
}

/* 카드: 들어 올릴 때 그림자도 깊어짐 */
.card,
.course-card,
.kit-card,
.partner,
.steps li {
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s;
}
.card:hover,
.course-card:hover,
.kit-card:hover,
.steps li:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px -28px rgba(20, 33, 63, 0.4);
}
.kit-card:hover .kit-photo img {
  transform: scale(1.05);
}
.kit-photo img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 지도 색 부드럽게 바뀜 */
.map-visual path {
  transition:
    fill 0.6s ease,
    stroke 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .hero-inner > *,
  .marquee-track {
    animation: none;
  }
  .stats-band .stat::after {
    width: 34px;
  }
}
@media (max-width: 760px) {
  .marquee-row span {
    font-size: 14px;
    padding: 7px 13px;
  }
}

/* 교재 */
.books-section {
  background: linear-gradient(180deg, #f3f9e8 0%, var(--cream) 100%);
  overflow: hidden;
}
.book-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.book-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  align-items: center;
  background: #fff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s;
}
.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px -28px rgba(20, 33, 63, 0.4);
}
.book-cover {
  margin: 0;
  perspective: 900px;
}
.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px 10px 10px 4px;
  box-shadow:
    -5px 0 0 rgba(0, 0, 0, 0.06) inset,
    0 24px 40px -18px rgba(20, 33, 63, 0.5);
  transform: rotateY(-12deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.book-card:hover .book-cover img {
  transform: rotateY(-2deg) translateY(-4px);
}
.book-body h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}
.book-body p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
}
.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.book-actions .button.small {
  padding: 9px 16px;
  font-size: 14px;
}
.book-size {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 1000px) {
  .book-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .book-card {
    grid-template-columns: 1fr;
    justify-items: start;
    padding: 22px;
  }
  .book-cover {
    width: 150px;
  }
}

/* 수상 카드 링크 */
.awards a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 26px;
  border-radius: 20px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s;
}
.awards a:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -24px rgba(20, 33, 63, 0.6);
}
.awards a small {
  margin-top: 8px;
  font-size: 13px;
  color: #9fc3ff;
  font-weight: 600;
}
.awards a:hover small {
  color: var(--sun);
}

/* 문의 버튼 3개 */
.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.contact-details .contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
  padding: 12px 18px 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.3;
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s,
    border-color 0.25s;
}
.contact-details .contact-btn:hover {
  transform: translateY(-2px);
  border-color: var(--sky);
  box-shadow: 0 14px 30px -18px rgba(20, 33, 63, 0.45);
}
.contact-btn svg {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 12px;
  fill: currentColor;
  background: #e7f0fe;
  color: var(--sky-dark);
}
.contact-btn span {
  display: flex;
  flex-direction: column;
}
.contact-btn b {
  font-size: 15px;
}
.contact-btn small {
  font-size: 13px;
  color: var(--muted);
}
.contact-btn.mail-button svg {
  background: #e8f5e4;
  color: #2f7d22;
}
.contact-details .contact-btn.kakao-button {
  background: #fee500;
  border-color: #fee500;
  color: #191919;
}
.contact-btn.kakao-button svg {
  background: rgba(25, 25, 25, 0.08);
  color: #191919;
}
.contact-btn.kakao-button small {
  color: #4a4a00;
}
/* 어두운 판(마지막 안내·꼬리말) 위에서 */
.contact-panel .contact-details .contact-btn:not(.kakao-button),
footer .contact-details .contact-btn:not(.kakao-button) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.contact-panel .contact-btn:not(.kakao-button) small,
footer .contact-btn:not(.kakao-button) small {
  color: #c4cfe8;
}
.contact-panel .contact-btn:not(.kakao-button) svg,
footer .contact-btn:not(.kakao-button) svg {
  background: rgba(255, 255, 255, 0.12);
  color: var(--sun);
}
@media (max-width: 560px) {
  .contact-details .contact-btn {
    flex: 1 1 100%;
  }
}

/* 이용 안내와 모집 알림 */
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}
.guide-list,
.notify-card {
  min-width: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.guide-list {
  padding: 8px 28px;
}
.guide-list details + details {
  border-top: 1px solid var(--line);
}
.guide-list summary {
  position: relative;
  list-style: none;
  padding: 22px 44px 22px 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
}
.guide-list summary::-webkit-details-marker {
  display: none;
}
.guide-list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.6;
}
.guide-list details[open] summary::after {
  transform: translateY(-25%) rotate(-135deg);
  opacity: 1;
}
.guide-list summary:hover {
  color: var(--sky-dark);
}
.guide-list details[open] summary {
  color: var(--sky-dark);
}
.guide-list p {
  margin: 0 0 24px;
  line-height: 1.8;
}
.notify-card {
  padding: 32px;
  border-top: 5px solid var(--sun);
}
.notify-card h3 {
  font-size: 26px;
  margin-bottom: 8px;
}
.notify-card .field-error {
  display: block;
}
.notify-card .form-grid {
  gap: 12px 18px;
}
.notify-card .hint.full {
  margin: 0;
}
.notify-card input {
  min-width: 0;
}
.notify-card .notify-success {
  padding: 20px;
  border-radius: 16px;
  background: var(--cream);
  font-weight: 700;
}
.contact-panel .report-link {
  color: #ffe6a8;
}
/* 컴퓨터 화면에서는 메뉴를 펼쳐 두고, 폭이 모자라면 글자와 간격만 줄인다. */
@media (min-width: 1081px) and (max-width: 1360px) {
  nav { gap: 16px; }
  nav a { font-size: 15px; }
  .brand img { height: 46px; }
  nav .button.small { padding: 9px 16px; }
}
/* 태블릿 폭에서는 메뉴 버튼으로 연다. */
@media (min-width: 761px) and (max-width: 1080px) {
  .menu-toggle { display: block; }
  .header #navigation {
    display: none;
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    padding: 20px 5%;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    max-height: calc(100dvh - 84px);
    overflow-y: auto;
  }
  .header #navigation.expanded { display: flex; }
}
@media (max-width: 760px) {
  .header #navigation {
    top: 72px;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
  }
}
@media (max-width: 1000px) {
  .guide-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .notify-card { padding: 24px 20px; }
  .guide-list { padding: 6px 20px; }
}

/* 가로 교육 영상: 카드 두 칸 폭, 16:9 */
.video-card.wide {
  grid-column: span 2;
}
.video-card.wide .video-play,
.video-card.wide .video-frame {
  aspect-ratio: 16/9;
}
.video-card .video-frame {
  display: block;
}
@media (max-width: 560px) {
  .video-card.wide {
    grid-column: 1 / -1;
  }
}
