/* =========================================================
   더나은수학학원 테마
   수정 순서: 1) 아래 변수 변경  2) 해당 섹션 변경
   ========================================================= */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

@font-face {
  font-family: "SB Aggro Light";
  src: url("../fonts/SB-Aggro-Light.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

/* 1. 공통 변수 - 전체 디자인을 바꿀 때 먼저 수정하세요. */
:root {
  --color-primary: #f08507;
  --color-text: #171513;
  --color-muted: #8f8f8f;
  --color-line: #c7c7c7;
  --color-review-bg: #fff8ee;
  --color-footer-bg: #111;

  --content-width: 1300px;
  --content-width-small: 1240px;
  --mobile-breakpoint: 900px;

  --font-main-title: 40px;
  --font-section-title: 40px;
  --font-card-title: 24px;
  --font-card1-title:30px;
  --font-body: 20px;
  --font-support: 19px;
  --font-small: 16px;
  --font-control: 18px;
  --line-title: 1.3;
  --line-body: 1.6;
}

/* 2. 기본 설정 */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body,
button,
input,
select,
textarea {
  font-family: "Pretendard", sans-serif;
}

body {
  margin: 0;
  color: var(--color-text);
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.sound-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 15px;
  z-index: 999;
  padding: 12px;
  color: #fff;
  background: #111;
}

.skip-link:focus {
  top: 12px;
}

/* 3. 공통 타이포그래피 */
.section-heading {
  text-align: center;
}

.section-heading h1,
.section-heading h2 {
  margin: 0 0 15px;
  font-size: var(--font-section-title);
  font-weight: 800;
  line-height: var(--line-title);
  letter-spacing: -1.7px;
}

.section-heading h1 {
  font-size: var(--font-main-title);
}


.curriculum-copy span{
  margin: 0;
  color: var(--color-muted);
  font-size: var(--font-small);
  font-weight: 400;
  line-height: var(--line-body);
}

.section-heading p,
.feature-grid p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--font-support);
  font-weight: 400;
  line-height: var(--line-body);
}

.curriculum-copy b,
.feature-grid h3{
  font-size: var(--font-card-title);
  font-weight: 700;
  line-height: var(--line-title);}

.teacher-card h3 {
  font-size: var(--font-card1-title);
  font-weight: 700;
  line-height: var(--line-title);
}

.direction-copy,
.teacher-card p {
  font-size: var(--font-support);
  font-weight: 400;
  line-height: var(--line-body);
}


.footer-phone{
  font-size: var(--font-card1-title);
  font-weight: 700;
  line-height: var(--line-title);
}

.main-nav,
.main-nav a,
.quick-nav a,
.cta-content a,
.footer-phone small {
  font-size: var(--font-control);
  font-weight: 700;
  line-height: var(--line-title);
}

/* 4. 헤더 */
.site-header {
  height: 93px;
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content-width-small), 100%);
  height: 100%;
  margin: 0 auto;
}

.brand img {
  display: block;
  width: 180px;
}

.main-nav {
  display: flex;
  gap: 70px;
}

.main-nav a {
  padding: 37px 0;
}

.menu-toggle {
  display: none;
}

/* 5. 메인 비주얼 - PC/모바일 이미지를 CSS 배경으로 사용 */
.hero {
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 768;
  background: url("../img/pc_main_vis.png") center / cover no-repeat;
}

/* 6. 주황색 바로가기 메뉴 */
.quick-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 75px;
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.quick-nav a {
  width: 300px;
  text-align: center;
}

#direction,
#curriculum,
#special,
#teachers,
#location {
  scroll-margin-top: 75px;
}

/* 7. 방향 제시 영역 */
.direction {
  height: 1210px;
  padding-top: 112px;
}

.direction .section-heading {
  margin-bottom: 80px;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(2, 620px);
  width: var(--content-width-small);
  margin: 0 auto;
}

.direction-art,
.direction-art img {
  display: block;
  width: 620px;
  height: 439px;
}

.direction-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 439px;
  margin: 0;
  padding: 0 70px;
  text-align: center;
}

/* 8. 커리큘럼 */
.curriculum {
  height: 843px;
  padding-top: 104px;
}

.curriculum .section-heading {
  margin-bottom: 106px;
}

.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 12px;
  width: var(--content-width);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.curriculum-grid li {
  position: relative;
  height: 240px;
  padding: 39px;
  border: 1px solid var(--color-line);
  border-radius: 18px;
}

.curriculum-grid li > img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* 글자는 카드 아래를 기준으로 쌓입니다. */
.curriculum-copy {
  position: absolute;
  right: 39px;
  bottom: 30px;
  left: 39px;
}

.curriculum-copy b {
  display: block;
  margin: 0;
  letter-spacing: -0.7px;
}

.curriculum-copy span {
  display: block;
  margin-top: 5px;
  letter-spacing: -0.3px;
}

/* 9. 특별함 */
.special {
  height: 682px;
  padding-top: 75px;
}

.special .section-heading {
  margin-bottom: 76px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 425px);
  gap: 13px;
  width: var(--content-width);
  margin: 0 auto;
}

.feature-grid article {
  padding: 0;
}

.feature-grid img {
  display: block;
  width: 425px;
  height: 221px;
  margin-bottom: 27px;
  object-fit: cover;
}

.feature-grid h3 {
  margin: 0 18px 12px;
}

.feature-grid p {
  margin: 0 18px;
}

/* 10. 강사진 슬라이더 */
.teachers {
  height: 939px;
  padding-top: 105px;
}

.teachers .section-heading {
  margin-bottom: 78px;
}

.teacher-slider {
  position: relative;
  width: var(--content-width);
  height: 492px;
  margin: 0 auto;
}

.teacher-track {
  position: relative;
  height: 100%;
}

.teacher-card {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 375px;
  height: 437px;
  margin-left: -187.5px;
  padding: 58px 44px 30px;
  border: 1px solid #ddd;
  border-radius: 16px;
  opacity: 0;
  background: #fff;
  text-align: left;
  transition: opacity 0.45s, transform 0.45s;
}

.teacher-card.active {
  z-index: 5;
  opacity: 1;
  transform: translateX(0) scale(1);
}

.teacher-card.prev-1 {
  z-index: 4;
  opacity: 0.48;
  transform: translateX(-250px) scale(0.8);
}

.teacher-card.next-1 {
  z-index: 4;
  opacity: 0.48;
  transform: translateX(250px) scale(0.8);
}

.teacher-card.prev-2 {
  z-index: 3;
  opacity: 0.38;
  transform: translateX(-500px) scale(0.66);
}

.teacher-card.next-2 {
  z-index: 3;
  opacity: 0.38;
  transform: translateX(500px) scale(0.66);
}

.avatar {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0 auto 20px;
}

.avatar img {
  position: absolute;
  inset: 0;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
}

.avatar-active {
  display: none;
}

.teacher-card.active .avatar-default {
  display: none;
}

.teacher-card.active .avatar-active {
  display: block;
}

.teacher-card h3 {
  margin: 0 0 20px;
  color: #08643e;
  text-align: center;
}

.teacher-card p {
  margin: 0;
  color: #111;
  white-space: nowrap;
}

.teacher-card > a {
  display: block;
  height: 100%;
  color: inherit;
}

.teacher-card p span {
  display: block;
}

.avatar .teacher-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.slide-btn {
  position: absolute;
  top: 43%;
  z-index: 10;
  width: 46px;
  height: 46px;
  border: 1px solid #ddd;
  border-radius: 50%;
  background: #fff;
  font-size: 0;
}

.slide-btn.prev {
  left: -70px;
}

.slide-btn.next {
  right: -70px;
}

.slide-btn::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 2px solid #222;
  border-left: 2px solid #222;
  content: "";
}

.slide-btn.prev::before {
  transform: translate(-35%, -50%) rotate(-45deg);
}

.slide-btn.next::before {
  transform: translate(-65%, -50%) rotate(135deg);
}

.slider-dots {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  text-align: center;
}

.slider-dots button {
  width: 14px;
  height: 14px;
  margin: 0 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ddd;
}

.slider-dots button.active {
  background: var(--color-primary);
}

/* 11. 수강생 후기 */
.reviews {
  height: 1000px;
  padding-top: 112px;
  background: var(--color-review-bg);
}

.review-slider {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 55px auto 0;
}

.review-viewport {
  overflow: hidden;
  transition: height 0.25s;
}

.review-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin: 0;
  transition: transform 0.5s ease;
  will-change: transform;
}

.review-card {
  position: relative;
  height: 270px;
  overflow: hidden;
  border: 1px solid #eee2d2;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(94, 60, 20, 0.06);
  transition: transform 0.25s, box-shadow 0.25s;
}

.review-card > a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px;
  color: inherit;
}

.review-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(94, 60, 20, 0.1);
}

.review-card::after {
  position: absolute;
  top: -28px;
  right: 20px;
  color: rgba(240, 133, 7, 0.08);
  font-size: 150px;
  font-weight: 800;
  line-height: 1;
  content: "”";
  pointer-events: none;
}

.review-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-grade {
  padding: 8px 14px;
  border-radius: 999px;
  color: #6f4c21;
  background: #fff1dc;
  font-size: 14px;
  font-weight: 700;
}

.review-stars {
  color: var(--color-primary);
  font-size: 15px;
  letter-spacing: 2px;
}

.review-card blockquote {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  margin: 24px 0 20px;
  overflow: hidden;
  color: #3b342d;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.review-result {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #eee5da;
}

.review-result span {
  color: var(--color-muted);
  font-size: 14px;
}

.review-result strong {
  color: #211c17;
  font-size: 18px;
  font-weight: 700;
  text-align: right;
}

.review-result i {
  margin: 0 4px;
  color: var(--color-primary);
  font-style: normal;
}

.review-slider-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
}

.review-navigation {
  display: flex;
  align-items: center;
  gap: 14px;
}

.review-prev,
.review-next {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid #e4d8c9;
  border-radius: 50%;
  background: #fff;
}

.review-prev::before,
.review-next::before {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-bottom: 2px solid #302820;
  border-left: 2px solid #302820;
  content: "";
}

.review-prev::before {
  transform: translate(-50%, -35%) rotate(135deg);
}

.review-next::before {
  transform: translate(-50%, -65%) rotate(-45deg);
}

.review-prev:disabled,
.review-next:disabled {
  opacity: 0.35;
}

.review-page {
  min-width: 48px;
  color: #776d62;
  font-size: 14px;
  text-align: center;
}

.review-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 154px;
  height: 48px;
  border: 1px solid #d9c9b7;
  border-radius: 999px;
  color: #4a3a2a;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
}

.review-more span {
  color: var(--color-primary);
  font-size: 20px;
}

/* 12. 상담 문의 */
.cta {
  position: relative;
  height: 447px;
  overflow: hidden;
  background: url("../img/cta-background.png") center / cover no-repeat;
}

.cta-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.cta-content p {
  width: 100%;
  margin: 0 0 34px;
  padding: 0 20px;
  font-family: "SB Aggro Light", sans-serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0;
  text-align: center;
}

.cta-content a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 270px;
  height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  color: #fff;
  transition: color 0.2s, background 0.2s;
}

.cta-content a:hover,
.cta-content a:focus-visible {
  color: #111;
  background: #fff;
}

/* 13. 푸터 */
.site-footer {
  height: 660px;
  padding: 84px 0 28px;
  color: #fff;
  background: var(--color-footer-bg);
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 45px 80px;
  width: var(--content-width);
  margin: 0 auto;
}

.brand-light img {
  width: 230px;
  margin-bottom:15px;
}

.footer-inner > div > p {
  color: #888;
}

.footer-inner p,
.footer-inner dt,
.footer-inner dd,
.copyright {
  font-size: var(--font-small);
  font-weight: 400;
  line-height: var(--line-body);
}

.footer-phone {
  align-self: center;
  justify-self: end;
}

.footer-inner dl {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 0;
  padding: 42px 0;
  border-top: 1px solid #292929;
  border-bottom: 1px solid #292929;
}

.footer-inner dl div {
  display: grid;
  gap: 6px;
}

.footer-inner dt {
  color: #777;
}

.footer-inner dd {
  margin: 0;
}

.copyright {
  grid-column: 1 / -1;
  color: #666;
  text-align: center;
}

/* 14. 스크롤 등장 효과 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   15. 모바일 - PC 규칙과 중복되지 않도록 이곳에서만 수정
   ========================================================= */
@media (max-width: 900px) {
  :root {
    --font-main-title: 32px;
    --font-section-title: 32px;
    --font-card-title: 18.4px;
    --font-body: 12.8px;
    --font-support: 12.8px;
    --font-small: 12.8px;
    --font-control: 14.4px;
  }

  .site-header {
    height: 68px;
  }

  .header-inner {
    width: 100%;
    padding: 0 18px;
  }

  .brand img {
    width: 180px;
    height: auto;
  }

  .menu-toggle {
    display: block;
    width: 42px;
    border: 0;
    background: none;
  }

  .menu-toggle span {
    display: block;
    height: 2px;
    margin: 6px;
    background: #222;
  }

  .main-nav {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 15px;
    background: #fff;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 15px;
  }

  .hero {
    width: 100%;
    height: auto;
    aspect-ratio: 1300 / 768;
    background-image: url("../img/mo_main_vis.png");
  }

  .quick-nav {
    height: 58px;
  }

  .quick-nav a {
    flex: 1;
    width: auto;
  }

  #direction,
  #curriculum,
  #special,
  #teachers,
  #location {
    scroll-margin-top: 58px;
  }

  .direction,
  .curriculum,
  .special,
  .teachers,
  .reviews,
  .site-footer {
    height: auto;
    min-height: 0;
  }

  .direction,
  .curriculum,
  .special,
  .teachers {
    padding: 78px 18px;
  }

  .direction .section-heading,
  .curriculum .section-heading,
  .special .section-heading,
  .teachers .section-heading {
    margin-bottom: 45px;
  }

  .direction-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .direction-art,
  .direction-art img {
    width: 100%;
    height: auto;
  }

  .direction-copy {
    width: 100%;
    height: 180px;
    padding: 20px;
  }

  /* 모바일 순서: 주황 이미지→설명→파란 이미지→설명 */
  .direction-grid > .direction-art:first-child {
    order: 1;
  }

  .direction-grid > .direction-copy:nth-child(2) {
    order: 2;
  }

  .direction-grid > .direction-art:last-child {
    order: 3;
  }

  .direction-grid > .direction-copy:nth-child(3) {
    order: 4;
  }

  .curriculum-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%;
  }

  .curriculum-grid li {
    width: 100%;
    height: 190px;
    padding: 25px;
  }

  .curriculum-copy {
    right: 25px;
    bottom: 22px;
    left: 25px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 45px;
    width: 100%;
  }

  .feature-grid article {
    max-width: 425px;
    margin: 0 auto;
  }

  .feature-grid img {
    max-width: 100%;
    height: auto;
  }

  .teacher-slider {
    width: 100%;
    height: 470px;
  }

  .teacher-card {
    width: 300px;
    height: 390px;
    margin-left: -150px;
    padding: 38px 28px;
  }

  .teacher-card.prev-1,
  .teacher-card.next-1,
  .teacher-card.prev-2,
  .teacher-card.next-2 {
    opacity: 0;
  }

  .slide-btn.prev {
    left: 10px;
  }

  .slide-btn.next {
    right: 10px;
  }

  .reviews {
    min-height: 600px;
    padding: 78px 18px;
  }

  .review-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    margin: 0;
  }

  .review-slider {
    width: 100%;
    margin-top: 45px;
  }

  .review-card {
    height: 240px;
    border-radius: 18px;
  }

  .review-card > a {
    padding: 24px;
  }

  .review-card:hover {
    transform: none;
  }

  .review-grade,
  .review-stars,
  .review-result span {
    font-size: 12.8px;
  }

  .review-card blockquote {
    margin: 28px 0 24px;
    font-size: var(--font-body);
  }

  .review-result strong {
    font-size: 16px;
  }

  .review-slider-footer {
    margin-top: 22px;
  }

  .review-more {
    min-width: 132px;
    height: 44px;
    font-size: 13px;
  }

  .cta {
    height: 280px;
  }

  .cta-content p {
    margin-bottom: 24px;
    padding: 0 16px;
    font-size: 25.6px;
  }

  .cta-content a {
    width: 220px;
    height: 56px;
  }

  .site-footer {
    padding: 70px 24px 28px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .footer-phone {
    justify-self: start;
  }

  .footer-inner dl,
  .copyright {
    grid-column: 1;
  }
}



