/* 메인 컨테이너 */
.main-container {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}
/* 섹션 제목 및 설명 그룹 */
.section-text-group {
  display: flex;
  flex-direction: column;
  gap: 16px; /* section-title과 section-description 사이 간격 */
}
.section-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  line-height: 1.25;
}
.section-description {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  color: var(--text-muted);
  line-height: 1.72;
  max-width: 614px;
  margin: 0 auto;
}
.section-text-group2 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px; /* section-title과 section-description 사이 간격 */
  text-align: center;
}
.section-description2 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  color: var(--text-muted);
  line-height: 1.72;
  max-width: 614px;
  margin: 0 auto;
  text-align: center;
}

/* ==========================================================================
   1. 히어로 섹션 (Hero Section)
   ========================================================================== */
.main-hero-section {
  position: relative;
  width: 100%;
  height: 700px;
  background-image: url("/images/content/main/hero-background-new.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  padding-top: var(--spacing-4xl);
  overflow: hidden;
}

.main-hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 var(--spacing-lg);
  max-width: var(--max-width-content);
  margin: var(--spacing-3xl) auto var(--spacing-5xl);
  width: 100%;
}

.main-hero-text {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-2xl);
}

.main-hero-title-group {
  display: flex;
  flex-direction: column;
}

.main-hero-subtitle {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

.main-hero-title {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-xl);
}

.main-title-main {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-black);
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 5px;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

.main-title-highlight {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-black);
  color: var(--primary-color);
  line-height: 1.2;
  text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

.main-hero-description {
  display: flex;
  align-items: flex-start;
}

.main-description-line {
  width: 5px;
  min-width: 5px;
  height: 60px;
  background-color: var(--primary-color);
  margin-right: var(--spacing-lg);
}

.main-description-text {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-light);
  color: var(--text-light);
  line-height: 1.7;
  max-width: 600px;
}

.main-hero-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* QR 섹션 */
.main-qr-section {
  position: absolute;
  bottom: var(--spacing-3xl);
  left: 0;
  right: 0;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-qr-background-element {
  position: relative; /* 자식 요소의 absolute 위치 지정을 위한 기준 */
  width: calc(100% + 40px);
  max-width: 1166px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--border-radius-2xl);
  background: rgba(255, 255, 255, 0.29);
  box-shadow: 2px 2px 4px 0px rgba(255, 255, 255, 0.9) inset, var(--shadow-xl);
  backdrop-filter: blur(4.75px);
  z-index: 1;
}

.main-qr-content-wrapper {
  position: absolute; /* 부모 요소에 맞춰 절대 위치 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* 부모 요소의 높이를 따르도록 설정 */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 20px;
  z-index: 2;
}

.main-qr-text {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: var(--text-brown);
  text-align: left; /* 텍스트 정렬 변경 */
  margin: 0;
  margin-right: auto; /* QR 코드와 분리 */
  white-space: nowrap; /* 줄바꿈 방지 */
}

.main-qr-codes {
  display: flex;
  align-items: center;
  gap: var(--spacing-2xl);
  align-self: flex-end; /* main-qr-content-wrapper 내에서 오른쪽 하단에 정렬 */
  margin-left: 40%; /* main-qr-content-wrapper의 좌측에서 60% 지점 */
  transform: translate(-50%, 16%); /* 요소의 중앙이 60% 지점에 오도록 조정 */
}

.main-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-qr-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.main-qr-code-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 38px;
}

.main-qr-icon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.main-qr-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.main-qr-code {
  width: 133px;
  height: 133px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background-color: var(--white);
}

.main-qr-code img {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-normal);
  color: var(--text-secondary);
  text-align: center;
}

/* ==========================================================================
   2. 교육 섹션 (Education Section)
   ========================================================================== */
.education-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--spacing-4xl);
  margin: 70px auto;
  max-width: 1200px;
}

.education-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-4xl);
}

.main-education-text {
  max-width: 531px;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  order: 1;
}

.education-video {
  flex-shrink: 0;
  order: 2;
}

.video-container {
  position: relative;
  width: 555px;
  height: 300px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
}

.video-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  object-fit: fill;
  border: none;
  transform: scale(1.05); /* 살짝 확대하여 검은색 바 제거 */
  transform-origin: center;
}

/* 모바일에서의 비디오 컨테이너 조정 */
@media (max-width: 767px) {
  .video-container iframe {
    transform: scale(1.1); /* 모바일에서는 더 확대 */
  }
}

/* 반응형 처리 */
@media (max-width: 767px) {
  .video-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 79px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  filter: drop-shadow(0px 0px 10px rgba(0, 0, 0, 0.25));
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

/* ==========================================================================
   3. 공지사항 섹션 (Notice Section)
   ========================================================================== */
.main-notice-section {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 102px;
  background-color: var(--background-light);
  margin: 0 auto;
}

.main-notice-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-4xl);
  width: 100%;
  justify-content: center;
  margin: 70px auto;
  max-width: 1200px;
}

.main-notice-cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  max-width: 600px;
}

.main-notice-card {
  display: flex;
  flex-direction: row;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 3px 3px 8px 0px rgba(0, 0, 0, 0.08);
  background-color: var(--white);
  transition: transform 0.3s ease;
}

.main-notice-card:hover {
  transform: translateY(-5px);
}

.main-cardNotice-image {
  width: 127px;
  height: 130px;
  overflow: hidden;
  flex-shrink: 0;
}

.main-cardNotice-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.main-cardNotice-content {
  padding: 10px 50px 10px 35px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.main-cardNotice-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.main-cardNotice-category {
  font-size: 14px;
  font-weight: 500;
  color: #929292;
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

.main-cardNotice-date {
  font-size: 12px;
  color: #929292;
}

.main-cardNotice-title {
  font-size: 24px;
  font-weight: 700;
  color: #454545;
  margin-bottom: 8px;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.main-cardNotice-description {
  font-size: 14px;
  color: #929292;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-notice-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 500px;
  gap: var(--spacing-lg);
}

.main-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
  gap: 6px;
}

.main-page-dot {
  width: 12px;
  height: 12px;
  background-color: #d9d9d9;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.main-page-dot:hover,
.main-page-dot.active {
  background-color: #0073bc;
}

.main-page-dot:nth-child(1) {
  transform: scale(1);
}
.main-page-dot:nth-child(2) {
  transform: scale(0.8);
}
.main-page-dot:nth-child(3) {
  transform: scale(0.6);
}
.main-page-dot:nth-child(4) {
  transform: scale(0.4);
}

/* 공지사항 카드 애니메이션 */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up-animation {
  animation: slideUp 0.5s ease-out forwards;
}

/* ==========================================================================
   4. 주요사업 섹션 (Business Section)
   ========================================================================== */
.business-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-5xl) var(--spacing-lg);
  position: relative;
}

.business-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-4xl);
  position: relative;
}

.business-cards {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
  width: 100%;
  max-width: var(--max-width-content);
}

.business-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 22px 20px;
  width: 258px;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  transition: all 0.3s ease;
  cursor: pointer;
}

.business-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.businessCard-image {
  width: 100%;
  height: 220px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}
.businessCard-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .businessCard-image img {
  transform: scale(1.05);
}

.businessCard-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--text-secondary);
  line-height: 1.2;
  text-align: left;
  width: 100%;
  margin-bottom: 0;
  -webkit-line-clamp: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.businessCard-description {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  color: var(--text-muted);
  line-height: 1.28;
  text-align: left;
  width: 100%;
  height: auto;
  -webkit-line-clamp: unset;
}

/* 로딩 인디케이터 스타일 */
.loading-indicator {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-xl);
  gap: var(--spacing-md);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-indicator p {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}

.business-decoration {
  position: absolute;
  left: calc(5%);
  width: 90%;
  height: 620px;
  pointer-events: none;
  z-index: -1; /* 가장 뒤에 배치 */
}

.business-decoration .decoration-cross.blue {
  top: 0;
  right: 0;
}

.business-decoration .decoration-cross.orange {
  top: 157px;
  left: 0;
}

.business-decoration .decoration-cross.gray {
  bottom: 0;
  left: 350px;
}

.decoration-cross {
  position: absolute;
  pointer-events: none;
}

/* 귀여운 느낌의 모서리가 둥근 십자가 */
.decoration-cross::before,
.decoration-cross::after {
  content: "";
  position: absolute;
  background-color: currentColor;
  border-radius: 10px; /* 모서리를 둥글게 */
}

.decoration-cross::before {
  width: 8px;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.decoration-cross::after {
  width: 100%;
  height: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.decoration-cross.blue {
  width: 53px;
  height: 53px;
  color: var(--gradient-blue);
}

.decoration-cross.orange {
  width: 56px;
  height: 56px;
  color: var(--secondary-color);
}

.decoration-cross.gray {
  width: 39px;
  height: 39px;
  color: var(--gradient-gray);
}

/* 모바일에서 데코레이션이 화면을 가리지 않도록 조정 */
@media (max-width: 767px) {
  .business-decoration {
    z-index: -1;
    opacity: 0.3; /* 모바일에서는 더 투명하게 */
  }

  .business-decoration .decoration-cross.blue {
    top: 20px;
    right: 20px;
  }

  .business-decoration .decoration-cross.orange {
    top: 177px;
    left: 20px;
  }

  .business-decoration .decoration-cross.gray {
    bottom: 20px;
    left: 336px;
  }
}

/* ==========================================================================
   5. 갤러리 섹션 (Gallery Section)
   ========================================================================== */
.gallery-section {
  background-color: var(--background-light);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  padding: var(--spacing-4xl) var(--spacing-lg);
}

.gallery-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-4xl);
  padding: var(--spacing-lg) 0;
}

.gallery-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
  max-width: 1200px;
}

.gallery-item {
  flex: 1 1 calc(25% - 30px);
  max-width: calc(25% - 30px);
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
  aspect-ratio: 1 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .gallery-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(38, 63, 79, 0.9);
  color: white;
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.gallery-item:hover .gallery-card-content,
.gallery-item:active .gallery-card-content,
.gallery-item:focus .gallery-card-content {
  transform: translateY(0);
  opacity: 1;
}

.gallery-card-content .gallery-card-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}

.gallery-card-content .gallery-card-category {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  display: inline-block;
}

.gallery-card-content .gallery-card-date {
  font-size: var(--font-size-xs);
  font-weight: 300;
  color: white;
}

/* ==========================================================================
   6. 파트너 섹션 (Partners Section)
   ========================================================================== */
.partners-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-3xl);
  padding: var(--spacing-2xl) var(--spacing-lg);
  min-height: 487px;
}

.partners-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-3xl);
  width: 100%;
}

.partners-divider {
  width: 408px;
  height: 1px;
  background-color: var(--border-color);
}

.partners-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 55px;
  width: 100%;
  max-width: 1220px;
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.partner-logo:hover {
  transform: scale(1.05);
}

.partner-logo img {
  max-height: 45px;
  width: auto;
  object-fit: contain;
}

/* ==========================================================================
   7. 반응형 스타일 (Responsive Styles)
   ========================================================================== */
@media (max-width: 1173px) {
  .main-education-text {
    order: 2;
  }
  .education-video {
    order: 1;
  }
}
@media (max-width: 1023px) {
  /* Hero Section */
  .main-hero-section {
    height: 700px;
    min-height: 400px;
  }
  .main-hero-content {
    margin: 70px var(--spacing-lg);
    justify-content: flex-start;
  }
  .main-title-main,
  .main-title-highlight {
    font-size: var(--font-size-4xl);
  }
  .main-qr-section {
    left: var(--spacing-3xl);
    right: var(--spacing-3xl);
    padding: 0;
    bottom: var(--spacing-3xl);
  }
  .main-qr-background-element {
    height: 60px;
  }

  .main-qr-text {
    flex-wrap: wrap;
  }
  .main-qr-codes {
    gap: var(--spacing-lg);
    transform: translate(-20%, 16%);
    margin-left: 10%;
  }

  /* Education Section */
  .education-section {
    flex-direction: column;
    gap: var(--spacing-2xl);
    /* padding: var(--spacing-3xl) var(--spacing-lg); */
  }
  /* Gallery Section */
  .gallery-section {
    padding: var(--spacing-3xl) var(--spacing-lg);
  }

  .gallery-item {
    flex: 1 1 calc(33.333% - 30px);
    max-width: calc(33.333% - 30px);
  }

  /* Partners Section */
  .partners-section {
    padding: var(--spacing-2xl) var(--spacing-lg);
    height: auto;
  }
}

@media (max-width: 767px) {
  .section-text-group {
    text-align: center;
  }
  .section-title {
    font-size: var(--font-size-3xl); /* global.css에서 옮겨옴 */
  }
  .section-description {
    font-size: var(--font-size-lg); /* global.css에서 옮겨옴 */
  }

  /* Hero Section */
  .main-hero-section {
    height: 500px;
    min-height: 500px;
    padding-top: var(--spacing-3xl);
  }
  .main-hero-content {
    gap: var(--spacing-lg);
    margin: 30px 0;
    justify-content: flex-start;
  }
  .main-hero-text {
    margin-bottom: var(--spacing-lg);
  }
  .main-description-text {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
  }
  .main-title-main,
  .main-title-highlight {
    font-size: 32px;
  }
  .main-hero-buttons {
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
  }
  .main-hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  .main-qr-section {
    display: none;
  }

  /* Education Section */
  .education-content {
    flex-direction: column;
    gap: var(--spacing-lg);
    padding: 0 10px;
  }
  .main-education-text {
    padding: 0 var(--spacing-2xl);
  }
  .video-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
  /* ////////////////////공지사항 섹션/////////////// */
  .main-notice-section {
    padding: 0 10px;
  }
  .main-notice-content {
    gap: var(--spacing-2xl);
  }
  .main-notice-cards {
    max-width: 100vw;
    padding: 0 10px;
  }
  .main-cardNotice-content {
    padding: 6px 20px 6px 12px;
    width: 100%;
  }
  .main-cardNotice-image {
    width: 80px;
    height: 80px;
  }
  .main-cardNotice-title {
    font-size: var(--font-size-lg);
    margin-bottom: 3px;
  }
  .main-cardNotice-description {
    font-size: var(--font-size-xs);
    line-height: 1.2;
    text-overflow: ellipsis;
  }
  .main-cardNotice-meta {
    margin-bottom: 0;
  }
  .main-cardNotice-category {
    font-size: var(--font-size-xs);
  }
  .main-cardNotice-date {
    font-size: var(--font-size-xs);
  }
  /* Business Section */
  .business-section {
    padding: 60px 10px;
  }
  .business-cards {
    flex-direction: column;
    align-items: center;
  }
  .business-card {
    width: 90%;
  }
  .businessCard-image {
    width: 100%;
    height: 120px;
  }
  .businessCard-title {
    font-size: var(--font-size-xl);
    text-align: center;
  }
  .businessCard-description {
    font-size: var(--font-size-sm);
    text-align: center;
  }
  .business-decoration {
    position: absolute;
    left: calc(5%);
    width: 90%;
    height: 720px;
    pointer-events: none;
  }

  /* Gallery Section */
  .gallery-grid {
    gap: var(--spacing-md);
  }
  .gallery-item {
    height: auto;
    min-width: 46%;
  }

  /* Partners Section */
  .partners-content {
    gap: var(--spacing-lg);
  }
  .partners-grid {
    gap: var(--spacing-lg);
  }
  .partner-logo {
    width: calc(50% - var(--spacing-md));
  }
  .partners-divider {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
  }
}
