/* 전체 레이아웃 기본 설정 */
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  color: #333;
  background-color: #fff;
}
span {
  display: inline-flex;
  align-items: center;
}
/* container: 가운데 정렬 + 최대 너비 1200px */
.container {
  width: 1200px;
  max-width: 95%;
  margin: 0 auto;
  padding: 20px;
}
.container p {
  text-align: center;
}

/* 헤더 스타일 */
header {
  width: 100%;
  background-color: #f5f5f5;
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
}
.logo img {
  width: auto;
  max-width: 100%;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  margin-right: 10px;
}
.nav-buttons a {
  color: #333;
  text-decoration: none;
  font-size: 18px;
  padding: 5px 10px;
  margin: 0 5px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}
.nav-buttons a:hover {
  border: 1px solid #333;
  border-radius: 3px;
}

/* 메인 배너 */
.banner {
  width: 100%;
  background: url("../source/test_bg.png") no-repeat center / cover;
  margin: 0 auto;
}
.banner-content {
  width: 1200px;
  max-width: 95%;
  margin: 0 auto;
  padding: 20px;
}
.banner-content h1 {
  color: #438759;
  font-size: 50px;
  font-weight: bold;
  margin: 0 0 20px;
}
.vod-date {
  display: inline-block;
  background-color: orange;
  color: #fff;
  font-size: 20px;
  padding: 5px 10px;
  margin-bottom: 20px;
}
.notice {
  font-size: 18px;
  color: #666;
  line-height: 1.5;
}
.soft-red {
  color: #FF6B6B;
}

/* 두 번째 배너 (2칸: 프로그램 / 등록) */
.sub-banner {
  width: 100%;
  background-color: #438759;
  margin: 0 auto;
}
.sub-banner-content {
  width: 1200px;
  max-width: 95%;
  margin: 0 auto;
  display: flex;
}
.sub-banner-content a {
  flex: 1;
  text-decoration: none;
  text-align: center;
  color: #fff;
  font-size: 20px;
  padding: 30px 0;
  border-left: 1px solid #fff; 
  box-sizing: border-box;
}
.sub-banner-content a:last-child {
  border-right: 1px solid #fff;
}
.sub-banner-content a:hover {
  background-color: #006666;
}
.sub-banner-content a.is-active {
  background-color: #2f5a3f;
}

/* 등록 폼 영역 */
.register-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.register-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.register-field.is-full {
  grid-column: 1 / -1;
}
label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}
input, select, textarea {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
.register-field-required {
  margin-left: 4px;
  color: #c6362c;
}
.register-field-error {
  margin: 0;
  color: #c6362c;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
}
.register-field-help {
  margin: 0;
  color: #667085;
  font-size: 0.875rem;
  line-height: 1.5;
}
.button-wrapper {
  text-align: center;
  margin-top: 30px;
}
.button-wrapper button {
  padding: 10px 30px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #438759;
  color: #fff;
  transition: background-color 0.3s;
}
.button-wrapper button:hover {
  background-color: #366345;
}

/* 약관 동의 영역: 체크박스가 텍스트 바로 뒤에 붙도록 수정 */
.terms-consents {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}
.terms-consent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid #d7e2da;
  border-radius: 16px;
  background: #f8fbf9;
}
.terms-consent-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: #2b3440;
  font-size: 16px;
  line-height: 1.7;
}
.terms-consent-copy a {
  color: #438759;
  text-decoration: underline;
  transition: color 0.3s;
}
.terms-consent-copy a:hover {
  color: #006666;
}
.terms-consent-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.terms-consent-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(67, 135, 89, 0.12);
  color: #2f6b43;
  font-size: 12px;
  font-weight: 700;
}
.terms-consent-check {
  width: 22px;
  height: 22px;
  border: 1px solid #b7c4ba;
  border-radius: 999px;
  background: #fff;
  position: relative;
}
.terms-consent-check.is-checked {
  border-color: #438759;
  background: #438759;
}
.terms-consent-check.is-checked::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 7px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.terms-consent-button {
  padding: 10px 16px;
  border: 1px solid #c9d6cd;
  border-radius: 999px;
  background: #fff;
  color: #2f6b43;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.terms-consent-button:hover {
  background: #f3f8f5;
}

/* 모달 오버레이 스타일 */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 1000;
}
.modal-overlay.is-open {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
/* 모달 내용 */
.modal-content {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(88vh, 840px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.modal-header-copy {
  flex: 1;
}
.modal-header h1 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
}
.modal-header p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 24px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
.modal-confirm-button {
  min-width: 120px;
  padding: 12px 22px;
  border: 1px solid #111827;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.modal-secondary-button {
  min-width: 120px;
  padding: 12px 22px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.modal-secondary-button:hover {
  background: #f9fafb;
}
.modal-confirm-button:hover {
  background: #000;
  border-color: #000;
}
.modal-close-button {
  width: 44px;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.modal-close-button:hover {
  background: #f9fafb;
}
/* 개인정보 약관 내 제목 스타일 */
.section-title {
  display: block;
  margin: 0 0 12px;
  color: #111827;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
}
.privacy-section {
  padding: 0;
  border-bottom: none;
}
.privacy-section:last-child {
  border-bottom: none;
}
.privacy-section p {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.8;
}
.privacy-content {
  margin: 0;
  color: #111827;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
}
body.modal-open {
  overflow: hidden;
}

/* 푸터 영역 */
footer {
  margin: 0;
  padding: 0;
  width: 100%;
}
.footer-sponsor {
  color: black;
  font-weight: bold;
  border-top: 1px solid black;
  width: 100%;
  background-color: #fff;
}
.sponsors {
  text-align: center;
}
.sponsor-item {
  margin: 0 20px;
  font-size: 16px;
  vertical-align: middle;
}
.sponsors img {
  vertical-align: middle;
  width: auto;
  max-width: 100%;
  height: 28px;
  object-fit: contain;
  object-position: center;
  margin-left: 5px;
}
.footer-bottom {
  width: 100%;
  background-color: #444;
  color: white;
  font-weight: bold;
  padding: 10px 0;
  text-align: center;
  font-size: 15px;
}

/* 로그인 폼 추가 스타일 */
.login-form {
  max-width: 400px;
  margin: 50px auto 0;
}
.login-form p {
  text-align: center;
  font-size: 16px;
}
.login-form label {
  font-weight: bold;
  margin-bottom: 5px;
  display: block;
}
.login-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  box-sizing: border-box;
  font-size: 16px;
}

/* 반응형 스타일 (모바일 대응) */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 12px;
  }

  .modal-content {
    max-height: 92vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 20px 20px 14px;
  }

  .modal-header h1 {
    font-size: 22px;
  }

  .modal-body {
    padding: 16px 20px;
  }

  .modal-footer {
    padding: 14px 20px 20px;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-confirm-button,
  .modal-secondary-button {
    width: 100%;
  }

  .terms-consent {
    flex-direction: column;
    align-items: flex-start;
  }

  .terms-consent-meta {
    width: 100%;
    justify-content: space-between;
  }
}
@media (max-width: 768px) {
  .container {
    width: 90%;
    padding: 10px;
  }
  .banner-content, .sub-banner-content {
    width: 100%;
    padding: 10px;
  }
  .banner-content h1 {
    font-size: 36px;
  }
  .vod-date {
    font-size: 16px;
    padding: 5px 8px;
  }
  .notice {
    font-size: 16px;
  }
  .sub-banner-content a {
    font-size: 16px;
    padding: 20px 0;
  }
  .register-fields-grid {
    grid-template-columns: 1fr;
  }
  .register-field.is-full {
    grid-column: auto;
  }
  .login-form {
    max-width: 90%;
    margin: 20px auto 0;
  }
  .logo img {
    width: auto;
    height: 42px;
  }
  .sponsors img {
    width: auto;
    height: 26px;
  }
}

@media (max-width: 480px) {
  html, body {
    margin: 0px;
    overflow-x: hidden;
    width: 100%;
  }
  .header-inner {
    flex-direction: column;
    text-align: center;
  }
  .nav-buttons {
    margin-top: 10px;
  }
  .banner-content h1 {
    font-size: 28px;
  }
  .vod-date {
    font-size: 14px;
    padding: 4px 8px;
  }
  .notice {
    font-size: 14px;
  }
  .sub-banner-content a {
    font-size: 14px;
    padding: 15px 0;
  }
  .login-form {
    padding: 0 10px;
  }
  .login-form label, .login-form input {
    font-size: 12px;
  }
  .button-wrapper button {
    font-size: 0.8rem;
    padding: 6px 16px;
  }
  .logo img {
    width: auto;
    height: 38px;
  }
  .sponsors img {
    width: auto;
    height: 24px;
  }
  .footer-bottom {
    font-size: 13px;
  }
  /* 모바일 전용: 푸터 주최/후원 텍스트 작게 및 줄바꿈 */
  .sponsor-item {
    display: block;
    margin: 10px 0;
    font-size: 12px;
  }
  .sponsors img {
    max-width: none;
  }
  .terms-consent input[type="checkbox"] {
    transform: none; /* transform 효과 제거 */
    -webkit-appearance: checkbox; /* 기본 체크박스 스타일 적용 */
    margin-left: 4px; /* 필요한 margin만 적용 */
  }
}
