/* gallery.css: shared by product-render, interior-render, 3d-model (nav/footer live in ../site.css) */

/*標題區*/
  .text-section {
    height: 400px;
    background:
      radial-gradient(circle at 20% 30%, rgb(255, 56, 255) 0%, transparent 100%),
      radial-gradient(circle at 80% 20%, rgb(255, 153, 0) 0%, transparent 100%),
      radial-gradient(circle at 50% 75%, rgb(57, 149, 255) 0%, transparent 100%);
    background-blend-mode: screen;
    background-color: #ff0077;   /* 底色，你可以改 */
    padding: 40px 20px;           /* 控制上下左右區塊間距 */
    text-align: center;           /* 文字置中 */
    font-family: "微軟正黑體", Arial, sans-serif; /* 可自訂字體 */
    color: rgb(255, 255, 255);
    margin-top: 110px;
    margin-bottom: -240px;

    /* 底部漸層透明遮罩 */
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  }

  .section-title {
    font-size: 2rem;          /* 標題字體大小 */
    line-height: 1.3;         /* 標題行高 */
    margin: 40px 0 16px 0;    /* 標題底部間隔，控制標題與內文間距 */
    font-weight: 700;         /* 粗體 */
  }

  .section-content {
    font-size: 1.1rem;        /* 內文字體大小 */
    line-height: 1.6;         /* 內文行高 */
    margin: 0;                /* 內文外邊距清零 */
    max-width: 600px;         /* 可限制內文寬度 */
    margin-left: auto;
    margin-right: auto;       /* 讓內文寬度置中 */
  }
/*標題區結束*/

/*圖片區*/
:root {
  --gap: 16px;            /* 圖片之間的間距 */
  --side-padding: 120px;   /* 與頁面左右邊的距離 */
}

body {
  margin: 0;
  font-family: sans-serif;
}

.image-section {
  margin-top: 120px;
  padding: 20px var(--side-padding);
  margin-bottom: 120px;
}

.image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  justify-content: flex-start;
}

.image-item {
  position: relative;
  flex: 1 1 calc((100% - 3 * var(--gap)) / 3);
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.image-item:hover img {
  transform: scale(1.05);
}

/* 影片作品（vt-room）與圖片同樣的放大效果 */
.image-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
  pointer-events: none;
  transition: transform 0.3s ease;
}

.image-item:hover video {
  transform: scale(1.05);
}

/* 放大檢視：原生 <dialog class="lightbox">，外觀與舊版 .modal 相同 */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center; /* 水平置中 */
  align-items: center;     /* 垂直置中 */
  padding: 20px;           /* 保險起見留點邊距 */
  box-sizing: border-box;
  overflow: hidden;
}

.lightbox[open] {
  display: flex;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox-image,
.lightbox-video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  margin-right: 0px;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 32px;
  line-height: 1.5;
  color: white;
  cursor: pointer;
}

.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* 手機板：螢幕寬度小於等於 768px 時 */
@media (max-width: 768px) {
  .image-item {
    flex: 1 1 100%;
  }
  .lightbox-image {
    margin-right: 15px;
  }
    :root {
    --side-padding: 10px;  /* 手機板左右邊距 */
  }
}
