/* GHM event calendar v2 — scoped from main section2 */
/* ==============================
   section2 — 광화문광장 행사
============================== */
h2.sub-tit {
    padding: 50px 250px 30px 250px;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 {
  width: 100%;
  padding: 40px 20px 80px 20px;
  background: #f8f8f8;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .main-festival {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
  position: relative;
}

/* 헤더 */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-header h2 {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -1px;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-header h2 span {
  font-weight: 700;
  font-size: inherit;
}


/* wrap */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-wrap {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* 캘린더 */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-calendar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 20px 40px;
  min-height: 120px;
  gap: 20px;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-info {
  padding-right: 40px;
  text-align: center;
  letter-spacing: -1px;
  border-right: 1px solid #ddd;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-year {
  font-size: 20px;
  font-weight: 500;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-month {
  font-size: 32px;
  font-weight: 700;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-slider {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

/* 퍼블 style.css 44–50행과 동일: button UA 테두리·배경 제거.
   사이트 reset.css는 button에 border:none이 없어, main만 날짜 칸이 박스처럼 보일 수 있음. */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-slider .festival-arrow,
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-list button.festival-btn {
  background: none;
  border: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-arrow {
  position: relative;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-arrow:hover img {
  filter: brightness(0) invert(1);
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: rgba(0, 53, 87, 0.35);
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: none;
  z-index: -1;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-arrow:hover::before {
  display: block;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-arrow:hover .calendar-arrow-icon path {
  stroke: #003557;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-arrow:first-of-type {
  margin-right: 20px;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-arrow:last-of-type {
  margin-left: 20px;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-next-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 20px;
  z-index: 100;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-today {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background-color: #003557d9;
  border-radius: 10px;
  cursor: pointer;
  padding: 10px 15px;
  white-space: nowrap;
  transition: background-color 0.3s;
  border: none;
  order: 1;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-today:hover {
  background-color: #003557;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-next-wrap .festival-arrow {
  margin-left: 0 !important;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-viewport {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-list {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  gap: 20px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  padding-left: 10px;
}

/* 월말 등 표시 일수가 14 미만일 때 빈 공간 없이 뷰포트 폭 채움 (main.css 동일 의도) */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-list li {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn {
  width: 100%;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn__month {
  display: block;
  min-height: 16px;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  color: #003557;
  letter-spacing: 0;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn b {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 20px;
  font-weight: 400;
  border-radius: 50%;
  transition: 0.2s;
  position: relative;
  z-index: 1;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn__day {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  color: #666;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn.sat {
  color: #3b82f6;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn.sat .festival-btn__day {
  color: #3b82f6;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn.sun {
  color: #ef4444;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn.sun .festival-btn__day {
  color: #ef4444;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn.active b {
  background: #003557;
  color: #fff;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-btn.active .festival-btn__day {
  color: #003557;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-list button.festival-btn:focus {
  outline: none;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-list button.festival-btn:focus-visible {
  outline: 2px solid #003557;
  outline-offset: 3px;
  border-radius: 8px;
}

/* 탭 */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card-wrap .more {
  position: static;
  color: #333;
  padding-bottom: 8px;
  text-decoration: none;
  font-weight: 500;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0 0 0;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-tab-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #efefef;
  color: #333;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-tab-btn.active {
  background: #003557;
  color: #fff;
}

/* Swiper 컨테이너 */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-swiper-container {
  position: relative;
  overflow: visible;
  width: 100%;
}
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-swiper.is-ready {
  visibility: visible;
  animation: festivalFadeIn 0.3s ease;
}

@keyframes festivalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-tab-empty {
  display: none;
  box-sizing: border-box;
  width: 100%;
  min-height: 380px;
  margin: 0;
  padding: 24px 16px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #666;
  font-size: 18px;
  line-height: 1.5;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-tab-empty p {
  margin: 0;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-swiper-container.is-tab-empty .festival-tab-empty {
  display: flex;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-swiper-container.is-tab-empty .swiper {
  visibility: hidden;
  overflow: hidden;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-swiper-container.is-tab-empty .festival-card-arrow {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-swiper {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  visibility: hidden;
}

/* 카드 — 슬라이드 너비는 Swiper slidesPerView가 계산 (고정 width 시 4장보다 많이 보이는 현상 방지) */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card {
  display: block;
  position: relative;
  height: auto;
  aspect-ratio: 285 / 380;
  border-radius: 12px;
  width: 100%;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  transition: 0.3s;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card .festival-card-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 53, 87, 0.8);
  color: #fff;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  opacity: 0;
  transition: 0.3s;
  pointer-events: none;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card:hover .festival-card-hover {
  opacity: 1;
}

/* sub-contents h3::before 붉은 점 미적용 (layout.css/sub.css 전역) */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card .festival-card-hover h3 {
  font-size: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  position: static;
  padding-left: 0;
  margin-bottom: 0;
  font-weight: 500;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card .festival-card-hover h3::before {
  content: none;
  display: none;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card .festival-card-hover .date {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 18px;
  opacity: 0.8;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card .festival-card-hover .desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  word-break: break-all;
  overflow: hidden;
  line-height: 1.3;
  max-height: 2.8em;
  font-size: 18px;
  position: absolute;
  bottom: 70px;
  left: 24px;
  right: 24px;
}

/* 뱃지 */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card .festival-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 16px;
  transition: 0.3s;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card:hover .festival-badge {
  background: #fff;
  color: #0b3d59;
}

/* 카드 화살표 */
.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 50%;
  z-index: 1000;
  cursor: pointer;
  border: none !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #333;
  transition: 0.3s;
  pointer-events: auto;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card-arrow:hover {
  background: #003557;
  color: #fff;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card-arrow.left {
  left: -60px;
}

.ghm-event-calendar-v2 #ghm-cal-main-section2 .festival-card-arrow.right {
  right: -60px;
}

/* --- 선택일 기준 행사 그리드 + 빈 상태 --- */
.ghm-event-calendar-v2 .ghm-cal-schedule-mount {
  width: 100%;
}

.ghm-event-calendar-v2 .ghm-cal-v2-empty {
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border-radius: 12px;
  margin-top: 16px;
  border: 1px solid #eee;
  box-sizing: border-box;
}

.ghm-event-calendar-v2 .ghm-cal-v2-empty p {
  color: #666;
  margin-bottom: 16px;
  font-size: 18px;
}

.ghm-event-calendar-v2 .ghm-cal-v2-empty a {
  display: inline-block;
  padding: 10px 20px;
  background: #003557;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 16px;
}

/* 행사 전체보기 — calendar: 광화문광장 행사(#ghm-cal-main-section2)와 분리된 흰 배경 섹션 */
.ghm-event-calendar-v2 .ghm-cal-event-full-section {
  width: 100%;
  background: #fff;
  padding: 80px 0;
  box-sizing: border-box;
}

.ghm-event-calendar-v2 .ghm-cal-event-full-inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

/* 퍼블 festival_detail.html — section#event-list (행사 전체보기) */
.ghm-event-calendar-v2 #event-list.ghm-evlist {
  margin-top: 0;
  padding-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.ghm-event-calendar-v2 #event-list .ghm-evlist__title {
  text-align: center;
  font-size: 3.125rem;;
  font-weight: 700;
  margin: 0 0 50px;
  letter-spacing: -0.02em;
}

/* 상단 건수·탭: event/list.jsp와 동일 .board-top (sub.css) */

.ghm-event-calendar-v2 #event-list .ghm-evlist__paging {
  margin-top: 40px;
}

.ghm-event-calendar-v2 #event-list .list-pagination {
  margin-bottom: 0;
}

/* 행사 전체보기 — 포스터 카드 그리드 (스크린샷: 4열, 뱃지, 제목·기간 중앙) */
.ghm-event-calendar-v2 #event-list .event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-content: start;
}

.ghm-event-calendar-v2 #event-list .event-list__empty {
  text-align: center;
  padding: 32px 16px;
  color: #666;
  margin: 0;
}

.ghm-event-calendar-v2 #event-list .event-list__item {
  min-width: 0;
}

.ghm-event-calendar-v2 #event-list .event-list__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.ghm-event-calendar-v2 #event-list .event-list__link:hover {
  transform: translateY(-4px);
  border-color: #d0d0d0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.ghm-event-calendar-v2 #event-list .event-list__thumb-wrap {
  position: relative;
  width: 100%;
  background: #f2f2f2;
}

.ghm-event-calendar-v2 #event-list .event-list__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f2f2f2;
}

.ghm-event-calendar-v2 #event-list .event-list__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.ghm-event-calendar-v2 #event-list .event-list__badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: rgba(55, 55, 55, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.ghm-event-calendar-v2 #event-list .event-list__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px 12px 18px;
  text-align: center;
}

.ghm-event-calendar-v2 #event-list .event-list__title {
  margin: 0;
  width: 100%;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #111;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: keep-all;
}

.ghm-event-calendar-v2 #event-list .event-list__period {
  display: block;
  width: 100%;
  font-size: 18px;
  font-weight: 400;
  color: #888;
  line-height: 1.4;
}

@media (max-width: 1024px) {
  .ghm-event-calendar-v2 #event-list .event-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .ghm-event-calendar-v2 #event-list .event-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}
@media (max-width: 480px) {
  .ghm-event-calendar-v2 #event-list .event-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .ghm-event-calendar-v2 #event-list .ghm-evlist__title {
    font-size: 28px;
  }

  .ghm-event-calendar-v2 #event-list .event-list__title {
    font-size: 18px;
  }

  .ghm-event-calendar-v2 #event-list .event-list__period {
    font-size: 16px;
  }

  .ghm-event-calendar-v2 #event-list .event-list__body {
    padding: 12px 10px 16px;
  }
}
