/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */
/* --- Reset Height for Full Viewport Coverage --- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* --- Preview Box Section --- */
.preview-box {
  text-align: center;
  max-width: 1024px;
  width: 100%;
  margin: auto;
  position: relative;
  aspect-ratio: 9 / 5;
}

.preview-box .preview-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  display: block;
}

.preview-box .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 2;
}

.preview-box .demo-icon {
  width: 500px;
  height: auto;
  max-width: 90%;
  margin-bottom: 10px;
}

.preview-box .btn-demo,
.preview-box .btn-real {
  padding: 12px 24px;
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  z-index: 3;
}

.preview-box .btn-demo {
  background-color: #FFC107;
  color: #000;
  margin-bottom: 12px;
}

.preview-box .btn-real {
  background: none;
  color: #fff;
  text-decoration: none;
}

/* --- Modal Overlay --- */
.modal-wrap {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(2px); /* 可選，視覺加強用 */
  z-index: 9999;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

.modal-wrap.show {
  display: flex;
}

.modal-inner {
  background: #000;
  border-radius: 12px;
  width: 90%;
  max-width: 414px;
  padding: 0;
  margin: auto;
  position: relative;
}

/* --- Close Button --- */
.modal-close-fixed {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 24px;
  color: #fff;
  background: none;
  border: none;
  z-index: 10000;
  cursor: pointer;
  line-height: 1;
}

/* --- Responsive Iframe --- */
.responsive-iframe-container {
  position: relative;
  width: 100%;
  padding-top: 177.78%; /* aspect ratio */
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.responsive-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Responsive Media Queries --- */
@media (min-width: 768px) {
  .preview-box .demo-icon {
    width: 500px;
    height: auto;
    margin-bottom: 20px;
  }

  .modal-inner {
    max-width: 414px;
  }
}

@media (max-width: 767px) {
  .preview-box {
    padding: 0 12px;
    height: 400px;
    max-height: 400px;
    width: 100%;
    aspect-ratio: auto;
  }

  .preview-box .preview-cover {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  .preview-box .overlay {
    flex-direction: column;
  }

  .preview-box .demo-icon {
    width: 360px;
    height: auto;
  }

  .modal-inner {
    width: 95%;
    max-width: 95%;
  }
}
