/* 섹션4 리디자인: 공지사항 / 온라인 문의 (분리 스타일) */
.notice-inquiry-section {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

/* 좌측 공지 확대, 우측 온라인문의 50% 크기 */
.ni-grid {
  display: grid;
  grid-template-columns: 1fr 0.5fr;
  height: 100%;
}

.ni-col {
  position: relative;
  background: #f3f1f1;
  background-size: cover;
  background-position: center;
}

.ni-col::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
}

.ni-notice::before {
  background: transparent;
}

.ni-inquiry::before {
  background: transparent;
}

.ni-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.ni-inner.align-end {
  justify-content: flex-end;
}

/* 공지 영역을 더 아래로 */
.ni-notice .ni-inner {
  padding-top: 160px;
}

/* 새로운 헤더 영역 - 카드형 레이아웃 */
.ni-head {
  color: #333;
  width: 100%;
  margin-bottom: 40px;
  display: flex;
  justify-content: center; /* 제목은 중앙 유지 */
  align-items: center;
  position: relative;
}

.ni-header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ni-main-title {
  font-size: 2.75rem;
  font-weight: 700;
  color: #000000;
  margin: 0;
  line-height: 1.2;
  text-align: center;
}

.ni-subtitle {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin: 0;
  line-height: 1.2;
}

.ni-nav-arrows {
  display: flex;
  gap: 12px;
}

.nav-arrow {
  width: 60px;
  height: 60px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-arrow:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.nav-arrow i {
  font-size: 0.9rem;
  color: #666;
}

/* 카드 그리드 레이아웃 - 한 행에 4개 */
.notice-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* 개별 카드 스타일 */
.notice-card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: relative;
  transition: all 0.3s ease;
  border-bottom: 3px solid #007bff;
  height: 400px !important; /* 강제 고정 높이 */
  max-height: 400px !important; /* 최대 높이 제한 */
  min-height: 400px !important; /* 최소 높이 보장 */
  display: flex;
  flex-direction: column;
  cursor: pointer; /* 전체 클릭 가능하도록 */
  opacity: 0;
  transform: translateY(30px);
  overflow: hidden; /* 넘치는 내용 숨김 */
  box-sizing: border-box; /* 패딩 포함한 크기 계산 */
}

.notice-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 카드 애니메이션 */
.notice-card.animate {
  opacity: 1;
  transform: translateY(0);
}

/* 카드 배지 */
.card-badge {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 15px;
  width: fit-content;
}

/* 카드 제목 */
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

/* 카드 설명 */
.card-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 auto 0; /* auto로 변경하여 남은 공간 차지 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1; /* 남은 공간 차지 */
}

/* 카드 하단 영역 */
.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto; /* 하단으로 밀어내기 */
}

/* 카드 날짜 */
.card-date {
  font-size: 0.85rem;
  color: #999;
  margin: 0;
}

/* 카드 플러스 버튼 */
.card-plus {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  color: #666;
  flex-shrink: 0; /* 크기 고정 */
}

.card-plus:hover {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

/* 기존 스타일 숨김 */
.ni-title,
.ni-cta,
.ni-list {
  display: none;
}

/* 온라인문의는 이미지 전용: 내부 텍스트/버튼 숨김 */
.ni-inquiry .ni-inner,
.ni-inquiry .ni-head,
.ni-inquiry .ni-title,
.ni-inquiry .ni-cta {
  display: none !important;
}

/* 리스트 */
.ni-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.ni-list li {
  display: grid;
  grid-template-columns: 80px 1fr 40px;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, .25);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
}

.ni-notice .ni-head,
.ni-notice .ni-cta,
.ni-notice .ni-title {
  color: #fff;
}

.ni-notice .ni-cta {
  border-color: #fff;
}

.ni-notice .ni-plus {
  color: #fff;
  border-color: #fff;
}

.ni-notice .ni-item-title,
.ni-notice .ni-item-desc,
.ni-notice .ni-day,
.ni-notice .ni-sub {
  color: #fff;
}

.ni-date {
  text-align: center;
}

.ni-day {
  font-size: 2rem;
  display: block;
  font-weight: 700;
}

.ni-sub {
  font-size: .85rem;
  opacity: .7;
}

.ni-item-title {
  font-weight: 700;
  margin: 0 0 6px;
}

.ni-item-desc {
  margin: 0;
  opacity: .8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ni-plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
  position: relative;
}

.ni-plus span {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 12px;
  height: 12px;
  display: block;
}

.ni-plus span::before,
.ni-plus span::after {
  content: '';
  position: absolute;
  background: currentColor;
}

.ni-plus span::before {
  width: 12px;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.ni-plus span::after {
  width: 2px;
  height: 12px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

/* 태블릿 (992px 이하) */
@media (max-width: 992px) {
  .ni-grid {
    grid-template-columns: 1fr;
  }

  .ni-inner {
    padding: 40px;
  }

  .ni-notice .ni-inner {
    padding-top: 80px;
  }

  /* 카드 그리드를 2x2로 변경 */
  .notice-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  /* 카드 높이 조정 */
  .notice-card {
    height: 350px !important;
    max-height: 350px !important;
    min-height: 350px !important;
    padding: 25px;
  }

  /* 제목 크기 조정 */
  .ni-main-title {
    font-size: 2.2rem;
  }

  /* 온라인 문의 영역 높이 조정 */
  .ni-col.ni-inquiry {
    min-height: 50vh;
  }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
  .ni-inner {
    padding: 30px 20px;
  }

  .ni-notice .ni-inner {
    padding-top: 130px;
  }

  /* 카드 그리드를 1열로 변경 */
  .notice-cards-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* 카드 높이 더 작게 조정 */
  .notice-card {
    height: 280px !important;
    max-height: 280px !important;
    min-height: 280px !important;
    padding: 20px;
  }

  /* 제목 더 작게 */
  .ni-main-title {
    font-size: 1.8rem;
  }

  /* 카드 내용 폰트 크기 조정 */
  .card-title {
    font-size: 1rem;
    line-height: 1.3;
  }

  .card-desc {
    font-size: 0.85rem;
    -webkit-line-clamp: 3; /* 모바일에서는 3줄까지 */
  }

  .card-date {
    font-size: 0.8rem;
  }

  /* 네비게이션 버튼 크기 조정 */
  .nav-arrow {
    width: 50px;
    height: 50px;
  }

  .nav-arrow i {
    font-size: 0.8rem;
  }

  /* MORE OVER 버튼 위치 조정 */
  .ni-head .notice-more-btn {
    position: static;
    margin-top: 20px;
    transform: none;
  }

  .ni-head {
    flex-direction: column;
    align-items: center;
  }

  /* 온라인 문의 영역 숨김 (모바일에서는 공지사항만) */
  .ni-col.ni-inquiry {
    display: none;
  }

  .ni-grid {
    grid-template-columns: 1fr;
  }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
  .ni-inner {
    padding: 20px 15px;
  }

  .ni-notice .ni-inner {
    padding-top: 130px;
  }

  /* 카드 높이 더욱 작게 */
  .notice-card {
    height: 250px !important;
    max-height: 250px !important;
    min-height: 250px !important;
    padding: 15px;
  }

  /* 제목 더욱 작게 */
  .ni-main-title {
    font-size: 1.5rem;
  }

  /* 카드 내용 더 작게 */
  .card-title {
    font-size: 0.9rem;
  }

  .card-desc {
    font-size: 0.8rem;
    -webkit-line-clamp: 2; /* 작은 화면에서는 2줄까지 */
  }

  .card-date {
    font-size: 0.75rem;
  }

  .card-plus {
    width: 25px;
    height: 25px;
    font-size: 1rem;
  }

  /* 네비게이션 간격 조정 */
  .notice-nav-bottom {
    margin-top: 30px;
    margin-bottom: 40px;
  }

  .ni-nav-arrows {
    gap: 8px;
  }

  .nav-arrow {
    width: 45px;
    height: 45px;
  }
}

/* Footer basic styles */
.site-footer {
  background: #0f1114;
  color: #c9cdd3;
  padding: 40px 20px;
}

.site-footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 12px;
  align-items: center;
}

.site-footer .footer-brand {
  font-weight: 800;
  font-size: 1.2rem;
  color: #e5e7eb;
}

.site-footer .footer-info {
  font-size: 0.95rem;
}

.site-footer .footer-copy {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  opacity: .7;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .site-footer .footer-container {
    grid-template-columns: 1fr;
  }
}

/* MORE OVER+ 버튼 */
.notice-more-btn {
  display: flex;
  justify-content: flex-end;
}

/* 헤더 우측 고정: MORE OVER 버튼 */
.ni-head .notice-more-btn {
  position: absolute;
  right: 0;
  top: 80%;
  transform: translateY(-50%);
}

/* 하단 중앙 화살표 컨테이너 */
.notice-nav-bottom {
  margin-top: 50px;
  margin-bottom: 60px;
  display: flex;
  justify-content: center;
}

.notice-nav-bottom .ni-nav-arrows {
  display: flex;
  justify-content: center;
  align-items: center;
}

.more-over-btn {
  background: #ffffff; /* 배경 흰색 */
  color: #007bff;
  border: 2px solid #007bff;
  padding: 8px 17px; /* 12x24 → 약 30% 축소 */
  border-radius: 6px;
  font-size: 0.7rem; /* 1rem → 약 30% 축소 */
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.more-over-btn:hover {
  background: #ffffff; /* hover에도 흰색 유지 */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}