@import url("../common.css");

/* ================================
  Variables（共通CSSからimport）
================================ */

/* ================================
   Global
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--panel-mountain);
  color: var(--text);
}

img,
iframe,
table {
  max-width: 100%;
}

/* ================================
   Utility Classes
================================ */
.hidden {
  display: none;
}

/* ================================
   Layout
================================ */
.split {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.left {
  width: 50%;
  flex: 0 0 50%;
  position: relative;
  background: #000;
}

.left .bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.left-overlay {
  position: absolute;
  inset: 0;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  color: var(--white);
}

.left-overlay h1,
.left-overlay p,
.left-overlay span,
.left-overlay div {
  color: inherit;
}

.right {
  flex: 1;
  background: var(--panel-mountain);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 16px 40px;
}

/* ================================
   Left Panel
================================ */

.left-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: auto;
}

.left-title {
  padding-bottom: 5px;
}

.left-title h1 {
  margin: 0;
  padding: 0;
  white-space: nowrap;
  letter-spacing: 0.1em;
  border-bottom: 2px solid var(--white);
  padding-bottom: 5px;
  width: fit-content;
  font-size: clamp(32px, 6vw, 60px);
}

.left-title p {
  font-size: clamp(14px, 2vw, 20px);
}

.event-date {
  text-align: right;
  white-space: nowrap;
  font-weight: bold;
  font-size: clamp(18px, 4vw, 36px);
  line-height: 1;
}

/* ================================
   Catch Copy
================================ */
.catch-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  pointer-events: auto;
  letter-spacing: 0.8em;
}

.catch-wrap > span {
  position: relative;
  display: inline-block;
  font-family: "Shippori Mincho", YuMincho, "Yu Mincho", serif;
  font-weight: 700;
  color: var(--white);
  font-size: clamp(28px, 6vw, 48px);
  line-height: 1;
}

.catch-wrap > span::after {
  content: "";
  position: absolute;
  bottom: -8px;
  height: 3px;
  background: var(--white);
}

.catch-1::after {
  left: -50px;
  right: -20%;
}

.catch-2 {
  margin-left: var(--catch-offset);
}

.catch-2::after {
  left: calc(-1 * (var(--catch-offset) + var(--catch-left-bleed)));
  right: calc(-0.5 * var(--catch-2-right-extend));
}

/* ================================
   Header
================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg-mountain);
  padding: 10px 20px;
  gap: 10px;
  border-bottom: 1px solid rgb(0 0 0 / 10%);
}

.header-inner {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
}

.header-inner a:not(.btn-reserve-header),
.header-inner span,
.header-inner div {
  color: inherit;
}

.header-title {
  font-weight: 600;
  white-space: nowrap;
  font-size: clamp(10px, 2.2vw, 18px);
  text-align: center;
  letter-spacing: 1px;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.logo-img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-reserve-header {
  border: 1px solid #333;
  color: var(--text);
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 22px;
  text-decoration: none;
  font-weight: bold;
  background: var(--white);
  transition: 0.2s;
  white-space: nowrap;
  flex: 0 0 auto;
}

.btn-reserve-header:hover {
  background: #eee;
}

.menu-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: 2px solid var(--white);
  padding: 0;
  font: inherit;
  color: var(--text);
  background: var(--header-bg-mountain);
  transition: 0.2s;
}

.menu-toggle::before {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  box-shadow:
    0 7px 0 var(--white),
    0 -7px 0 var(--white);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.menu-toggle:hover {
  background: var(--text);
  border: 2px solid var(--text);
}

/* ================================
   Menu Modal Content
================================ */
.title-container {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 20px 0 30px;
}

/* タイトル */
.title {
  font-size: 28px;
  letter-spacing: 0.2em;
  margin: 0;
  padding: 0;
}

.title-line {
  border-top: 2px solid var(--text);
  width: 100%;
}

.menu-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  text-align: center;
  font-size: 18px;
  padding: 32px 20px;
  gap: 20px;
  background: var(--white);
}

.wrapper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.menu-link {
  text-decoration: none;
  color: var(--text);
  font-weight: bold;
  transition: color 0.2s;
}

.menu-link:hover {
  color: var(--accent-blue);
}

.menu-link:focus:not(:focus-visible) {
  outline: none;
}

.menu-link:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.menu-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 40px;
  max-width: min(520px, 100%);
  box-sizing: border-box;
}

.menu-btn {
  width: 100%;
  font-size: 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: bold;
  color: var(--text);
  transition: color 0.2s;
}

.menu-btn:hover {
  color: var(--accent-blue);
}

.menu-kawa {
  grid-column: span 2;
  display: block;
  text-decoration: none;
  width: 100%;
  border: none;
  font-weight: bold;
  color: var(--text);
  padding: 6px 0;
  text-align: center;
}

.menu-kawa:hover {
  color: var(--accent-blue);
}

/* ================================
   Main Content
================================ */
.main-image {
  width: 100%;
  border-radius: 8px;
  padding-bottom: 6px;
}

.main-image img {
  border-radius: 8px;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.sub-images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}

.sub-image {
  width: 100%;
  border-radius: 8px;
  display: block;
  height: auto;
}

/* ================================
   Info Cards
================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--card);
  color: var(--text-dark);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
}

.info-card-title {
  margin: 0;
  padding: 0;
  display: flex;
  font-size: 16px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid rgb(0 0 0 / 10%);
}

.info-card-title-lg {
  margin: 0;
  padding: 0;
  font-size: 18px;
  border-bottom: 1px solid rgb(0 0 0 / 10%);
}

.info-card-content {
  font-size: 14px;
  line-height: 2;
}

.section-label {
  font-size: 16px;
  display: block;
  padding-top: 10px;
}

.time-list {
  letter-spacing: 0.05em;
  line-height: 2;
  padding-bottom: 18px;
}

.ticket-section {
  border-top: 1px dashed #ccc;
  padding-top: 18px;
}

.ticket-label {
  font-size: 16px;
  display: block;
}

.ticket-info {
  padding-left: 5px;
  line-height: 2;
}

.price-highlight {
  color: #d9534f;
  font-weight: bold;
}

.access-info {
  font-size: 14px;
  line-height: 2;
  padding: 10px 0 18px;
}

.access-name {
  font-size: 16px;
}

.map-container {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
  height: 140px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ================================
   Section Title
================================ */
.section-title {
  text-align: center;
  font-size: 22px;
  margin: 0;
}

/* ================================
   Location Box
================================ */
.location-box {
  background: var(--white);
  color: var(--text-dark);
  padding: 32px 24px;
  border-radius: 12px;
  text-align: center;
  line-height: 2;
  box-shadow: 0 5px 20px rgb(0 0 0 / 5%);
}

.location-lead {
  font-size: 22px;
  font-weight: bold;
  color: var(--dark);
  margin: 0;
  padding: 0;
}

.location-text {
  font-size: 14px;
  font-weight: bold;
}

.location-text strong {
  color: var(--dark);
  font-weight: bold;
  border-bottom: 1px solid var(--dark);
}

/* ================================
   Guide Grid
================================ */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  border-radius: 8px;
  overflow: hidden;

  /* Semantic list reset */
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-grid > li {
  display: contents;
}

.grid-card {
  position: relative;
  height: clamp(80px, 25vw, 140px);
  overflow: hidden;
  cursor: pointer;
  background: var(--dark);

  /* Button/Link reset */
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  appearance: none;
}

.grid-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: bottom;
}

/* 個別の角丸指定を削除 */
.grid-card .overlay {
  position: absolute;
  inset: 0;
  background: rgb(58 55 55 / 62.3%);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--white);
  text-align: center;
  transition: 0.2s;
}

.grid-card .overlay b {
  font-size: clamp(10px, 2.8vw, 16px);
  word-break: break-all;
}

.grid-card:hover {
  filter: brightness(1);
}

.grid-card:hover .overlay {
  background: #30a032bd;
}

/* ================================
   Modal
================================ */
#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 80%);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

#modal-window {
  background: var(--white);
  color: #333;
  width: 90%;
  max-width: 600px;
  height: 80vh;
  border-radius: 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  color: var(--text);
  z-index: 10;
  border: none;
  background: transparent;
  padding: 0;
}

.close-btn:focus:not(:focus-visible) {
  outline: none;
}

.close-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

#modal-content-area {
  display: none;
  padding: 20px 30px;
  overflow-y: auto;
  flex: 1;
  background: var(--modal-bg);
}

#modal-content-area.is-image {
  padding: 0 !important;
  background: var(--modal-bg);
}

.modal-footer {
  text-align: center;
  padding: 15px;
  border-top: 1px solid #eee;
  background: var(--white);
  display: flex;
  justify-content: center;
  gap: 10px;
}

.modal-btn-back {
  display: none;
  background: #999;
  color: var(--white);
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}

.modal-btn-close {
  background: var(--dark);
  color: var(--white);
  border: none;
  padding: 8px 30px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}

/* ================================
   Reserve Modal
================================ */
#reserve-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.modal-title {
  color: var(--text);
  border-bottom: 2px solid var(--text);
  padding-bottom: 10px;
  text-align: center;
  font-size: 20px;
  display: inline-block;
}

.reserve-description {
  text-align: center;
  font-size: 14px;
  color: #666;
  width: 100%;
}

.modal-btn-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding-bottom: 20px;
}

.btn-reserve-modal {
  display: block;
  width: 90%;
  max-width: 320px;
  border: 1px solid var(--dark);
  padding: 15px;
  text-decoration: none;
  border-radius: 30px;
  font-size: 16px;
  color: var(--dark);
  font-weight: bold;
  background: var(--white);
  text-align: center;
  transition: 0.3s;
  cursor: pointer;
}

.btn-reserve-modal:hover {
  background: var(--dark);
  color: var(--white);
  border-color: var(--dark);
}

.footer {
  display: flex;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.back-to-top {
  display: none;
}

/* ================================
   Responsive (900px以下)
================================ */
@media (width <= 900px) {
  .split {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .left {
    width: 100%;
    flex: none;
    height: clamp(320px, 55vh, 520px);
  }

  .right {
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .left-title h1 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .catch-wrap > span {
    font-size: clamp(22px, 7vw, 34px);
  }

  .section-title {
    font-size: 20px;
  }

  .location-lead {
    font-size: 1.1rem;
  }

  .location-box {
    padding: 35px 20px;
  }

  .sub-images-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  /* メニュータイトル */
  .title-container .title {
    font-size: 22px;
  }

  /* メニューリンク（開催概要 / ロケーション / ご利用案内） */
  .menu-list {
    font-size: 14px;
    padding: 20px 12px;
    gap: 14px;
  }

  /* グリッド内のボタン */
  .menu-btn {
    font-size: 14px;
  }

  /* グリッドの間隔を詰める */
  .menu-grid {
    gap: 12px 20px;
  }

  /* menu-grid-item の上余白 */
  .menu-grid-item {
    padding-top: 14px;
  }

  .btn-reserve-modal {
    font-size: 13px;
    padding: 10px 5px;
    margin-bottom: 8px;
  }

  .guide-grid {
    gap: 0;
  }

  .btn-reserve-header {
    padding: 4px 8px;
    font-size: 11px;
  }

  .menu-toggle {
    width: 34px;
    height: 34px;
  }

  .menu-toggle::before {
    width: 16px;
    height: 1.5px;
    box-shadow:
      0 5px 0 var(--white),
      0 -5px 0 var(--white);
  }
}

/* ================================
   Responsive (520px以下)
================================ */
@media (width <= 520px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .title-container .title {
    font-size: 18px;
  }

  .menu-list {
    font-size: 13px;
    padding: 16px 8px;
    gap: 10px;
  }

  .menu-btn {
    font-size: 13px;
  }

  .menu-grid {
    gap: 14px 16px;
  }

  .guide-grid {
    gap: 0;
  }
}
