/* 소개 카드 스타일 */
.intro-title {
  margin-bottom: 60px; /* 20px에서 60px로 증가 */
}

.intro-cards {
  display: grid;
  gap: 50px;
  margin-bottom: 50px;
}

.intro-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  position: relative;
}

.intro-card.primary {
  background: #eef2ff;
}

.intro-card.warning {
  background: #fff9e6;
}

.intro-card.danger {
  background: #fff2f2;
}

.intro-card.success {
  background: #f0fff4;
}

@media screen and (max-width: 1024px) {
  .intro-title {
    margin-bottom: 30px;
  }
  .intro-title h1 {
    font-size: 24px;
  }
  .intro-card {
    padding: 20px;
    gap: 10px;
    flex-direction: column;
    align-items: start;
  }
}

/* 카드 타이틀 스타일 */
.card-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  width: 150px;
  flex-direction: row-reverse;
}

.card-title label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-direction: row-reverse;
}

.card-title span {
  color: #0b0b0b;
  font-weight: 500;
  margin-right: auto;
}

.card-title img {
  width: 24px;
  height: 24px;
}

/* 카드 내용 스타일 */
.card-content {
  flex: 1;
  min-width: 700px; /* 컨텐츠 영역의 최소 너비 설정 */
}

.card-content h3 {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
}

.card-content p {
  font-size: 20px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 10px;
  word-break: keep-all;
}

.card-content .sub-text {
  font-size: 17px;
  color: #666;
  margin-top: 10px;
  display: block; /* block으로 설정하여 새 줄에서 시작 */
}

/* 카드 배경색 스타일 */
.intro-card.primary .card-title {
  background-color: #4169e1;
}

.intro-card.warning .card-title {
  background-color: #ffa500;
}

.intro-card.danger .card-title {
  background-color: #ff6b6b;
}

.intro-card.success .card-title {
  background-color: #2ecc71;
}

.primary {
  background-color: #f5f7ff;
}

.warning {
  background-color: #fff9e6;
}

.danger {
  background-color: #fff2f2;
}

.success {
  background-color: #f0fff4;
}

@media screen and (max-width: 1024px) {
  .intro-card {
    padding: 20px;
    gap: 10px;
    flex-direction: column;
    align-items: start;
  }
  .card-content {
    min-width: 100%;
  }
  .card-content p {
    font-size: 16px;
  }
  .card-content .sub-text {
    font-size: 14px;
  }
}

/* 테이블 스타일 */
.table-title {
  font-size: 30px;
  font-weight: bold;
  margin-bottom: 20px;
  margin-top: 100px;
  color: #333;
}

.table-container {
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 170px;
  position: relative; /* position 추가 */
  z-index: 1; /* 기본 z-index 설정 */
}

.table-row {
  display: flex;
  border-bottom: 1px solid #e5e5e5;
  position: relative; /* position 추가 */
}

.table-row:last-child {
  border-bottom: none;
}

.table-cell {
  padding: 20px;
  line-height: 1.6;
}

.th-blue {
  background-color: #f5f7ff;
  font-weight: 500;
  width: 30%;
  z-index: 1;
}

.th-beige {
  background-color: #fff9f2;
  font-weight: 500;
  width: 70%;
}

.left-col {
  width: 30%;
  background-color: #f8f9fa;
  font-size: 15px;
  z-index: 1;

  color: #333;
}

.right-col {
  width: 70%;
  background-color: #fff;
}

.right-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.right-col li {
  position: relative;
  padding-left: 12px;
  margin-bottom: 8px;
  color: #595959;
}

.right-col li:before {
  content: "·";
  position: absolute;
  left: 0;
}

.right-col li:last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 1024px) {
  .table-container {
    margin-bottom: 40px;
  }
  .table-title {
    font-size: 24px;
    margin-top: 50px;
  }
}

/* 소개 섹션 스타일 */
.introduction-section,
.purpose-section {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 30px;
  margin-bottom: 40px;
}

.background-content,
.purpose-content {
  padding: 10px;
}

.background-list,
.purpose-list,
.detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.background-list li,
.purpose-list li,
.detail-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 20px;
  line-height: 1.8;
  color: #545454;
  font-size: 16px;
  word-break: keep-all;
}

.background-list li:before,
.purpose-list li:before,
.detail-list li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  background-color: #4a90e2;
  border-radius: 50%;
}

/* 다이어그램 스타일 */
.purpose-diagram {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 30px;
  margin: 40px 0;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.purpose-diagram img {
  max-width: 100%;
  height: auto;
}

/* 참고 텍스트 스타일 */
.reference {
  color: #595959;
  font-size: 14px;
  margin: 30px 0 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 6px;
  word-break: keep-all;
}

.purpose-details {
  margin-top: 30px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

/* 타임라인 스타일 */
.timeline-centered {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #4169e1;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 60px;
  min-height: 100px;
  width: 100%;
}

.dot {
  position: absolute;
  left: 50%;
  width: 16px;
  height: 16px;
  background-color: white;
  border: 3px solid #4169e1;
  border-radius: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
  z-index: 1;
}

.timeline-item.left .content {
  width: calc(50% - 50px);
  text-align: right;
  padding-right: 50px;
}

.timeline-item.right .content {
  width: calc(50% - 50px);
  margin-left: calc(50% + 50px);
}

.image-container {
  position: absolute;
  right: calc(50% + 50px);
  width: calc(50% - 100px);
}

.image-container-right {
  position: absolute;
  left: calc(50% + 50px);
  width: calc(50% - 100px);
}

.timeline-image {
  max-width: 400px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.timeline-item .year {
  font-size: 28px;
  font-weight: bold;
  color: #4169e1;
  margin-bottom: 10px;
}

.timeline-item p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  word-break: keep-all;
}

@media screen and (max-width: 1024px) {
  .reference {
    margin-top: 0;
  }
}

/* 모달 기본 스타일 */
.list-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.list-modal-content {
  position: relative;
  background-color: white;
  margin: 15% auto;
  padding: 30px;
  width: 400px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.list-modal-content h2 {
  margin-bottom: 30px;
  font-size: 24px;
  color: #333;
}

/* 모달 닫기 버튼 */
.modal-close {
  position: absolute;
  right: 20px;
  top: 10px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  color: #666;
}

.modal-close:hover {
  color: #4a90e2;
}

/* 모달 탭 스타일 */
.modal-tabs {
  width: 100%;
}

.modal-tab-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-tab-button {
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  background: #f5f5f5;
  color: #333;
  transition: all 0.3s ease;
}

.modal-tab-button:hover {
  background: #e0e0e0;
}

/* 탭 패널 스타일 */
.modal-tab-panel {
  display: none;
}

/* 그리드 리스트 스타일 */
.modal-grid-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.modal-grid-item {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  transition: background-color 0.2s ease;
}

.modal-grid-item:hover {
  background-color: #e9e9e9;
}

/* 탭 활성화 상태 */
#tab-obligation:checked ~ .list-modal .obligation,
#tab-voluntary:checked ~ .list-modal .voluntary {
  display: block;
}

#tab-obligation:checked
  ~ .list-modal
  .modal-tab-buttons
  label[for="tab-obligation"],
#tab-voluntary:checked
  ~ .list-modal
  .modal-tab-buttons
  label[for="tab-voluntary"] {
  background: #4a90e2;
  color: white;
}

/* 모달 표시 로직 */
.modal-toggle:checked ~ .list-modal {
  display: block;
  z-index: 2000;
}

/* 반응형 스타일 */
@media screen and (max-width: 768px) {
  .list-modal-content {
    width: 90%;
    margin: 20% auto;
    padding: 20px;
  }

  .list-modal-content h2 {
    font-size: 20px;
  }

  .modal-grid-list {
    grid-template-columns: 1fr;
  }

  .modal-grid-item {
    padding: 10px;
    font-size: 14px;
  }
}

/* 그리드 리스트 스타일 */
.grid-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.grid-item {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
}

.grid-item:hover {
  background-color: #e9e9e9;
}

/* 반응형 스타일 */
@media screen and (max-width: 1024px) {
  .timeline-centered {
    padding-left: 20px;
  }

  .timeline-line {
    left: 20px;
    transform: none;
  }

  .dot {
    top: -4px;
    left: -6px;
    transform: none;
  }

  .timeline-item.left .content,
  .timeline-item.right .content {
    margin: 0;
    padding-left: 40px;
    text-align: left;
    width: calc(100% - 40px);
  }

  .timeline-item .year {
    font-size: 24px;
  }

  .timeline-image {
    display: none;
  }

  .introduction-section,
  .purpose-section {
    padding: 20px;
  }

  .background-list li,
  .purpose-list li,
  .detail-list li {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* 토글 및 모달 관련 스타일 */
.modal-toggle {
  display: none !important;
  visibility: hidden;
  position: absolute;
  left: -9999px;
}

.hidden {
  display: none !important;
  visibility: hidden;
}

/* 모달 표시 로직 */
#obligation-modal-toggle:checked ~ .modal,
#voluntary-modal-toggle:checked ~ .modal {
  display: block;
}

/* 탭 패널 토글 스타일 */
.tab-panel {
  display: none;
}

#tab-obligation:checked ~ .tab-panels .obligation {
  display: block;
}

#tab-voluntary:checked ~ .tab-panels .voluntary {
  display: block;
}

/* 모달 토글 */
.modal-toggle,
#tab-obligation,
#tab-voluntary {
  display: none;
}

.modal-toggle:checked ~ .modal {
  display: block;
}

/* 모달 탭 패널 표시/숨김 */
#tab-obligation:checked ~ .modal .obligation {
  display: block;
}

#tab-voluntary:checked ~ .modal .voluntary {
  display: block;
}

/* 모달 탭 버튼 활성화 스타일 */
#tab-obligation:checked ~ .modal .tab-buttons label[for="tab-obligation"],
#tab-voluntary:checked ~ .modal .tab-buttons label[for="tab-voluntary"] {
  background: #007bff;
  color: white;
}

/* 닫기 버튼 관련 스타일 */
.modal[data-type="obligation"] .close[data-type="voluntary"],
.modal[data-type="voluntary"] .close[data-type="obligation"] {
  display: none;
}

/* 모달 토글 체크 시 해당하는 닫기 버튼만 표시 */
#obligation-modal-toggle:checked ~ .modal .close[data-type="obligation"],
#voluntary-modal-toggle:checked ~ .modal .close[data-type="voluntary"] {
  display: block;
}

/* 법률 섹션 스타일 */
.law-section {
  margin-bottom: 60px;
}

.law-section h2 {
  font-size: 32px;
  font-weight: bold;
  color: #333;
  margin-bottom: 50px;
}

.law-section:first-child h2 {
  margin-top: 0;
}

/* 두 번째 섹션의 제목은 상단 여백 추가 */
.law-section:nth-child(2) h2 {
  margin-top: 100px;
}

/* 카드 그리드 레이아웃 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

/* 법률 섹션 카드 스타일 */
.law-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 15px 20px;
  text-decoration: none;
  width: 100%;
  height: 52px;
  position: relative;
  display: block;
}

.law-card-content {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.law-card span {
  color: #333;
  font-size: 15px;
  padding-right: 30px;
}

.law-card .download-icon {
  width: 20px;
  height: 20px;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.law-card:hover .download-icon {
  transform: translateY(calc(-50% - 2px));
}

/* 카드 그리드 레이아웃 유지 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
}

/* 반응형 스타일 */
@media screen and (max-width: 768px) {
  .law-card {
    padding: 15px;
  }

  .law-card span {
    font-size: 14px;
    padding-right: 25px;
  }
}

/* 카드 스타일 */
.card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 15px 20px;
  text-decoration: none;
  width: 100%;
  height: 52px;
  display: block; /* a 태그를 블록 레벨로 변경 */
}

/* 카드 내부 콘텐츠 스타일 */
.card-content {
  position: relative; /* 상대 위치 설정 */
  display: flex;
  align-items: center;
  height: 100%;
}

.card span {
  color: #333;
  font-size: 15px;
  flex-grow: 1; /* 추가 */
  margin-right: 32px; /* 아이콘을 위한 공간 확보 */
}

.download-icon {
  width: 20px;
  height: 20px;
  position: absolute; /* 절대 위치 설정 */
  right: 0; /* 오른쪽 정렬 */
  top: 50%; /* 수직 중앙 정렬 */
  transform: translateY(-50%); /* 정확한 중앙 정렬을 위한 조정 */
  transition: transform 0.2s ease; /* 호버 효과를 위한 트랜지션 */
}

.card:hover .download-icon {
  transform: translateY(calc(-50% - 2px)); /* 호버 시 약간 위로 이동 */
}

/* 반응형 스타일 */
@media screen and (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .law-section h2 {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .card {
    padding: 15px;
  }

  .card span {
    font-size: 14px;
  }
}
