*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  color: white;
}

strong {
  text-shadow: 2px 2px 7px rgb(0, 0, 0);
  font-size: 1.2em
}

header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media screen and (max-width: 768px) {
  body, html {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .lesson-section,
  .card-container,
  .card,
  .card-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #Lessons .card-wrapper {
    width: 100%;
    margin: 0 auto;
  }
}

header {
  position: fixed;
  width: 100%;
  top: 18px !important;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  transition: opacity 0.5s ease, transform 0.5s ease;
  gap: 0;
  opacity: 0;
}

body.in-hero header {
  opacity: 0;
  pointer-events: none;
}

body.loaded header {
  opacity: 1;
  pointer-events: auto;
}

.logo {
  font-size: 50px;
  font-weight: 400 !important;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  font-family: 'Outfit', sans-serif;
  margin-bottom: 10px;
  line-height: 1.2;
}

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

nav {
  display: flex;
  justify-content: center;
  gap: 38.5px;
  margin-top: 0;
}

nav a {
  text-decoration: none;
  color: white;
  font-size: 19px;
  font-weight: 300;
  letter-spacing: 1px;
  text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.4);
  padding: 5px 5px 
  border-radius: 5px;
  background-color: transparent;
  transition: padding 0.3s ease, background-color 0.3s ease;
}


nav a.active {
  color: #fff;
  background-color: #10151b67;  /* 활성화된 배경 색상 */
  padding: 5px 10px;  /* 배경 크기만 키우기 */
  border-radius: 5px;
}

nav a:hover {
  transform: translateY(-2px);
  color: #6ba4c8;
}

section {
  min-height: 100vh;
  padding: 160px 40px 60px 40px;
}

#hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
              url('images/hero-bg.jpg') no-repeat center center;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding-top: 3vh;
  font-family: 'Outfit', sans-serif;
}

.hero-logo-image img {
  width: 600px; 
  max-width: 100%;
  height: auto;
}

.hero-nav {
  margin-top: -60px;
  display: flex;
  gap: 40px;
}

.hero-nav a {
  text-decoration: none;
  font-size: 30px;
  color: white;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: color 0.3s ease;
}

.hero-nav a:hover {
  color: #6ba4c8;
}

.cutout {
  position: fixed;
  bottom: 0;
  right: 80px;
  width: auto;
  max-width: 800px;
  max-height: 88vh;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.cutout.visible {
  opacity: 0.9;
  transform: translateY(0);
}

body.in-hero header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
}

#Connect .details img {
  max-width: 30%;
  height: auto;
  display: block;
  margin: 0 auto;
}

#Connect .floating-social {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 16px;
  padding: 8px 14px;
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

#Connect .floating-social img {
  width: 40px;
  height: 40px;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#Connect .floating-social img:hover {
  opacity: 1;
  transform: scale(1.15);
}

#Connect .copyright {
  position: absolute;
  text-align: center;
  margin-top: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: #aaa;
  opacity: 0.9;
  bottom: 10px;
}


#Lessons {
  font-family: 'Nunito', sans-serif;
  background: 
    linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)),
    url('images/lessons-bg.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  z-index: 1;
}

.card-wrapper {
  margin-top: -50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 240px;
}

.card {
  position: relative;
  width: 240px;
  height: 150px;
  border-radius: 20px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;

  display: flex;
  align-items: center;   /* 세로 가운데 정렬 */
  justify-content: center; /* 가로 가운데 정렬 */
  text-align: center;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}
.card-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* 어두운 분위기 효과 */
  z-index: 1;
}

.card-title {
  font-family: 'Ubuntu', sans-serif;
  position: relative;
  font-size: 25px;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 8px;
  z-index: 2;
}


.card-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 40px 20px;
}

.card-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.5s ease;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 10px;
  color: white;
  padding: 0;
  display: none;
  pointer-events: none;
}

.click-hint {
  font-size: 14px;
  color: #fff;
  text-align: center;
  margin-top: 8px;
  opacity: 1;
  transition: ease;
  pointer-events: none;
}

.card-wrapper.expanded .click-hint {
  opacity: 0;
}

.card.expanded + .card-content {
  max-height: 600px;
  opacity: 1;
  padding: 12px;
  display: block;
  pointer-events: auto;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* 고정된 배경 레이어 */
#Teacher .bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-image: url("images/teacher-bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: translateZ(0); 
  will-change: transform;
  z-index: -1;
}

/* 콘텐츠 레이어 */
#Teacher .content {
  height: 200vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#Teacher .content img {
  height: 200vh;
  width: auto;
  pointer-events: none;
  Margin-top: -80px;
}

@media (max-width: 768px) {
  #Teacher .bg {
    background-image: url("images/Teacher-bg-mobile.jpg");
    background-position: center top; /* 필요 시 조정 */
    height: 100vh
  }

   #Teacher .content {
    height: 230vh; /* 이미지 높이와 딱 맞게 설정 */
  }

   #Teacher .content img {
    content: url("images/teacher-content-mobile.png");
    height: 230vh;         /* PC용보다 살짝 줄여서 */
    margin-top: -365px;     /* 헤더 고려해 위치 보정 */
  

  }
}

@media (max-width: 768px) {
  .cutout {
    display: none !important;
  }
}

#Connect {
  position: relative;
  background-image: url('images/connect-bg.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  #Connect {
    background-image: url('images/connect-bg-mobile.jpg') !important;
  }

  #Connect .details img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: 0 auto;
}

}

.map-wraper {
  display: flex;
  justify-content: center;
}

.map-container {
  width: 100%;
  max-width: 600px;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3); /* 테두리 느낌 */
  background: rgba(0, 0, 0, 0.498);
  opacity: 0.95;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0.95;
  display: block;
}

header {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 30px;
}

#homeLogo {
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 20px;
  text-decoration: none;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
  text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.4);
}

#homeLogo:hover {
  color: #6ba4c8;
}


.qr-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 20, 0.95);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
  z-index: 999;
  display: none;
}

.qr-popup img {
  width: 220px;
  height: auto;
}

.qr-popup::after {
  content: "Click anywhere to close";
  display: block;
  text-align: center;
  color: #aaa;
  font-size: 14px;
  margin-top: 12px;
}

@media (max-width: 768px) { 
  
  nav {
    flex-direction: row; /* 가로 유지 */
    flex-wrap: wrap;     /* 넘칠 경우 줄바꿈 허용 */
    justify-content: center;
    gap: 16px;           /* 간격 줄이기 */
    padding: 0 10px;
  }

  nav a {
    font-size: 14px;     /* 글자 작게 */
    padding: 4px 6px;    /* 패딩 줄이기 */
    white-space: nowrap; /* 줄바꿈 방지 */
  }

  nav a.active {
    padding: 4px 8px;
  }

  
  header {
    padding-top: 20px;
  }

  .logo, #homeLogo {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .hero-logo-image {
    margin-top: 100px;
  }

  .hero-line {
    display: block;
    text-align: center;
  }

  .hero-nav {
    flex-direction: row; /* 가로 유지 */
    flex-wrap: wrap;     /* 넘칠 경우 줄바꿈 허용 */
    justify-content: center;
    gap: 16px;           /* 간격 줄이기 */
    padding: 20px 10px;
  }

  .hero-nav a {
    font-size: 16px;
  }

  .cutout {
    right: 10px;
    max-width: 90vw;
    max-height: 53vh;
  }
  .cutout.visible {
  opacity: 1; 
}
 #Teacher {
    padding: 120px 20px; /* 상하 여백 줄이고 좌우도 살짝 여유 */
  }

.Teacher-content {
  position: relative;
  z-index: 2;
}
.cutout {
  z-index: 1; /* 기존보다 낮게 설정 */
}

  .Teacher-content {
    padding: 20px;
    padding-right: 20px;
  }

  .Lessons-content {
    padding: 20px;
  }

  .map-container {
    height: 250px;
  }

  

  .enquiry-form {
    padding: 0 10px;
  }

  
#Connect .floating-social {
  bottom: 90px;
}


  .floating-social img {
    width: 20px;
    height: 20px;
  }

   #Connect .copyright {
    width: 100%;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    margin-top: 32px;
    padding: 16px 12px;
    color: #ccc;
    opacity: 0.85;
    display: block;
   }

  .qr-popup img {
    width: 160px;
  }

  .qr-popup::after {
    font-size: 12px;
  }
  
}





.mobile-lesson-nav {
  display: none;
}

/* 모바일 환경 */
@media screen and (max-width: 768px) {
  .card-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 16px;
  }

  .card-wrapper {
    width: 100%;
  }

  .card {
    height: 165px;
    width: 350px;
    font-size: 16px;
    padding: 20px;
    background-size: cover;
    border-radius: 12px;
  }

  .card-title {
    font-size: 18px;
    padding: 12px;
    text-align: center;
  }

  .card-content {
    font-size: 14px;
    line-height: 1.5;
    padding: 12px;
  }

  .mobile-lesson-nav {
    display: none; /* 드롭다운 숨기고 카드 보여주는 버전 */
  }
}

.logo {
  margin: 0 !important;
  padding: 3px !important;
  line-height: 1.1;
}

.logo a {
  display: block;
  padding: 0 !important;
  margin: 0 !important;
}

nav {
  margin: 0 !important;
  padding: 0 !important;
}

@media (max-width: 768px) {
  #Connect {
    position: relative;
    background-image: url('images/connect-bg.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: scroll; /* ← 고정 대신 스크롤로 */
  }
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.popup-content {
  position: relative;
  background: white;
  padding: 0;
  border-radius: 12px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  overflow: hidden;
}

.popup-img {
  width: 100%;
  height: auto;
  display: block;
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 26px;
  font-weight: bold;
  color: #444;
  cursor: pointer;
  background: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  text-align: center;
  line-height: 30px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}
  
#Studio {
    position: relative;
    background-color: #505050;
    overflow: hidden;
  }

  #Studio .studio-background-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    z-index: 0;
    pointer-events: none;
  }

  #Studio .slider-container {
    max-width: 1000px;
    margin: 20px auto;
    position: relative;
    overflow: visible;
    padding: 40px 20px;
  }
 #Studio .slide {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.6s ease, opacity 0.6s ease;
  }
  #Studio .slide.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  #Studio .slide img, 
  #Studio .slide .description {
    width: 50%;
  }
    #Studio .slide img {
    border-radius: 0 120px 0 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    width: 480px;
    height: 340px;
    object-fit: cover;
  }
  #Studio .description h2 {
    font-family: 'Ubuntu', sans-serif;
    font-size: 32px;
}

  #Studio .description {
    font-family: 'Nunito', sans-serif;
    padding: 20px;
    color: rgb(255, 255, 255);
    width: 600px;
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }


  
#Studio .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: white;
    border: none;
    padding: 16px;
    font-size: 22px;
    cursor: pointer;
    z-index: 2;
    opacity: 0.6;
    transition: opacity 0.3s ease;
  }

  #Studio .nav-arrow:hover {
    opacity: 1;
  }

  #Studio .nav-arrow.left {
    left: -65px;
  }
  #Studio .nav-arrow.right {
    right: -65px;
  }
   #Studio .dots {
    text-align: center;
    margin-top: 70px;
  }
  #Studio .dots span {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    display: inline-block;
    border-radius: 50%;
    background-color: #686868;
    cursor: pointer;
  }
  #Studio .dots span.active {
    background-color: #fff;
  }
 @media (max-width: 768px) {
  #Studio .slide {
    flex-direction: column;
    align-items: center; /* 이미지 가운데 정렬 유지 */
    gap: 10px; /* 요소 간 간격 줄이기 */
  }

  #Studio .slide img {
    width: 270px;
    height: 200px;
    margin-top: -100px; /* 추가: 이미지를 조금 더 위로 올림 */
    border-radius: 0 60px 0 0;
  }

   #Studio .slide .description h2 {
    font-size: 1.4rem;
  }

  #Studio .slide .description {
    width: 110%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    align-items: flex-start;     
    margin-top: 0;         /* 불필요한 마진 제거 */
    gap: 0.1em; 
    font-size: 0.9rem; /* ✅ 글씨 크기 줄이기 */
    line-height: 1.3;   /* 줄 간격 살짝 여유 있게 */
  }

  #Studio .nav-arrow.left {
    left: -35px;
    margin-top: -100px;
  }

  #Studio .nav-arrow.right {
    right: -35px;
    margin-top: -100px;
  }

  #Studio .dots {
    text-align: center;
    margin-top: -60px;
  }
}