/* =========================================================
  Venue Page (template-venue.php)
  - main.css 기반 + 최소 추가
========================================================= */

/* breadcrumb */
.venue-breadcrumb {
  margin-bottom: 12px;
}
.venue-breadcrumb a {
  text-decoration: none;
  opacity: .9;
}

/* HERO */
.venue-hero__box {
  position: relative;
  border-radius: var(--radius, 18px);
  overflow: hidden;
  min-height: clamp(260px, 42vw, 520px);
  background: rgba(0,0,0,.06);
}

.venue-hero__media {
  position: absolute;
  inset: 0;
}

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

.venue-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.12), rgba(0,0,0,.72));
}

.venue-hero__meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  max-width: 860px;
}

.venue-hero__meta .section-title,
.venue-hero__meta .section-desc {
  color: #fff;
}

.venue-hero__actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.venue-hero__actions .btn {
  text-decoration: none;
}

/* CONTENT */
.venue-content .card {
  border-radius: var(--radius, 18px);
}

/* 광고 문의 배너 */
.venue-ad__banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

@media (max-width: 720px) {
  .venue-ad__banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 관련 업체 그리드 (region-card 재사용을 venue에서도 살리기) */
.venue-related__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .venue-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .venue-related__grid { grid-template-columns: 1fr; }
}

/* region-card 컴포넌트 (region.css에서 가져온 최소 세트)
   - venue 페이지에서도 관련 업체 카드가 배너형으로 보이게 함
*/
.region-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius, 18px);
  text-decoration: none;
  color: inherit;
  min-height: 180px;
  background: rgba(0,0,0,.06);
}

.region-card__media {
  position: absolute;
  inset: 0;
}

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

.region-card__body {
  position: absolute;
  inset: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.72));
}

.region-card__title {
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 6px;
  color: #fff;
}

.region-card__desc {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  opacity: .9;
  color: #fff;
}

/* =========================================================
  Venue Content Enhancements
  - TOC (first ul), tables, gallery (#gallery + figures)
========================================================= */

/* 1) 목차: 본문 시작 ul을 카드형 TOC로 스타일링 */
.venue-content .readable > ul:first-of-type {
  list-style: none;
  margin: 0 0 26px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.18);
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)),
    radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,.08), transparent 58%);
  display: grid;
  gap: 8px;
}

.venue-content .readable > ul:first-of-type li {
  margin: 0;
}

.venue-content .readable > ul:first-of-type a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: rgba(255,255,255,.92);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.venue-content .readable > ul:first-of-type a:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
  transform: translateX(2px);
}

/* 2) 본문 테이블 */
.venue-content .readable table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0 24px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.03);
}

.venue-content .readable th,
.venue-content .readable td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.venue-content .readable th {
  font-weight: 800;
  color: #fff;
  background: rgba(255,255,255,.08);
}

.venue-content .readable tr:last-child td {
  border-bottom: 0;
}

/* 3) 갤러리: h2#gallery 이후 figure 6개 그리드형 */
.venue-content .readable h2#gallery {
  margin-top: 28px;
}

.venue-content .readable h2#gallery ~ figure {
  display: inline-block;
  vertical-align: top;
  width: calc(33.333% - 10px);
  margin: 0 14px 16px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
}

.venue-content .readable h2#gallery ~ figure:nth-of-type(3n) {
  margin-right: 0;
}

.venue-content .readable h2#gallery ~ figure img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.venue-content .readable h2#gallery ~ figure figcaption {
  margin: 0;
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255,255,255,.82);
}

@media (max-width: 960px) {
  .venue-content .readable h2#gallery ~ figure {
    width: calc(50% - 8px);
    margin-right: 12px;
  }

  .venue-content .readable h2#gallery ~ figure:nth-of-type(3n) {
    margin-right: 12px;
  }

  .venue-content .readable h2#gallery ~ figure:nth-of-type(2n) {
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  .venue-content .readable > ul:first-of-type {
    padding: 14px;
  }

  .venue-content .readable table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .venue-content .readable h2#gallery ~ figure {
    width: 100%;
    margin-right: 0;
  }
}
