/*
Theme Name: Sirvid Theme
Author: Yuki
Version: 1.0
*/

/* ==================================================
   Base Reset & Foundation
================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #111;
  background: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ==================================================
   Layout
================================================== */
main {
  max-width: 1200px;
  margin: 0 auto;
  /* padding: 30px 0px; */
}

/* ==================================================
   Header
================================================== */
.site-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid #eaeaea;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 30px;

  display: flex;
  align-items: left;
  justify-content: space-between;
}

.logo a {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.global-nav ul {
  display: flex;
  gap: 28px;
}

.global-nav a {
  font-size: 15px;
  opacity: 0.75;
  transition: opacity .2s ease;
}

.global-nav a:hover {
  opacity: 1;
}

/* ==================================================
   Footer
================================================== */
.site-footer {
  margin-top: 120px;
  padding: 48px 20px;
  background: #fafafa;
  border-top: 1px solid #eaeaea;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-nav ul {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-nav a {
  font-size: 14px;
  opacity: 0.7;
  transition: opacity .2s ease;
}

.footer-nav a:hover {
  opacity: 1;
}

.site-footer p {
  font-size: 13px;
  color: #666;
}

/* ==================================================
   Top Page (front-page.php)
================================================== */
.hero {
  padding: 0px 20px;
  text-align: center;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 16px;
  color: #555;
}

/* section {
  margin-top: 80px;
} */

section h2 {
  font-size: 22px;
  margin-bottom: 24px;
  border-left: 4px solid #111;
  padding-left: 12px;
}

/* ==================================================
   Work List (Cards)
================================================== */
.work-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  /* gap: 20px; */
}

.work-card {
  border: 1px solid #eaeaea;
  /* border-radius: 8px; */
  overflow: hidden;
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
  padding: 8px 12px;
}

/* .work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
} */

.work-thumb {
  aspect-ratio: 1.6 / 1.2;   /* 全カード同じ比率 */
  display: flex;
  align-items: center;
  justify-content: center;
  /* background: #f2f2f2; */
  border-radius: 6px;
  overflow: hidden;
}

.work-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* ← ここが重要 */
}

.work-body {
  padding: 12px 0 0;
}

.work-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;

  display: -webkit-box;
  -webkit-line-clamp: 2;      /* ← 2行で止める */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.work-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 14px;
  color: #666;
}

.work-code,
.work-date {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
}

.work-meta {
  font-size: 12px;
  color: #777;
}

/* ==================================================
   Single Page
================================================== */
.single-work {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
}

.work-info h1 {
  font-size: 24px;
  margin-bottom: 16px;
}

.work-info p {
  margin-bottom: 8px;
}

/* ==================================================
   Buttons
================================================== */
.btn {
  display: inline-block;
  padding: 10px 16px;
  font-size: 14px;
  border: 1px solid #111;
  border-radius: 4px;
  transition: background .2s ease, color .2s ease;
}

.btn:hover {
  background: #111;
  color: #fff;
}

.filter-button {
  text-align: center;
  margin: 30px 0;
}

.btn-filter {
  display: inline-block;
  padding: 12px 28px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: 0.2s ease;
}

.btn-filter:hover {
  background: #333;
  color: #fff;
}

/* ==================================================
   Responsive (Mobile)
================================================== */
@media (max-width: 768px) {

  .header-inner {
    flex-direction: column;
    gap: 12px;
  }

  .global-nav ul {
    gap: 16px;
  }

  .hero {
    padding: 60px 20px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .single-work {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 768px) {

  .main-small {
    text-align: center;
    background-color: #000;
  }

  .main-small img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
  }

}

.video-detail {
    max-width: 900px;
    margin: 0 auto;
}

.main-image img {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
}

.video-meta {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.video-meta li {
    margin-bottom: 6px;
}

.buy-area {
    margin: 30px 0;
}

.buy-button {
    display: block;
    width: 100%;
    text-align: center;

    background: #222;   /* 黒寄りグレー */
    color: #fff;

    padding: 18px 0;
    font-size: 18px;
    font-weight: 600;

    border-radius: 6px;
    text-decoration: none;

    transition: all 0.2s ease;
}

.buy-button:hover {
    background: #333;
}

.sample-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.sample-images img {
    width: 160px;
    border-radius: 6px;
}

.related-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.related-item {
    width: 150px;
}

.related-item img {
    width: 100%;
    border-radius: 6px;
}

.video-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 20px;
    /* border-left: 5px solid #e60012;
    padding-left: 12px; */
}

/* ===============================
   検索ボックス
================================= */

.search-box {
  display: flex;
  /* max-width: 720px; */
  border: 1px solid #000;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.search-box input[type="search"] {
  flex: 1;
  padding: 12px 18px;
  font-size: 12px;
  border: none;
  outline: none;
  background: #f3f3f3;
}

.search-box input::placeholder {
  color: #999;
}

.search-box button {
  width: 50px;
  border: none;
  background: #000;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  transition: 0.2s;
}

.search-box button:hover {
  background: #333;
}

/* ==================================================
   もっと見るボタン
================================================== */

.more-link {
  text-align: center;
  margin: 30px 0 50px;
}

.more-button {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.more-button:hover {
  background: #f5f5f5;
  border-color: #999;
}

/* ==================================================
   ページネーション
================================================== */

.pagination {
  text-align: center;
  margin: 40px 0;
}

.pagination ul {
  display: inline-flex;
  gap: 6px;
  list-style: none;
  padding: 0;
}

.pagination li a,
.pagination li span {
  display: block;
  padding: 6px 12px;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.pagination .current {
  background: #f0f0f0;
  font-weight: bold;
}

/* ==================================================
   ギャラリー
================================================== */

.gallery {
  margin: 20px 0;
}

.gallery-main {
  width: 100%;
  height: 300px;          /* ← 好きな固定高さ */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background: #000;    /* 余白が出たとき用 */
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;    /* 画像を切らずに収める */
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
}

.gallery-thumbs img {
  height: 70px;      /* ← 高さ固定 */
  width: auto;       /* ← 横は自動 */
  flex-shrink: 0;    /* ← 横スクロール時の潰れ防止 */
  object-fit: contain;
  cursor: pointer;
  opacity: 0.7;
  border-radius: 4px;
  transition: 0.2s;
}

.gallery-thumbs img:hover {
  opacity: 1;
}

/* ==================================================
   パンくずリスト
================================================== */

.breadcrumb {
  font-size: 14px;
  margin: 10px 0;
  color: #999;
}

.breadcrumb a {
  color: #666;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}