/* 1. 웹 폰트 및 전체 초기화 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700;900&family=Varela+Round&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', 'Malgun Gothic', sans-serif;
  color: #333;
  line-height: 1.8;
  word-break: keep-all;
  /* 한글 줄바꿈 예쁘게 */
}

a,
a:link,
a:visited {
  color: inherit;
  text-decoration: none;
}

li {
  list-style: none;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  width: 90%;
}

/* 2. Header 설정 */
header {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 1.5rem 0;
  background-color: rgba(0, 0, 0, 0.4);
  transition: 0.3s;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav ul {
  display: flex;
}

header nav ul li {
  padding: 0 15px;
}

header button {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: white;
  font-size: 1.1rem;
  font-weight: 500;
}

header h1 button {
  font-size: 2rem;
  font-weight: bold;
}

/* 3. Main 비주얼 */
main {
  width: 100%;
  height: 100vh;
  color: white;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/me.jpg') center center;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

main h2 {
  font-size: 3.5rem;
  margin: 2rem 0;
  letter-spacing: 2px;
  font-family: 'Varela Round', sans-serif;
}

main h2 span {
  color: white;
}

/* 4. 공통 Section 설정 */
section {
  padding: 10rem 0;
}

#about {
  background-color: #f9f9f9;
}

#features {
  background-color: #ffffff;
}

section .title {
  margin-bottom: 8rem;
  text-align: center;
}

section .title h4 {
  font-size: 1.2rem;
  color: #ff6a6a;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1rem;
}

section .title h2 {
  font-size: 3.5rem;
  font-weight: 700;
}

/* 5. About (인사말 & 이력) 레이아웃 */
section .about-self {
  display: flex;
  flex-direction: column;
  align-items: center;
}

section .about-self .about-image {
  width: 100%;
  text-align: center;
  margin-bottom: 6rem;
}

section .about-self .about-image img {
  width: 800px;
  max-width: 95%;
  height: auto;
  border-radius: 40px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

section .about-self .about-content {
  width: 100%;
  max-width: 900px;
  padding: 0 20px;
}

section .about-self .about-content h3 {
  font-size: 2.8rem;
  margin-bottom: 4rem;
  text-align: center;
}

/* ★ 요청하신 중간 제목 스타일 (강렬한 빨간색 & 거대함) */
section .about-self .about-content h4 {
  font-size: 2.4rem !important;
  /* 엄청 크게 */
  color: #ff0000 !important;
  /* 완전 빨강 */
  font-weight: 900 !important;
  margin-top: 6rem !important;
  margin-bottom: 2rem !important;
  display: block;
  letter-spacing: -1px;
}

section .about-self .about-content p {
  font-size: 1.25rem;
  line-height: 2.4;
  /* 이력 내용이 많으므로 줄간격 넉넉히 */
  margin-bottom: 2.5rem;
  color: #444;
}

section .about-self .about-content p strong {
  color: #000;
  font-weight: 700;
}

section .about-self .about-content hr {
  margin: 6rem 0;
  border: 0;
  border-top: 1px solid #ddd;
}

/* 6. 소셜 아이콘 */
section .about-self .social {
  text-align: center;
  margin-top: 6rem;
  padding-top: 2rem;
}

section .about-self .social a {
  font-size: 3rem;
  margin: 0 20px;
  color: #333;
  transition: 0.3s;
}

section .about-self .social a:hover {
  color: #ff6a6a;
}

/* 7. What I Do (Features) 카드 섹션 */
/* 7. 강사(Teachers) 섹션 스타일 */

/* 강사 한 명을 묶는 전체 컨테이너 */
.teacher-container {
  margin-bottom: 100px;
  /* 강사들 사이의 간격 */
}

/* 사진 그룹: 무조건 한 줄에 3장씩 */
.photo-group {
  display: flex;
  flex-wrap: wrap;
  /* 사진이 많으면 다음 줄로 넘김 */
  gap: 15px;
  /* 사진 사이 간격 */
  justify-content: center;
  margin-bottom: 40px;
}

.photo-group img {
  /* 가로 너비를 33.33%에서 간격을 뺀 만큼 설정하여 정확히 3장씩 배치 */
  width: calc(33.33% - 10px);
  height: auto;
  /* 얼굴 안 잘리게 비율 유지 */
  border-radius: 12px;
  transition: 0.3s;
  object-fit: cover;
  /* 사진 크기가 달라도 꽉 채우기 */
}

.photo-group img:hover {
  transform: scale(1.05);
  /* 마우스 올리면 살짝 커짐 */
  cursor: pointer;
}

/* 강사 경력 박스: 한 줄로 쭉 나열 */
.teacher-profile.simple-list {
  max-width: 900px;
  /* 너무 넓게 퍼지지 않게 제한 */
  margin: 0 auto;
  /* 가운데 정렬 */
  padding: 0 20px;
  text-align: left;
  /* 글자는 왼쪽 정렬 */
}

.profile-header {
  margin-bottom: 25px;
  border-left: 5px solid #333;
  /* 이름 옆 강조 선 */
  padding-left: 15px;
}

.name {
  font-size: 24px;
  font-weight: bold;
  margin: 5px 0;
}

.branch {
  font-size: 14px;
  color: #666;
}

/* 경력 텍스트 스타일 */
.career-content p {
  margin: 0;
  font-size: 16px;
  line-height: 2.2;
  /* 줄 간격을 넓게 해서 읽기 편하게 */
  color: #444;
  word-break: keep-all;
  /* 단어가 중간에 잘리지 않게 설정 */
}

/* 섹션 사이 구분선 */
.divider {
  margin: 30px 0;
  height: 1px;
  background-color: #eee;
}

/* 모바일 대응: 화면이 아주 작아질 때만 사진 크기 조정 */
@media (max-width: 600px) {
  .photo-group img {
    width: calc(50% - 10px);
    /* 폰에서는 너무 작을 수 있으니 2장씩 */
  }
}

/* 사진 그룹: 강사 섹션 느낌으로 3장씩 고정 */
.photo-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin-bottom: 50px;
}

.photo-group img {
  width: calc(33.33% - 10px);
  height: auto;
  /* 비율대로 나와서 절대 안 잘림 */
  border-radius: 12px;
  transition: 0.3s;
  object-fit: contain;
  /* 사진 모양 그대로 보존 */
  background: #fdfdfd;
}

.photo-group img:hover {
  transform: scale(1.05);
  cursor: pointer;
}

/* 글자 스타일: 사장님 원본처럼 길게 내려가게 */
.career-content p {
  font-size: 18px;
  line-height: 2.2;
  /* 줄 간격 시원하게 */
  color: #444;
  margin-bottom: 5px;
  /* 한 줄씩 착착 쌓이는 느낌 */
}







/* 1. 기본 설정 (기존에 있다면 중복 확인 후 유지) */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 2. 레이아웃: 오른쪽 삭제 후 가운데 정렬 */
section.contact .contact-me {
  /* 기존 float 방식 대신 block으로 변경 */
  display: block;
}

section.contact .contact-me .left {
  /* 30%였던 너비를 늘리고 중앙으로 배치 */
  width: 100%;
  max-width: 500px;
  /* 카드가 너무 넓어지면 안 예쁘니까 한계 설정 */
  margin: 0 auto;
  /* 핵심: 가로 중앙 정렬 */
  float: none;
  /* 기존 float 해제 */
}

/* 3. 카드 디자인 (형이 쓰던 스타일 그대로 유지) */
section.contact .contact-me .left .card {
  border: 1px solid #ccc;
  padding: 1.5rem;
  /* 여백 조금 더 줌 */
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
  background-color: #fff;
  border-radius: 8px;
  word-break: break-all;
  overflow-wrap: break-word;
}

section.contact .contact-me .left .card .icon i {
  font-size: 1.8rem;
  margin-right: 15px;
  color: #f78b00;
}

section.contact .contact-me .left .info-text h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 3px;
}

section.contact .contact-me .left .info-text p {
  font-size: 1.1rem;
  /* 글씨 아주 살짝 키움 */
  font-weight: 600;
  color: #333;
}







/* 7. 반응형: 화면이 작아지면 한 줄로 쌓기 (가장 중요) */
@media (max-width: 900px) {

  section.contact .contact-me .left,
  section.contact .contact-me .right {
    width: 100%;
    /* 가로폭 가득 채우기 */
    float: none;
    /* 가로 정렬 해제 */
    margin-left: 0;
    /* 여백 제거 */
  }

  section.contact .contact-me .left {
    margin-bottom: 30px;
    /* 정보창과 입력창 사이 띄우기 */
  }
}



/* --- 반응형 스타일 시작 (style.css 맨 아래에 추가) --- */

@media screen and (max-width: 1140px) {

  /* 메인 및 섹션 컨테이너 너비 조정 */
  .container {
    width: 95%;
    /* 1140px보다 작아지면 화면 양옆에 여백을 줌 */
  }

  /* 인사말(About me) 영역: 가로 배치를 유지하되 너비 조정 */
  section .about-self .about-image,
  section .about-self .about-content {
    width: 100%;
    /* 화면이 좁아지면 위아래로 쌓이게 함 */
    padding: 0;
    margin-bottom: 2rem;
  }

  /* 강사(Teachers) 섹션: 사진 크기 조정 */
  .photo-group img {
    width: calc(50% - 10px);
    /* 3개에서 2개씩 보이게 변경 */
    margin-bottom: 10px;
  }
}

@media (max-width: 992px) {
  html {
    font-size: 14px;
    /* 전체 폰트 크기 살짝 줄임 */
  }
}

@media (max-width: 768px) {
  html {
    font-size: 13px;
  }

  /* 메인 제목 크기 조정 */
  main h2 {
    font-size: 2.5rem;
  }

  /* 강사 사진을 모바일에서는 한 줄에 하나씩 크게 보이게 */
  .photo-group img {
    width: 100%;
    margin-right: 0;
  }

  /* 하단 연락처(Contact) 영역이 있다면 세로로 배치 */
  section.contact .contact-me {
    flex-direction: column;
  }

  section.contact .contact-me .left,
  section.contact .contact-me .right {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 12px;
  }

  main h2 {
    font-size: 2rem;
  }

  /* 섹션 제목 크기 조정 */
  section .title h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 400px) {
  html {
    font-size: 11px;
  }

  /* 버튼 크기 조정 */
  main button {
    padding: 10px 20px;
    font-size: 1rem;
  }
}

/* --- 반응형 스타일 끝 --- */



@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    padding: 2px 0;
  }

  header h1 {
    margin: 0;
    line-height: 1;
  }

  header h1 button {
    font-size: 1.1rem;
    padding: 2px 0;
  }

  /* --- 여기서부터 중요 --- */
  header nav {
    width: 100%;
    overflow-x: auto !important;
    /* 가로 스크롤 강제 활성화 */
    display: block;
    /* flex 충돌 방지 */
  }

  header nav ul {
    display: flex;
    flex-wrap: nowrap;
    /* 절대 줄바꿈 금지 */
    gap: 15px;
    padding: 10px 20px;
    /* 터치하기 좋게 상하 여백 살짝 확보 */
    width: max-content;
    /* 핵심: 내용물만큼 너비를 무한정 확장 */
  }

  header nav ul li {
    flex-shrink: 0;
    /* 핵심: 자리가 좁아도 절대 줄어들지 마라 */
  }

  header nav ul li button {
    font-size: 1rem;
    white-space: nowrap;
    /* 글자 줄바꿈 금지 */
    display: block;
  }

  /* 스크롤바가 보여야 사람들이 밀어봅니다 */
  header nav::-webkit-scrollbar {
    height: 4px;
    display: block;
  }

  header nav::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.5);
    border-radius: 10px;
  }
}



/* 390px 모바일은 건드리지 않고, 768px(태블릿) 구간만 콕 집어서 키우기 */
@media screen and (min-width: 401px) and (max-width: 768px) {

  /* 인사말(About) & 커리큘럼 본문 글자 강제 확대 */
  /* 형이 만족하는 강사 프로필 크기(약 18~19px)에 맞춤 */
  section.about .about-content p,
  section.about .about-content div,
  section.about .about-content span,
  section.about .about-content li {
    font-size: 19px !important;
    line-height: 1.7 !important;
    font-weight: 500 !important;
    /* 글자 굵기도 살짝 줘서 더 잘 보이게 */
  }

  /* 커리큘럼 안에 있는 작은 글씨들도 빠짐없이 키움 */
  #curriculum p,
  #curriculum span {
    font-size: 19px !important;
  }
}






/* features 부분  클릭하면 넘어갈수 있게 수정 */


.teacher-grid {

  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

  gap: 30px;

  margin-top: 40px;

}

.teacher-card {

  text-align: center;

  padding: 20px;

  border: 1px solid #eee;

  border-radius: 15px;

  background: #fff;

  transition: 0.3s;

}

.teacher-card:hover {

  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);

}

.teacher-img-box img {

  width: 150px;

  height: 150px;

  border-radius: 50%;

  object-fit: cover;

  margin-bottom: 15px;

}

.teacher-card .branch {

  font-size: 0.9rem;

  color: #666;

  margin-bottom: 5px;

}

.more-btn {

  display: inline-block;

  margin-top: 15px;

  padding: 8px 20px;

  background-color: #c0392b;

  color: #fff !important;

  border-radius: 5px;

  font-size: 0.85rem;

}






/* --- 다른 건 안 건드리고 768px(태블릿) 글씨만 키우는 코드 --- */
@media screen and (min-width: 601px) and (max-width: 800px) {
  /* 768px 근처 사각지대만 타겟팅 */

  html {
    font-size: 16px !important;
    /* 기본 베이스를 키움 */
  }

  /* 강사 프로필, 인사말, 커리큘럼 등 모든 본문 글씨 강제 확대 */
  p,
  div,
  span,
  li {
    font-size: 1.3rem !important;
    /* 약 20.8px */
    line-height: 1.8 !important;
  }

  /* 섹션 제목들도 같이 시원하게 키움 */
  h2 {
    font-size: 3rem !important;
  }

  h3 {
    font-size: 2rem !important;
  }
}



/* --- 다른 건 절대 안 건드리고 '인사말/자기소개' 영역만 강제 타격 --- */
@media screen and (max-width: 768px) {

  /* 1. 인사말 컨텐츠가 들어있는 모든 문단(p)과 리스트(li) 강제 확대 */
  /* 수강생 리스트와 똑같은 크기(1.4rem)로 맞췄습니다. */
  .about-content p,
  .about-content li,
  .about-text p,
  section[id*="about"] p,
  #about p {
    font-size: 1.4rem !important;
    line-height: 1.8 !important;
    font-weight: 500 !important;
  }

  /* 2. 혹시 이미지 옆에 붙은 텍스트가 작을 경우를 대비 */
  .about-self p,
  .about-me p {
    font-size: 1.4rem !important;
  }
}