/* 모든 요소의 크기 계산 방식을 통일합니다. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  color: #222;
  background: #fff8f9;
  line-height: 1.6;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

/* 공통 너비 */
.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* 공통 여백 */
.section {
  padding: 110px 0;
}

.small-title {
  margin: 0 0 12px;
  color: #9b7d56;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.section-title h2,
.section-heading h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.25;
}

.center {
  text-align: center;
}

/* =========================
   헤더
========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: fff8f9;
  border-bottom: 1px solid #e9e3da;
  backdrop-filter: blur(10px);
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 800;
}

.logo span {
  font-size: 24px;
}

.logo small {
  color: #9b7d56;
  font-size: 14px;
}

.main-menu ul {
  display: flex;
  gap: 34px;
}

.main-menu a {
  font-size: 15px;
  font-weight: 600;
}

.main-menu a:hover {
  color: #9b7d56;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-button,
.login-button {
  border: 0;
  background: transparent;
  font-size: 14px;
}

.apply-button {
  padding: 11px 20px;
  color: white;
  background: #2f2925;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  border: 0;
  background: transparent;
  font-size: 26px;
}

.mobile-menu {
  display: none;
}

/* =========================
   메인 슬라이드
========================= */

/* 자작나무 배경이 들어가는 전체 영역 */
.hero {
  position: relative;
  padding: 0 0 50px;

  background-image: url("images/자작나무숲.jpg");
  background-size:cover;
  background-position: center;
  background-repeat: no-repeat;

  overflow: hidden;
}

/* 자작나무 사진을 연하게 만드는 흰색 투명막 */
.hero::before {
  content: "";

  position: absolute;
  inset: 0;

  background: rgba(255, 255, 255, 0.55);

  z-index: 1;
  pointer-events: none;
}

/* 기존의 큰 사각 박스 제거 */
.hero-slider {
  position: relative;
  z-index: 2;

  width: min(1600px, calc(100% - 40px));
  margin: 0 auto;

  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;

  overflow: hidden;
}

/* 글자와 오른쪽 사진을 가로로 배치 */
.hero-slide {
  position: relative;
  z-index: 2;

  min-height: 600px;
  padding-top: 40px;
  padding-right: 20px;
  padding-bottom: 40px;
  padding-left: 0;

  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;

  gap: 30px;
}

/* 왼쪽 글자 영역 */
.hero-text {
  max-width: 610px;
  transform:translateX(150px);
}

/* 메인 제목 */
.hero-text h1,
.hero-text h2 {
  margin: 0 0 25px;

  font-size: 54px;
  line-height: 1.18;
  letter-spacing: -2px;
}

/* 설명 문장 */
.hero-description {
  margin-bottom: 32px;

  color: #5d5a55;
  font-size: 18px;
  line-height: 1.7;
}

/* 버튼 영역 */
.hero-links {
  display: flex;
  gap: 12px;
}

/* 버튼 공통 디자인 */
.primary-button,
.outline-button {
  display: inline-block;

  padding: 14px 24px;
  border-radius: 30px;

  font-weight: 700;
}

/* 수강신청 버튼 */
.primary-button {
  color: white;
  background: #2f2925;
}

/* 자세히 보기 버튼 */
.outline-button {
  border: 1px solid #2f2925;
}

/* 오른쪽 사진 영역 */
.hero-image {
  width: 100%;
  max-width: 650px;

  justify-self: start;
}

/* 오른쪽 사진 */
.hero-image img {
  width: 100%;
  height: 420px;

  object-fit: cover;
  object-position: center;

  border-radius: 20px;
  border: 8px solid white;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* =========================
   소개
========================= */

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.about-text {
  color: #666;
  font-size: 18px;
}

.arrow-link {
  display: inline-block;
  margin-top: 20px;
  color: #2f2925;
  font-weight: 700;
}

/* =========================
   추천 강좌
========================= */

.section-heading {
  margin-bottom: 42px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.course-card {
  overflow: hidden;
  background: white;
  border: 1px solid #ece7e0;
  border-radius: 18px;
  transition: 0.3s;
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 40px rgba(56, 43, 31, 0.12);
}

.course-image img {
  height: 220px;
  object-fit: cover;
}

.course-content {
  padding: 22px;
}

.course-tags {
  display: flex;
  gap: 7px;
}

.course-tags span {
  padding: 5px 10px;
  background: #eeecc8;
  border-radius: 20px;
  font-size: 12px;
}

.course-content h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.course-content p {
  color: #777;
  font-size: 14px;
}

.course-info {
  margin: 18px 0;
  color: #777;
  font-size: 13px;
}

.course-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-bottom button {
  padding: 9px 14px;
  border: 0;
  border-radius: 20px;
  background: #2f2925;
  color: white;
}

/* =========================
   프로그램
========================= */

.programs {
  background: #f0ece6;
}

.program-grid {
  margin-top: 45px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.program-card {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: 22px;
}

.program-card img {
  height: 100%;
  object-fit: cover;
}

.program-text {
  position: absolute;
  inset: auto 0 0;
  padding: 28px;
  color: white;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.program-text h3 {
  margin: 5px 0;
  font-size: 28px;
}

/* =========================
   문화복음방
========================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-item {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 18px;
}

.gallery-large {
  grid-row: span 2;
  min-height: 578px;
}

.gallery-item img {
  height: 100%;
  object-fit: cover;
  transition: 0.4s;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-text {
  position: absolute;
  inset: auto 0 0;
  padding: 25px;
  color: white;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

/* =========================
   강사진
========================= */

.teacher-grid {
  margin-top: 45px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.teacher-card {
  text-align: center;
}

.teacher-card img {
  height: 300px;
  object-fit: cover;
  border-radius: 50% 50% 18px 18px;
}

.teacher-card h3 {
  margin: 18px 0 3px;
}

.teacher-card p {
  margin: 0;
  color: #777;
}

/* =========================
   후기
========================= */

.reviews {
  background: #e7e3d7;
}

.review-card {
  padding: 32px;
  background: white;
  border-radius: 18px;
}

.stars {
  color: #c49a52;
}

.review-card blockquote {
  margin: 20px 0;
  font-size: 18px;
}

/* =========================
   공지사항
========================= */

.notice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.notice-card {
  padding: 28px;
  background: white;
  border: 1px solid #e8e1d8;
  border-radius: 16px;
}

.notice-card h3 {
  margin: 15px 0;
}

.notice-card p,
.notice-card time {
  color: #777;
  font-size: 14px;
}

/* =========================
   뉴스레터
========================= */

.newsletter {
  padding: 75px 0;
  background: #d9c6a6;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.newsletter-form label {
  display: block;
  margin-bottom: 10px;
}

.newsletter-form input {
  width: 330px;
  padding: 15px;
  border: 0;
  border-radius: 30px 0 0 30px;
}

.newsletter-form button {
  padding: 15px 22px;
  border: 0;
  color: white;
  background: #2f2925;
  border-radius: 0 30px 30px 0;
}

/* =========================
   푸터
========================= */

.footer {
  padding: 70px 0 30px;
  color: white;
  background: #332d29;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 800;
}

.footer-contact > a {
  font-size: 28px;
}

.footer-bottom {
  margin-top: 50px;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #aaa;
  font-size: 13px;
}

.footer-bottom a {
  margin-right: 15px;
}

.top-button {
  position: fixed;
  right: 25px;
  bottom: 25px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* =========================
   태블릿·스마트폰
========================= */

@media (max-width: 1000px) {
  .main-menu,
  .login-button {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .course-grid,
  .teacher-grid,
  .notice-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .program-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 75px 0;
  }

  .hero-slide {
    padding: 35px 25px;
  }

  .hero-text h1,
  .hero-text h2 {
    font-size: 36px;
  }

  .about-inner,
  .newsletter-inner,
  .footer-inner {
    grid-template-columns: 1fr;
    display: grid;
  }

  .course-grid,
  .teacher-grid,
  .notice-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-large {
    grid-row: auto;
    min-height: 300px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .newsletter-form input {
    width: 220px;
  }
}