/* ============================================================
   KUCM Website - Home Page Styles (nonamechurch style)
   ============================================================ */

/* ------------------------------------------------------------
   1. 메인 배너 캐러셀 (Hero Slider)
   ------------------------------------------------------------ */
.hero-carousel-wrap {
  position: relative;
  width: 100%;
  background: #0f172a;
  overflow: hidden;
}

.hero-carousel-ratio {
  position: relative;
  width: 100%;
  padding-bottom: 36.45%; /* 데스크탑 비율 (1920x700 = 36.45%) */
}

@media (max-width: 768px) {
  .hero-carousel-ratio {
    padding-bottom: 74.6% !important; /* 모바일 비율 (750x560 = 74.6%) */
  }
}

.hero-carousel-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  z-index: 1;
}

.hero-carousel-item.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.hero-carousel-item a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.hero-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 캐러셀 화살표 컨트롤 (참고사이트 원형 반투명 스타일) */
.hero-control-prev,
.hero-control-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: none;
  cursor: pointer;
  z-index: 10;
  opacity: 0.7;
  pointer-events: auto;
  transition: opacity 0.3s ease, background-color 0.2s, transform 0.2s;
  text-decoration: none;
}

.hero-carousel-wrap:hover .hero-control-prev,
.hero-carousel-wrap:hover .hero-control-next {
  opacity: 0.95;
}

.hero-control-prev {
  left: 20px;
}

.hero-control-next {
  right: 20px;
}

.hero-control-prev:hover,
.hero-control-next:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.08);
}

@media (max-width: 768px) {
  .hero-control-prev,
  .hero-control-next {
    opacity: 0.75;
    pointer-events: auto;
  }
}

@media (max-width: 575.98px) {
  .hero-control-prev,
  .hero-control-next {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .hero-control-prev { left: 10px; }
  .hero-control-next { right: 10px; }
}

/* 캐러셀 하단 인디케이터 점 */
.hero-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-indicator-dot.is-active {
  width: 28px;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------
   1-B. 개신교(장로교) 사역 빠른 바로가기 바 (Quick Ministry Bar)
   ------------------------------------------------------------ */
.nn-quick-bar {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid #e8eef5;
  padding: 22px 0;
}

.nn-quick-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
}

.nn-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 8px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.nn-quick-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #1e3a5f;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nn-quick-icon svg {
  width: 26px;
  height: 26px;
}

.nn-quick-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.3px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nn-quick-item:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 10px 22px -6px rgba(30, 58, 95, 0.14);
  background: #ffffff;
}

.nn-quick-item:hover .nn-quick-icon {
  background: #1e3a5f;
  color: #ffffff;
  transform: scale(1.05);
}

.nn-quick-item:hover .nn-quick-label {
  color: #1e3a5f;
}

@media (max-width: 991.98px) {
  .nn-quick-bar {
    padding: 16px 0;
  }
  .nn-quick-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .nn-quick-item {
    padding: 12px 6px;
  }
}

@media (max-width: 480px) {
  .nn-quick-icon {
    width: 40px;
    height: 40px;
  }
  .nn-quick-icon svg {
    width: 22px;
    height: 22px;
  }
  .nn-quick-label {
    font-size: 12px;
  }
}

/* ------------------------------------------------------------
   2. 메인 바디 & 위젯 레이아웃 (nonamechurch 스타일 2열)
   ------------------------------------------------------------ */
.nn-home-body {
  padding: 44px 0 68px;
  background: #ffffff;
}

.nn-widget-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  margin-bottom: 52px;
}

.nn-widget-row--full {
  display: block;
  margin-bottom: 52px;
}

@media (max-width: 991.98px) {
  .nn-widget-row {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-bottom: 36px;
  }
}

/* 위젯 박스 공통 */
.nn-widget {
  display: flex;
  flex-direction: column;
}

.nn-widget__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.nn-widget__title {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.4px;
}

.nn-title-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
  color: #fde047;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(30, 58, 95, 0.18);
  flex-shrink: 0;
}

.nn-widget__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.nn-widget__title a:hover {
  color: #1e3a5f;
}

.nn-widget__more {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 18px;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

.nn-widget__more:hover {
  background: #1e3a5f;
  border-color: #1e3a5f;
  color: #ffffff;
  transform: rotate(90deg);
}

/* 구분선 (네이비 + 골드 투톤 포인트 바) */
.nn-widget-hr {
  position: relative;
  height: 1px;
  background: #e2e8f0;
  border: none;
  margin: 0 0 20px;
}

.nn-widget-hr::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  height: 2.5px;
  width: 64px;
  background: linear-gradient(90deg, #1e3a5f 0%, #b48a4e 100%);
  border-radius: 2px;
}

/* ------------------------------------------------------------
   3. 썸네일 그리드 위젯 (설교영상, 사진앨범 2x2)
   ------------------------------------------------------------ */
.nn-thumb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 575.98px) {
  .nn-thumb-grid {
    gap: 12px;
  }
}

.nn-thumb-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.nn-thumb-box {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  background: #0f2544;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.nn-thumb-card:hover .nn-thumb-box {
  box-shadow: 0 10px 24px -6px rgba(15, 23, 42, 0.16);
}

.nn-thumb-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nn-thumb-card:hover .nn-thumb-box img {
  transform: scale(1.05);
}

/* 플레이 아이콘 오버레이 */
.nn-thumb-play {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.nn-thumb-play i {
  font-size: 2.4rem;
  color: rgba(255, 255, 255, 0.96);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.nn-thumb-card:hover .nn-thumb-play {
  opacity: 1;
}

/* 부서 구분 뱃지 (다음세대 등) */
.nn-thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(15, 37, 68, 0.88);
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 2;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(253, 224, 71, 0.25);
}

/* 카드 텍스트 */
.nn-thumb-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
  margin-top: 10px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.nn-thumb-card:hover .nn-thumb-title {
  color: #1e3a5f;
}

.nn-thumb-meta {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
}

/* ------------------------------------------------------------
   4. 목록형 위젯 (교회소식, 공지사항)
   ------------------------------------------------------------ */
.nn-list-widget {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nn-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14.5px;
  gap: 12px;
  transition: background-color 0.15s;
}

.nn-list-item:hover {
  background: #f8fafc;
}

.nn-list-item a {
  flex: 1;
  color: #334155;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}

.nn-list-item:hover a {
  color: var(--primary-color);
  font-weight: 600;
}

.nn-list-item .date {
  font-size: 12.5px;
  color: #94a3b8;
  white-space: nowrap;
}

.nn-badge-pinned {
  display: inline-block;
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 6px;
}

.nn-badge-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  margin-left: 6px;
  line-height: 1;
  vertical-align: middle;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.4);
  flex-shrink: 0;
}

/* 데이터 없음 안내 */
.nn-no-data {
  padding: 30px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

/* ------------------------------------------------------------
   5. 글로리아 찬양대 가로 4열 위젯
   ------------------------------------------------------------ */
.nn-gloria-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 991.98px) {
  .nn-gloria-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

/* ------------------------------------------------------------
   6. 예배 안내 카드 위젯 (Worship Grid)
   ------------------------------------------------------------ */
.nn-worship-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nn-worship-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #1e3a5f;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nn-worship-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  border-left-color: #b48a4e;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transform: translateX(4px);
}

.nn-worship-item__name {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 11px;
}

.nn-worship-item__name i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e8eef5;
  color: #1e3a5f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background-color 0.2s, color 0.2s;
}

.nn-worship-item:hover .nn-worship-item__name i {
  background: #1e3a5f;
  color: #fde047;
}

.nn-worship-item__time {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ------------------------------------------------------------
   7. 오시는 길 (지도 및 정보) 위젯
   ------------------------------------------------------------ */
.nn-map-box {
  width: 100%;
  height: 200px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-bottom: 12px;
}

.nn-map-box iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.nn-map-info {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

.nn-map-info p {
  margin: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.nn-map-info i {
  color: var(--primary-color);
  margin-top: 3px;
}

.nn-map-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.nn-btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.nn-btn-chip:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(44, 62, 80, 0.15);
}

.nn-btn-chip i {
  font-size: 12px;
}

/* ------------------------------------------------------------
   8. 교회소식 팝업 모달 (기존 기능 온전히 유지)
   ------------------------------------------------------------ */
.custom-modal {
  position: fixed;
  top: 100px;
  left: 50px;
  z-index: 99999;
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .custom-modal {
    top: 20px !important;
    left: 20px !important;
    transform: none !important;
    width: calc(100% - 40px);
    max-width: 350px;
  }
}

.custom-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-modal-header {
  padding: 15px 20px;
  background: var(--primary-color, #2c3e50);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: grab;
}

.custom-modal-header:active {
  cursor: grabbing;
}

.custom-modal-header h5 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.custom-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  padding: 0;
}

.custom-modal-close:hover {
  color: #fff;
}

.custom-modal-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 60vh;
  background: #fff;
}

.custom-modal-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.custom-slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.custom-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 0 5px;
}

.slider-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e0;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.slider-dot.active {
  background: var(--primary-color, #2c3e50);
  transform: scale(1.3);
}

.slide-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 15px;
  color: #1a202c;
  text-align: center;
}

.slide-img {
  max-width: 100%;
  max-height: 250px;
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: contain;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.slide-content {
  color: #4a5568;
  line-height: 1.6;
  font-size: 14px;
}

.slide-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
