/*
Theme Name:Gutz Creative Service
Theme URI: https://gutz.jp
Author: Gutz
Author URI: https://gutz.jp
Description: Wordpress Theme by Gutz
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: Gutz
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/**
1. Normalize
2. Theme Specific CSS
*/

/* 1. Normalize */

/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 */

html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
     ========================================================================== */

/**
   * Remove the margin in all browsers.
   */

body {
  margin: 0;
}

/**
   * Render the `main` element consistently in IE.
   */

main {
  display: block;
}

/**
   * Correct the font size and margin on `h1` elements within `section` and
   * `article` contexts in Chrome, Firefox, and Safari.
   */

h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Grouping content
     ========================================================================== */

/**
   * 1. Add the correct box sizing in Firefox.
   * 2. Show the overflow in Edge and IE.
   */

hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

/**
   * 1. Correct the inheritance and scaling of font size in all browsers.
   * 2. Correct the odd `em` font sizing in all browsers.
   */

pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/* Text-level semantics
     ========================================================================== */

/**
   * Remove the gray background on active links in IE 10.
   */

a {
  background-color: transparent;
}

/**
   * 1. Remove the bottom border in Chrome 57-
   * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
   */

abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

/**
   * Add the correct font weight in Chrome, Edge, and Safari.
   */

b,
strong {
  font-weight: bolder;
}

/**
   * 1. Correct the inheritance and scaling of font size in all browsers.
   * 2. Correct the odd `em` font sizing in all browsers.
   */

code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
   * Add the correct font size in all browsers.
   */

small {
  font-size: 80%;
}

/**
   * Prevent `sub` and `sup` elements from affecting the line height in
   * all browsers.
   */

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Embedded content
     ========================================================================== */

/**
   * Remove the border on images inside links in IE 10.
   */

img {
  border-style: none;
}

/* Forms
     ========================================================================== */

/**
   * 1. Change the font styles in all browsers.
   * 2. Remove the margin in Firefox and Safari.
   */

button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  line-height: 1.15; /* 1 */
  margin: 0; /* 2 */
}

/**
   * Show the overflow in IE.
   * 1. Show the overflow in Edge.
   */

button,
input {
  /* 1 */
  overflow: visible;
}

/**
   * Remove the inheritance of text transform in Edge, Firefox, and IE.
   * 1. Remove the inheritance of text transform in Firefox.
   */

button,
select {
  /* 1 */
  text-transform: none;
}

/**
   * Correct the inability to style clickable types in iOS and Safari.
   */

button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}

/**
   * Remove the inner border and padding in Firefox.
   */

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
   * Restore the focus styles unset by the previous rule.
   */

button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
   * Correct the padding in Firefox.
   */

fieldset {
  padding: 0.35em 0.75em 0.625em;
}

/**
   * 1. Correct the text wrapping in Edge and IE.
   * 2. Correct the color inheritance from `fieldset` elements in IE.
   * 3. Remove the padding so developers are not caught out when they zero out
   *    `fieldset` elements in all browsers.
   */

legend {
  box-sizing: border-box; /* 1 */
  color: inherit; /* 2 */
  display: table; /* 1 */
  max-width: 100%; /* 1 */
  padding: 0; /* 3 */
  white-space: normal; /* 1 */
}

/**
   * Add the correct vertical alignment in Chrome, Firefox, and Opera.
   */

progress {
  vertical-align: baseline;
}

/**
   * Remove the default vertical scrollbar in IE 10+.
   */

textarea {
  overflow: auto;
}

/**
   * 1. Add the correct box sizing in IE 10.
   * 2. Remove the padding in IE 10.
   */

[type="checkbox"],
[type="radio"] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}

/**
   * Correct the cursor style of increment and decrement buttons in Chrome.
   */

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

/**
   * 1. Correct the odd appearance in Chrome and Safari.
   * 2. Correct the outline style in Safari.
   */

[type="search"] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/**
   * Remove the inner padding in Chrome and Safari on macOS.
   */

[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
   * 1. Correct the inability to style clickable types in iOS and Safari.
   * 2. Change font properties to `inherit` in Safari.
   */

::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/* Interactive
     ========================================================================== */

/*
   * Add the correct display in Edge, IE 10+, and Firefox.
   */

details {
  display: block;
}

/*
   * Add the correct display in all browsers.
   */

summary {
  display: list-item;
}

/* Misc
     ========================================================================== */

/**
   * Add the correct display in IE 10+.
   */

template {
  display: none;
}

/**
   * Add the correct display in IE 10.
   */

[hidden] {
  display: none;
}

/* 2. Theme Specific CSS */

html {
  font-size: 62.5%; /* これにより 1rem = 10px */
  line-height: 1.9; /* デフォルト行間（本文の<p>外も揃える） */
}

body {
  font-size: 1.5rem; /* 基本サイズを15px相当に戻す */
}

/* General */

:root {
  /* Measurements */
  --wpdevs-big-padding: 60px 0;
  --wpdevs-mobile-padding: 20px 0;
  --wpdevs-light-padding: 0 25px;
  /* Colors */
  --g-main-black: #222222;
  --g-navigation-blue: #2d457d;
  --g-background-color: #fef8e9;
  --g-nav-eng-text: #b8c0e1;
  --g-nav-text-hover: #f6ee76;
  --g-blue: #304586;
  --g-shadow: #33291a;
  --g-h2-deco-text: #f8e8c3;
  --wpdevs-gray2: #f7f7f7;
  --wpdevs-gray3: #dddddd;
  --wpdevs-light-blue: #2a92d3;
  --wpdevs-deep-blue: #213c4d;
  --wpdevs-black-blue: #001e32;
  --wpdevs-yellow: #cfaf07;
}
*,
::after,
::before {
  box-sizing: border-box;
}
body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--g-main-black);
  padding: 0; /* theme.json / global styles の余白注入を打ち消す */
  line-height: 1.9; /* デフォルト行間 */
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 600;
}
h2 {
  font-size: 2.25rem;
}
h3 {
  font-size: 1.8rem;
  line-height: 1.1;
  font-weight: 500;
}

.service-box h3 {
  margin-top: 7px;
  padding: 2px 20px;
  font-weight: 400;
  color: white;
}

h4 {
  font-size: 18px;
  line-height: 1;
  font-weight: bold;
}

.single-posts h1 {
  font-size: 32px;
  line-height: 1.2;
  font-weight: bold;
}

.single-posts .sub {
  font-size: 20px;
  line-height: 16px;
}

p {
  font-size: 15px;
  line-height: 1.9;
}

.service-description p {
  line-height: 2.2;
  margin-top: -5px;
}

a {
  color: black;
  text-decoration: none;
}
a:hover {
  color: #6d6d6d;
}
img {
  max-width: 100%;
  height: auto;
}

/* Containers */

main {
  min-height: calc(100vh - 212px);
}

.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.nav-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-right: auto;
  margin-left: auto;
}
.container,
.nav-container {
  max-width: 540px;
  padding-right: 15px;
  padding-left: 15px;
}

.post-container {
  display: grid;
  grid-gap: 18px;
}

.post-container-masonry {
  margin: 10px auto;
  width: 100%;
}

/* =========================================
   Page Service List (shortcode: [page_service_list])
   - PC: 2 columns / Mobile: 1 column
   - Transparent PNG (project_main_image) centered as illustration
   ========================================= */
.page-service-list {
  margin: 20px 0px;
}

.page-service-list__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

/* masonry="true" の場合は Masonry を使う（gridは使わない） */
.page-service-list__grid--masonry {
  display: block;
}
.page-service-list__grid--masonry .service-card-wrap {
  width: 100%;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .page-service-list__grid--masonry .service-card-wrap {
    width: calc(50% - 14px);
    margin-bottom: 28px;
  }
}

.service-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0px;
  padding: 10px; /* 余白は均一に揃える */
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: transparent;
}

.service-card__media {
  flex: 0 0 44%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.service-card__img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain; /* 透明PNGの線画を潰さない */
  display: block;
}

.service-card__noimg {
  width: 100%;
  min-height: 180px;
  background: rgba(0, 0, 0, 0.04);
}

.service-card__body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center; /* タイトル/英語小文字を中央寄せ */
}

.service-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}
.service-card__title a {
  color: var(--g-main-black);
  text-decoration: none;
}

.service-card__title .sub {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 0.25em;
}

.service-card__en {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.85;
}

.service-card__btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background-color: #ff7936;
  color: #fff;
  padding: 0 8px;
  font-size: 11px;
  line-height: 20px;
  border-radius: 2px;
  text-decoration: none;
  white-space: nowrap;
}
.service-card__btn:hover {
  color: #dcdddd;
}
@media (min-width: 768px) {
  .page-service-list__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .page-service-list__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .page-service-list {
    margin: 30px 15px;
  }
  .service-card {
    padding: 15px;
    gap: 10px;
  }
  .service-card__title {
    font-size: 18px;
  }
  .service-card__btn {
    right: 15px;
    bottom: 15px;
  }
}

@media (min-width: 576px) {
  .post-container {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 768px) {
  .container,
  .nav-container {
    max-width: 720px;
  }
}
@media (min-width: 992px) {
  .container,
  .nav-container {
    max-width: 960px;
  }
  .post-container {
    grid-template-columns: 1fr 1fr 1fr;
  }
}
@media (min-width: 1200px) {
  .container,
  .nav-container {
    max-width: 1140px;
  }
}

/************** HOME PAGE *****************/

/* Top Bar */
.navigation-bar {
  background: var(--g-navigation-blue);
  padding: 8px 0;
}

/* Opening/Introで header を intro-scene より上に（ロゴoverlayより下） */
header {
  position: relative;
  z-index: 9500;
  line-height: 1.15; /* body/html の行間上書き（メニュー崩れ防止） */
}

.main-logo {
  margin-top: auto;
  margin-bottom: -2px;
}

.main-logo img {
  min-width: 122px;
}

/* Main Menu */
.main-menu {
  margin-top: auto;
  margin-bottom: -8px;
  flex-basis: 100%;
  padding: 0px 20px;
}

.main-menu ul {
  display: flex;
  justify-content: space-evenly;
  margin: 0;
  padding-left: 0;
}
.main-menu ul li {
  display: inline-block;
  text-align: center;
  border-bottom: 9px solid transparent;
}

.main-menu .current_page_item,
.main-menu .current-menu-item,
.main-menu .current-menu-parent,
.main-menu .current-menu-ancestor,
.main-menu .current_page_parent,
.main-menu .current_page_ancestor {
  border-bottom: 5px solid var(--g-nav-text-hover);
  padding-bottom: 4px;
}

.main-menu ul li a {
  display: block;
  font-size: 14px;
  color: white;
  margin: 0px 5px;
  text-decoration: none;
}

.main-menu ul li a:focus + ul {
  display: block;
}

.main-menu span {
  font-size: 11px;
  font-weight: 300;
  color: var(--g-nav-eng-text);
}

/* Sub Menu */

.sub-menu {
  display: flex;
  margin-bottom: -9px;
}

.sub-menu-box {
  display: inline-block;
  margin-top: auto;
  text-align: center;
  padding: 0px 5px;
  border-bottom: 9px solid transparent;
}

#search-icon {
  width: 21px;
}
.sub-menu-box img {
  max-width: unset;
}

#blog-icon {
  width: 30px;
  margin-left: 3px;
}

#contact-icon {
  width: 30px;
}

.sub-menu-box .current {
  display: inline-block;
  border-bottom: 5px solid var(--g-nav-text-hover);
  padding-bottom: 4px;
  margin-bottom: -9px;
}

.nav-sub-texts {
  display: block;
  font-size: 8pt;
  font-weight: 300;
  color: var(--g-nav-eng-text);
}

/* Hamberger */
.menu-icon,
.check-button {
  cursor: pointer;
  display: none;
  z-index: 20;
}

.menu-icon .bar1,
.menu-icon .bar2,
.menu-icon .bar3 {
  width: 28px;
  height: 3px;
  background-color: white;
  margin: 5px 0;
  transition: 0.4s;
}

@media (max-width: 991px) {
  .nav-container {
    flex-wrap: wrap;
  }

  .main-menu {
    order: 3;
    width: 100%;
    height: 39px;
    margin-top: 8px;
  }

  .sub-menu {
    order: 2;
  }

  .sub-menu-box {
    margin-bottom: 8px;
  }
}

@media (max-width: 767px) {
  .main-logo {
    margin-top: 8px;
    margin-bottom: -2px;
  }

  .main-logo img {
    min-width: 100px;
  }
  .main-menu {
    position: absolute;
    left: 0;
    height: 0;
    overflow: hidden;
    margin-top: 63px;
    background: var(--g-navigation-blue);
    transition: all cubic-bezier(0.79, 0.14, 0.15, 0.86) 0.5s;
    z-index: 10;
  }

  .main-menu ul {
    flex-direction: column;
    align-items: center;
    height: calc(100vh - 180px);
  }

  .menu-icon,
  .check-button {
    display: block;
  }

  .check-button {
    border: none;
    background: transparent;
    height: 55px;
  }

  .main-menu ul li {
    border: 0;
    padding: 10px;
  }

  .show-menu {
    height: calc(100vh - 70px);
  }
  .animate-button .bar1 {
    -webkit-transform: rotate(-45deg) translate(-4px, 4px);
    transform: rotate(-45deg) translate(-4px, 4px);
  }
  .animate-button .bar2 {
    opacity: 0;
  }
  .animate-button .bar3 {
    -webkit-transform: rotate(45deg) translate(-7px, -7px);
    transform: rotate(45deg) translate(-7px, -7px);
  }
}

/************** Contents *****************/

#hero {
  overflow: hidden;
  position: relative;
  /* 旧固定値のフォールバック */
  height: calc(100vh - 70px);
  /* header 高さは JS で --intro-safe-top に反映しているのでそれを使う（端末差の5pxズレ対策） */
  height: calc(100dvh - var(--intro-safe-top, 70px));
}
#hero video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Hero end-card background (after video) */
#hero .hero-bg-wrapper {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0; /* GSAPで表示 */
  pointer-events: none;
}
#hero .hero-bg-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center center;
}

/* Hero branding (logo + handwriting) */
#hero .hero-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0; /* GSAPで表示 */
  pointer-events: none;
  padding: 0 30px;
  width: 100%;
  max-width: 980px;
  box-sizing: border-box; /* paddingで横幅がはみ出さないように */
}

#hero .hero-logo {
  opacity: 0; /* GSAPでフェードイン */
}
#hero .hero-logo img {
  width: clamp(380px, 48vw, 620px);
  height: auto;
  display: block;
  filter: drop-shadow(3px 3px 3px var(--g-main-black));
}

#hero .hero-handwriting {
  opacity: 0; /* GSAPで表示 */
  transform: translateY(0);
}
#hero .hero-handwriting svg {
  width: clamp(200px, 28vw, 500px);
  height: auto;
  display: block;
  filter: drop-shadow(3px 3px 3px var(--g-main-black));
}
/* SVG色は白基調に（マスク線も白で描画） */
#hero .hero-handwriting .st1 {
  fill: #ffffff;
}
#hero .hero-handwriting .st0 {
  stroke: #ffffff;
}

.site-content {
  background: var(--g-background-color);
  padding-bottom: 20px;
}

.page-banner {
  position: relative;
  overflow: hidden;
  height: unset;
  margin-bottom: 20px;
  aspect-ratio: 1.5 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 重要：アスペクト比を維持して切り抜く */
  object-position: center;
}
.page-title {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0px;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.h1-banner-jp {
  order: 2;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  margin: 0px 0px 0px 5px;
  filter: drop-shadow(3px 3px 3px var(--g-main-black));
}

.h2-banner-eng {
  order: 1;
  font-size: clamp(3.5rem, 7vw, 5.4rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  filter: drop-shadow(4px 4px 4px var(--g-main-black));
}

/* =========================================
   Section Titles (Archive / Blog / Works)
   ========================================= */

.section-title {
  position: relative;
  height: auto;
  min-height: 91px;
  --section-title-underline: 6px;
  color: var(--g-h2-deco-text);
  margin: 20px 0px;

  /* 背景のデカ文字がはみ出しても横スクロールさせない */
  overflow: hidden;

  /* 垂直方向の中央揃え */
  display: flex;
  align-items: center;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--section-title-underline);
  background: currentColor;
  z-index: 3; /* works-title(2)より上にして線が消えないようにする */
}

.home-blog {
  padding-top: 20px;
}

.home-blog .section-title {
  margin: 0px 0px 20px 0px;
}

/* 前面の日本語タイトル：absolute をやめて高さを確保させる */
.works-title-l,
.works-title-r {
  position: relative;
  top: auto;
  right: auto;
  width: 100%;
  z-index: 2; /* 背景より手前 */
  margin: 0;
  padding: 40px 0 5px 0; /* 上下余白でバランス調整 */
  line-height: 1;
  color: var(--g-main-black); /* 英語背景色に同化しないように固定 */
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.works-title-r {
  text-align: right;
}

/* Archive/Project/Client の「ラベル」（例: プロジェクト名：） */
.works-title-l .title-label {
  display: block;
  width: 100%;
  font-size: 13px;
  margin-bottom: 5px;
  margin-top: -15px;
  line-height: 1;
}

/* タイトル内サブタイトル（投稿タイトルに <span class="sub"> を含める用） */
.section-title .works-title-l .sub,
.section-title .works-title-r .sub {
  display: inline-block;
  /* works-title 内だけで調整できるように変数化（functions.php 側には影響しない） */
  font-size: var(--works-title-sub-size, 1.8rem);
  line-height: 1.2;
  font-weight: 500;
  opacity: 0.85;
}

/* 背景の英語テキスト：画面幅に合わせてサイズ自動調整 */
.deco-text-l,
.deco-text-r {
  position: absolute;
  z-index: 1;
  margin: 0;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Lato", serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(6rem, 14vw, 9.7rem);
  line-height: 1;
  white-space: nowrap;
}

.deco-text-l {
  left: -2px;
  right: auto;
}

.deco-text-r {
  right: -2px;
  left: auto;
}

@media (min-width: 576px) {
  .page-banner {
    aspect-ratio: 2.5 / 1;
  }
}

@media (min-width: 768px) {
  .page-banner {
    aspect-ratio: 3.5 / 1;
  }
  .page-title {
    margin-left: 50px;
  }

  /* PCでは元のデザイン（固定サイズ）に戻す */
  .deco-text-l,
  .deco-text-r {
    font-size: 97px;
    line-height: 0.45;
    bottom: -8px;
    opacity: 1;
  }
}

/* モバイルで deco-text のサイズが小さくなっても下線との間隔が開きすぎないよう調整 */
@media (max-width: 767px) {
  .deco-text-l,
  .deco-text-r {
    top: auto;
    bottom: calc(var(--section-title-underline) * 0.8);
    transform: none;
  }
}

@media (min-width: 1200px) {
  .page-banner {
    height: 350px;
    aspect-ratio: unset;
  }
}

/************** Top Page Service Section *****************/

.service-grid {
  margin-top: 10px;
  width: 100%;
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
  align-items: end;
}

.service-grid a:hover {
  color: black;
}

.service-container {
  width: 100%;
  margin-top: 8px;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
}

.service-container:hover {
  -webkit-transform: translateY(-5px);
  -ms-transform: translateY(-5px);
  transform: translateY(-5px);
}

/* -------------------------------------------
   Service Icons in Header (Inline Style)
------------------------------------------- */

/* タイトルバーの共通設定 */
.service-header {
  display: flex; /* 横並びにする */
  align-items: center; /* 垂直方向の中央揃え */
  padding: 8px 15px; /* バーの内側の余白 */
  min-height: 50px; /* 高さの最低値を確保 */
}

/* 既存のH3スタイルのリセットと調整 */
.service-box h3 {
  margin: 0 !important; /* 既存のマージンを打ち消し */
  padding: 0 !important; /* 既存のパディングを打ち消し */
  padding-left: 10px !important; /* アイコンとの距離 */
  line-height: 1.2;
  text-align: left;
}

/* アイコン共通設定 (色反転・サイズベース) */
.service-header img {
  filter: invert(100%) brightness(200%); /* 黒アイコンを白にする魔法 */
  display: block;
  height: auto;
  margin: 0; /* 余計なマージン削除 */
}

/* 個別アイコンのサイズ調整 (ヘッダー内に収まるサイズ感へ) */

.video-icon {
  width: 26px;
}

.design-icon {
  width: 24px;
  transform: rotate(-70deg); /* 筆の角度調整 */
}

.web-icon {
  width: 25px;
  margin-top: 2px !important;
}

.event-icon {
  width: 23px;
}

.electric-icon {
  width: 24px;
}

.photo-icon {
  width: 25px;
}

.service-box {
  background-color: white;
  border-radius: 20px;
  margin-top: 8px;
  filter: drop-shadow(5px 5px 4px #c3baa8);
}

.service-title-vid {
  background-color: #3c7e5b;
  border-radius: 10px 10px 0px 0px;
}

.service-title-des {
  background-color: #cf363f;
  border-radius: 10px 10px 0px 0px;
}

.service-title-eve {
  background-color: #6d498b;
  border-radius: 10px 10px 0px 0px;
}

.service-title-web {
  background-color: #3e588f;
  border-radius: 10px 10px 0px 0px;
}

.service-title-ele {
  background-color: #6b2621;
  border-radius: 10px 10px 0px 0px;
}

.service-title-oth {
  background-color: #d65767;
  border-radius: 10px 10px 0px 0px;
}

.service-description {
  font-size: 15px;
  padding: 16px 20px 1px 20px;
}

@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 992px) {
  .service-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .service-description {
    font-size: 15px;
    padding: 16px 15px 1px 15px;
  }
}

@media (min-width: 1200px) {
  .service-description {
    font-size: 15px;
    padding: 16px 20px 1px 20px;
  }
}

/************** Profile Section *****************/

.profile-container {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  background-color: white;
  padding: 20px;
}

.profile-photo {
  width: 220px;
  margin: auto;
}

.profile-title-box {
  text-align: center;
}

.profile-title-box h4 {
  margin: 0px;
}

.logo-blue {
  width: 150px;
  margin-top: 10px;
}

.profile-name {
  margin: 0;
}

.profile-name p {
  vertical-align: middle;
  display: inline-block;
  line-height: 0;
}

.profile-sns-icon {
  display: inline-block;
}

.profile-sns-icon img {
  width: 30px;
  margin: 0 2px;
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
}

.profile-sns-icon img:hover {
  -webkit-transform: translateY(-5px);
  -ms-transform: translateY(-5px);
  transform: translateY(-5px);
}

.insta-title-box {
  display: flex;
  gap: 10px;
  align-items: end;
}

.insta-logo {
  width: 30px;
  height: auto;
  margin: 0px 5px 2px 0px;
  z-index: 100;
}

@media (min-width: 576px) {
  .profile-container {
    flex-direction: unset;
  }
  .profile-title-box {
    display: flex;
    flex-direction: column;
    padding: 10px 20px;
    width: 50%;
    align-items: center;
    align-self: center;
  }
  .profile-photo {
    width: 50%;
    margin: unset;
    padding: 10px;
  }
  .logo-blue {
    width: 200px;
  }
  .profile-name p {
    line-height: 1.3;
  }
}

@media (min-width: 768px) {
  .profile-container {
    width: 600px;
  }
  .profile-photo {
    padding-left: 20px;
    padding-right: 10px;
  }
  .profile-title-box {
    padding: 12px 20px 10px 10px;
  }
}

/************** Portfolio Post Loop *****************/

.nav-filter {
  padding-inline-start: 0;
  margin: 10px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  list-style: none;
  line-height: 1.2;
}

.nav-filter li {
  display: inline-flex;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.nav-filter a.scope-btn {
  border: 1px solid #ddd;
  background: #fff;
  height: var(--sf-control-h, 32px);
  width: auto;
  padding: 0 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-filter li.active a.scope-btn,
.nav-filter a.scope-btn:hover,
.nav-filter a.scope-btn:focus-visible {
  background: var(--g-navigation-blue);
  color: #fff;
  border-color: var(--g-navigation-blue);
}

.nav-filter a.scope-btn .countposts {
  font-size: 12px;
  opacity: 0.9;
}

/*
.rsfv-shortcode-wrapper{
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 62%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
/*
}

.post-container iframe{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
  }
*/
.youtube-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.youtube-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* search-page含め常に16:9枠にフィットさせる */
  display: block;
}

.youtube-thumb::after {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: block;
  width: 25%;
  height: 25%;
  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1NzYgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1NzYgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9CiAgLnBhdGgwe2ZpbGw6cmdiYSgwLDAsMCwwLjUpfQo8L3N0eWxlPgoJPHBhdGggY2xhc3M9InBhdGgwIiBkPSJNNTQ5LjcsMTI0LjFjLTYuMy0yMy43LTI0LjgtNDIuMy00OC4zLTQ4LjZDNDU4LjgsNjQsMjg4LDY0LDI4OCw2NFMxMTcuMiw2NCw3NC42LDc1LjVjLTIzLjUsNi4zLTQyLDI0LjktNDguMyw0OC42CgkJQzE0LjksMTY3LDE0LjksMjU2LjQsMTQuOSwyNTYuNHMwLDg5LjQsMTEuNCwxMzIuM2M2LjMsMjMuNiwyNC44LDQxLjUsNDguMyw0Ny44QzExNy4yLDQ0OCwyODgsNDQ4LDI4OCw0NDhzMTcwLjgsMCwyMTMuNC0xMS41CgkJYzIzLjUtNi4zLDQyLTI0LjIsNDguMy00Ny44YzExLjQtNDIuOSwxMS40LTEzMi4zLDExLjQtMTMyLjNTNTYxLjEsMTY2LjksNTQ5LjcsMTI0LjF6Ii8+Cgk8cG9seWxpbmUgY2xhc3M9InN0MCIgcG9pbnRzPSIyMzIuMSwzMzcuNiAyMzIuMSwzMzcuNiAyMzIuMSwxNzUuMiAzNzQuOSwyNTYuNCAyMzIuMSwzMzcuNiAJIi8+Cjwvc3ZnPgo=);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  transform: translate(-50%, -50%);
  content: "";
}

.wp-block-embed,
.wp-block-embed__wrapper {
  max-width: 100%;
}

/* Gutenberg: Embed alignment helpers (frontend) */
.wp-block-embed.aligncenter,
.wp-block-embed.is-style-default.aligncenter {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.wp-block-embed iframe {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.wp-block-embed.alignwide {
  max-width: var(--wp--style--global--wide-size, 100rem);
  margin-left: auto;
  margin-right: auto;
}

.wp-block-embed.alignfull {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Gutenberg: aligncenter helpers (single.php article content)
   - single.php は `.mfp-content` のような補助セレクタが当たらないため、本文側でも中央寄せを効かせる */
.blog-post article .aligncenter,
.blog-post article .has-text-align-center {
  text-align: center;
}
.blog-post article figure.aligncenter,
.blog-post article .wp-block-image.aligncenter,
.blog-post article img.aligncenter,
.blog-post article .aligncenter img {
  margin-left: auto;
  margin-right: auto;
  display: block;
}
.blog-post article figcaption,
.blog-post article .wp-caption {
  text-align: center;
}

/* =========================================
   Empty single content fallback
   ========================================= */
.gutz-empty-single {
  margin: 10px 0 18px;
}

.gutz-empty-single__note {
  margin: 0 0 12px;
  color: var(--g-main-black);
  opacity: 0.85;
}

.gutz-empty-single__embed,
.gutz-empty-single__thumb {
  margin: 14px 0;
}

.gutz-empty-single__embed iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
}

.gutz-empty-single__thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.popup-iframe img {
  width: 100%;
  transition: all 0.2s linear;
}

.popup-iframe:hover .youtube-thumb img {
  transform: scale(1.05);
}

.post-box {
  width: 100%;
}

.post-box-masonry {
  width: 100%;
  margin-bottom: 18px;
}

.post-box .entry-title,
.post-box-masonry .entry-title {
  margin: 8px 0px 0px 0px;
  font-size: 17px;
  text-align: center;
}

.post-thumb {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-thumb .no-image {
  width: 100%;
  min-height: 180px;
  background: #f2f2f2;
}

.popup-image img {
  width: 100%;
  transition: all 0.2s linear;
}

.popup-image:hover .post-thumb img {
  transform: scale(1.03);
}

/* Gallery (Magnific carousel trigger) */
.gallery-popup-link img {
  width: 100%;
  transition: all 0.2s linear;
}
.gallery-popup-link:hover .post-thumb img {
  transform: scale(1.03);
}
.gallery-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 2;
  pointer-events: none;
}

.entry-title .sub {
  font-size: 13px;
  line-height: 1.8;
  display: table;
  margin: 0px auto;
}

.meta-info {
  margin-top: 3px;
}

/* -------------------------------------------
   Portfolio Meta Info Grid Layout
------------------------------------------- */

/* 全体を囲むコンテナ */
.meta-grid {
  display: flex;
  flex-direction: column;
  gap: 2px; /* 行間の隙間 */
  margin-top: 5px;
  margin-bottom: 5px;
}

/* 各行のレイアウト */
.meta-row {
  display: grid;
  /* [ラベル/アイコン] [：] [コンテンツ] */
  grid-template-columns: 22px 10px 1fr;
  align-items: center; /* 垂直方向中央揃え */
  line-height: 1.4;
}

/* 1列目：ラベル・アイコンエリア */
.meta-label {
  display: flex;
  justify-content: center; /* アイコンを中央配置 */
  align-items: center;
  font-size: 11px; /* URLなどのテキストサイズ */
  color: var(--g-main-black);
}

/* アイコン画像のリセット */
.meta-label img {
  margin: 0 !important;
  display: block;
  height: auto;
}

/* 2列目：区切り文字（：） */
.meta-sep {
  text-align: center;
  font-weight: bold;
  font-size: 13px;
  padding-bottom: 2px; /* 位置微調整 */
}

/* 3列目：コンテンツエリア */
.meta-content {
  font-size: 13px;
  padding-left: 2px;
  word-break: break-all; /* 長いURLなどを折り返す */
}

/* meta-content: buttonなど右端に置く時だけ split */
.meta-content--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.meta-content-main {
  min-width: 0; /* flexでの折り返し確保 */
}
.meta-content-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Tooltip trigger: left icon */
.meta-label {
  position: relative; /* tooltipの基準 */
}
.meta-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.meta-trigger:focus-visible {
  outline: 2px solid var(--g-navigation-blue);
  outline-offset: 2px;
  border-radius: 4px;
}
.meta-tooltip {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;

  /* ▼変更点：スマホ（基本）は画面幅を超えないように控えめに */
  min-width: 200px;
  max-width: 280px; /* スマホでははみ出し防止のため少し狭めるか、width: 90vw; なども有効 */

  padding: 10px 12px;
  border: 1px solid #ddd;
  background: #fff;
  color: var(--g-main-black);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  font-size: 12px;
  line-height: 1.5;
  display: none;
}
.meta-tooltip-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-tooltip-item {
  display: grid;
  grid-template-columns: 18px 10px 1fr;
  align-items: center;
  align-items: start;
  gap: 0;
}
.meta-tooltip-label {
  display: flex;
  align-items: center;
  justify-content: center;
}
.meta-tooltip-label img {
  margin: 0 !important;
  display: block;
  height: auto;
}
.meta-tooltip-sep {
  text-align: center;
  font-weight: bold;
  opacity: 0.7;
}
.meta-tooltip-content {
  min-width: 0;
}
.meta-tooltip-content .url-content a {
  font-size: 12px;
}
.meta-label:hover .meta-tooltip,
.meta-label:focus-within .meta-tooltip {
  display: block;
}

/* New taxonomy icons */
.portfolio-icon-location,
.portfolio-icon-service,
.portfolio-icon-stack,
.portfolio-icon-activity {
  width: 18px;
}

/* URLテキストの処理 */
.text-label {
  font-family: "Lato", sans-serif;
  letter-spacing: 0.5px;
}

.url-content a {
  color: var(--g-blue);
  text-decoration: underline;
  font-size: 12px;
}

/* --- アイコン個別のサイズ微調整 (Portfolio Grid専用) --- */
/* ランディングページとは別に、ここで最適サイズを指定します */

.portfolio-icon-video {
  width: 19px;
}

.portfolio-icon-design {
  width: 19px;
  transform: rotate(-10deg); /* 筆の角度 */
}

.portfolio-icon-web {
  width: 17px;
}

.portfolio-icon-event {
  width: 17px;
}

.portfolio-icon-electric {
  width: 20px;
}

.portfolio-icon-photo {
  width: 22px;
}

.portfolio-icon-life {
  width: 18px;
}
.portfolio-icon-project {
  width: 20px; /* フォルダは少し横に広いので20pxくらいが丁度良い */
}

.portfolio-icon-client {
  width: 20px; /* ユーザーアイコン */
}

.portfolio-icon-url {
  width: 18px; /* 地球儀は丸いので少し小さめでバランスが取れます */
}

.works .meta-info p {
  font-size: 13px;
  line-height: 1.4;
  margin-block-start: 3px;
  margin: 0px;
}

.meta-info img {
  width: 17px;
  margin: 0px 4px -3px 0px;
}

.portfolio-read-more {
  background-color: #ff7936;
  padding: 0px 6px;
  font-size: 11px;
  line-height: 1.8;
  border-radius: 2px;

  /* --- 以下のプロパティで右寄せ・回り込みを実現 --- */
  float: right; /* 右に寄せる */
  margin-left: 8px; /* テキストとの間に隙間を作る */
  margin-top: 2px; /* 高さの微調整 */
  white-space: nowrap; /* ボタン内の文字が折り返されないようにする */
}

.portfolio-read-more a {
  color: white;
  display: block;
}

@media (min-width: 576px) {
  .post-box .entry-title,
  .post-box-masonry .entry-title {
    margin: 10px 0px 0px 0px;
    font-size: 17px;
  }
  .post-box-masonry {
    width: 246px;
  }
}

@media (min-width: 992px) {
  .post-box .entry-title,
  .post-box-masonry .entry-title {
    margin: 10px 0px 0px 0px;
    font-size: 17px;
  }
}
@media (min-width: 768px) {
  .post-box .entry-title,
  .post-box-masonry .entry-title {
    margin: 10px 0px 0px 0px;
    font-size: 18px;
  }
  .entry-title .sub {
    font-size: 14.5px;
  }
  .meta-row {
    grid-template-columns: 26px 10px 1fr;
  }
  .meta-content {
    font-size: 13px;
  }
  .meta-info img {
    width: 18px;
  }
  .meta-tooltip {
    /* 中身のテキスト量に合わせて幅を自動調整する */
    width: max-content;

    /* ただし、広がりすぎ防止の上限を大きく取る（450px〜600pxくらい） */
    max-width: 500px;
  }
  .post-box-masonry {
    width: 336px;
  }
}
@media (min-width: 992px) {
  .post-box-masonry {
    width: 298px;
  }
}
@media (min-width: 1200px) {
  .post-box-masonry {
    width: 358px;
  }
}

/* -------------------------------------------
   Infra Service Grid (空調ページ用グリッド)
------------------------------------------- */

/* グリッドコンテナ設定 */
.infra-service-grid {
  display: grid;
  grid-template-columns: 1fr; /* スマホは1列 */
  gap: 30px; /* カード間の余白 */
  width: 100%;
  margin-top: 20px;
  margin-bottom: 40px;
}

/* PC以上で2列表示 (Web Designのグリッド感に合わせる) */
@media (min-width: 768px) {
  .infra-service-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* カード本体 */
.infra-card {
  width: 100%;
  background-color: transparent; /* 背景なし（Webデザイン一覧に合わせる） */
}

/* サムネイルエリア（画像のホバー拡大用） */
.infra-thumb {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 3px; /* Webデザイン一覧に合わせた角丸 */
  box-shadow: 1px 1px 2px 0px rgba(0, 0, 0, 0.2); /* 軽い影 */
}

.infra-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: bottom;
  transition: transform 0.3s ease; /* ズームアニメーション */
}

/* ホバー時の画像拡大（main-style.cssのpopup-image:hover準拠） */
.infra-card:hover .infra-thumb img {
  transform: scale(1.03);
}

/* タイトル（main-style.cssの .entry-title 準拠） */
.infra-title {
  margin: 10px 0px 5px 0px;
  font-size: 19px; /* 元のデザインに合わせる */
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

/* 説明文エリア */
.infra-content {
  padding: 0 5px; /* 少し内側に余白を持たせる */
}

/* 説明文テキスト（main-style.cssの .meta-info p 準拠） */
.infra-desc {
  font-size: 13px; /* 元のデザインに合わせる */
  line-height: 1.6; /* 読みやすく少し広めに */
  margin: 0 0 10px 0;
  color: var(--g-main-black);
  text-align: left; /* 説明文は左揃えが見やすい */
}

/* ボタンエリア（右寄せ用コンテナ） */
.infra-footer {
  display: flex;
  justify-content: flex-end; /* 右寄せ */
}

/* 詳しく見るボタン（main-style.cssの .portfolio-read-more 準拠） */
.infra-read-more {
  background-color: #ff7936;
  padding: 0px 6px; /* 左右のパディングを少し調整 */
  font-size: 11px;
  line-height: 20px;
  display: inline-block;
  border-radius: 2px;
}

.infra-read-more a {
  color: white;
  text-decoration: none;
  display: block;
}

.infra-read-more a:hover {
  color: #fff;
  opacity: 0.8;
}

/************** Contact Page *****************/

#contact {
  padding-top: 10px;
}

.contact-container {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
}

.contact-info {
  width: 100%;
  text-align: center;
}

.contact-icons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 320px;
  margin: auto;
}

.contact-icons img {
  width: 80px;
}

.contact-social-icons {
  display: flex;
  justify-content: center;
}

.contact-social-icons img {
  width: 40px;
  margin: 5px;
}

.contact-info a {
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
}

.contact-info a:hover {
  -webkit-transform: translateY(-5px);
  -ms-transform: translateY(-5px);
  transform: translateY(-5px);
}

.contact-icon-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.phone-num {
  width: 102px !important;
  margin: 10px 0px;
}

.mail-addr {
  width: 132px !important;
  margin: 10px 0px;
}

.contact-info p {
  text-align: left;
  padding: 10px;
}

.contact-photo {
  width: 60%;
  margin: auto;
  transform: rotate(2deg);
  filter: drop-shadow(5px 5px 4px #c3baa8);
}
.contact-photo-frame {
  background-color: white;
  text-align: center;
}
.contact-photo img {
  padding: 10px;
}

.contact-photo-frame p {
  margin-top: -5px;
  padding-bottom: 10px;
  line-height: 1.4;
  font-size: 12px;
}
@media (min-width: 768px) {
  .contact-container {
    flex-direction: row;
  }
  .contact-info {
    width: 60%;
    margin-top: auto;
    margin-bottom: auto;
  }
  .contact-photo {
    width: 40%;
    margin: 40px 20px 0px 20px;
    transform: rotate(4deg);
  }
}

@media (min-width: 992px) {
  .contact-icons {
    width: max-content;
  }
  .contact-info p {
    padding: 30px 50px;
  }
  .contact-photo {
    margin: 10px 20px;
  }
  .contact-photo-frame p {
    font-size: 14px;
    line-height: 1.4;
  }
}
/* =========================================
   Blog Page
   ========================================= */

/* Page title */
.post-title {
  top: 12px;
}

.post-title h1 {
  font-size: 24px;
  font-weight: 500;
  margin-top: 0;
  line-height: 1.9;
}

.post-title p {
  margin-bottom: -10px;
  font-size: 13px;
}

.post-title .sub {
  display: inline-block;
  font-size: 20px;
  opacity: 0.85;
}

/* Layout */
.blog-grid {
  display: block;
}

.blog-wrapper {
  max-width: 100%;
}

.blog-items {
  background-color: #fff;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  border-radius: 3px;
  box-shadow: 1px 1px 2px 0px rgba(0, 0, 0, 0.28);
}

/* index.php fallback: featured image が無い記事の疑似サムネ枠 */
.blog-items > a.no-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 16px;
  min-height: 180px;
  background: #f4f4f4;
  color: var(--g-main-black);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

.blog-items > a.no-thumb:hover,
.blog-items > a.no-thumb:focus-visible {
  background: #ededed;
}

.blog-items iframe {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

.blog-info {
  padding: 10px 20px;
}

.blog-info h3 {
  font-size: 18px;
  text-align: center;
  margin: 0;
}

.blog-info .sub {
  font-size: 16px;
  line-height: 15px;
  display: table;
  margin-left: auto;
  margin-right: auto;
}

.blog-info p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.read-more {
  background-color: #ff7936;
  padding: 0 3px;
  font-size: 11px;
  float: right;
  line-height: 1.8;
  margin: 2px 11px 0 0;
  border-radius: 2px;
}

.read-more a {
  color: #fff;
}

.read-more a:hover {
  color: #f2f2f2;
}

.blog-meta-info {
  padding: 10px 20px;
  background-color: #f9f9f9;
}

.blog-meta-info p {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
}

/* Responsive */
@media (min-width: 768px) {
  /* 本文側: 2カラム（幅が足りない時は自動で1カラムに落ちる） */
  .blog-wrapper {
    display: flex;
    flex-wrap: wrap;
    /* flex gap が効かない環境向けに row/column を明示 */
    row-gap: 20px;
    column-gap: 20px;
    gap: 20px;
    /* margin-bottom で縦gapを作るフォールバック用 */
    margin-bottom: -20px;
  }
  .blog-items {
    width: auto;
    max-width: calc(50% - 10px);
    flex: 1 1 calc(50% - 10px);
    /* gap が効かないブラウザ向けフォールバック */
    margin-bottom: 20px;
  }
}

@media (min-width: 992px) {
  /* 992px以上でサイドバーを右カラムに出す（それ未満は下に回す） */
  .blog-grid {
    display: grid;
    grid-template-columns: 1fr 220px;
    grid-gap: 15px;
    align-items: start;
  }

  /* blog-items の縦gapは 768px ルール（margin-bottom）に任せる */
}
/* =========================================
   Sidebar
   ========================================= */

.side-bar {
  width: 100%;
  padding: 20px;
}

@media (min-width: 992px) {
  .side-bar {
    width: 220px;
    padding: 20px 0 20px 15px;
    border-left: 1px solid lightgray;
  }
}

.blog-auther {
  width: 100%;
  margin-top: 20px;
  text-align: center;
}

.blog-auther img {
  max-width: 220px;
  width: 80%;
}

.side-bar p.blog-profile {
  font-size: 15px;
  text-align: center;
  line-height: 1.2;
  font-weight: bolder;
  margin-bottom: 6px;
}

.blog-profile small {
  font-weight: normal;
}

.side-bar p {
  font-size: 13px;
  text-align: center;
}
.weatherwidget-io {
  margin-top: 10px;
}

/* Sidebar: Event list */
.sidebar-event-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: "Noto Sans", sans-serif;
}

/* 全体の基本設定 */
.sidebar-event-list li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 6px 10px;
  border-bottom: none;
  font-size: 1.2rem;
  line-height: 1.2;
  color: #333;
}

/* 追加・変更ポイント */

/* 1行目（タイトル）だけの特別デザイン */
.sidebar-event-list li:first-child {
  display: block; /* 横並び解除 */
  text-align: center; /* 中央寄せ */
  font-size: 1.4rem; /* 文字を大きく */
  font-weight: bold; /* 太字 */
  background-color: transparent !important; /* 背景色はなし（白） */
  border-bottom: 2px solid #ff7936; /* 天気予報に合わせたアクセント色の線 */
  padding: 10px 0 8px 0; /* 余白調整 */
  margin-bottom: 5px; /* データとの隙間 */
}

/* 2行目以降（データ部分）のシマシマ設定 */
/* タイトル(1番目)が奇数なので、偶数(2,4,6...)行目に色を付ければOK */
.sidebar-event-list li:nth-child(even) {
  background-color: #f7f7f7;
}

/* 日付部分（データ行用） */
.sidebar-event-list li strong {
  width: 70px;
  flex-shrink: 0;
  font-weight: 600;
  color: #333;
}

/* =========================================
   Pagination
   ========================================= */
.pagination {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  justify-content: center;
  align-items: center; /* prev/next と数字の中心を揃える */
  gap: 8px;
  flex-wrap: wrap;
}

.pagination li {
  margin: 0;
  padding: 0;
  display: flex; /* li を flex item としても整列 */
  align-items: center; /* 子要素（a/span）の中心を揃える */
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  min-width: 34px;
  padding: 0 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1;
  color: var(--g-main-black);
  transition: all 0.2s;
  position: relative; /* sr-only 用 */
}

/* < >（prev/next）だけ一回り小さくして差別化 */
.pagination .page-numbers.prev,
.pagination .page-numbers.next {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
}

.pagination .page-numbers.prev .pagination-icon,
.pagination .page-numbers.next .pagination-icon {
  width: 16px;
  height: 16px;
}

.pagination .pagination-icon {
  width: 14px;
  height: 14px;
  display: block;
}

.pagination .pagination-icon path {
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pagination .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pagination a.page-numbers:hover {
  background: var(--g-navigation-blue);
  color: #fff;
  border-color: var(--g-navigation-blue);
}

.pagination .page-numbers.current {
  background: var(--g-navigation-blue);
  color: #fff;
  border-color: var(--g-navigation-blue);
}

.pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  min-width: auto;
  padding: 0 6px;
}

/* =========================================
   Search Page (Search Filter UI)
   ========================================= */

/* Container */
.search-filter-wrapper {
  background: #fff;
  padding: 18px 20px 16px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Status */
.sf-status {
  margin: -10px 0px 5px 15px;
  font-size: 13px;
  color: #666;
}

/* Load more */
.sf-load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 18px 0 0;
}
.sf-load-more {
  border: 1px solid #ddd;
  background: #fff;
  height: 34px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.sf-load-more:hover {
  background: var(--g-navigation-blue);
  color: #fff;
  border-color: var(--g-navigation-blue);
}
.sf-load-more[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* Row 1: 検索窓 & スコープ */
.sf-row-1 {
  display: flex;
  flex-wrap: nowrap; /* 基本は1行にまとめる */
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
}

.sf-search-box {
  flex: 1 1 320px;
  min-width: 0; /* nowrap時に縮められるように */
  display: flex;
  align-items: center;
  background: #f0f0f0;
  padding: 8px 15px;
  border-radius: 30px;
  min-width: 200px;
}

.sf-search-box input {
  border: none;
  background: transparent;
  width: 100%;
  margin-left: 10px;
  outline: none;
  font-size: 14px;
}

.sf-scope-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  flex: 0 1 auto;
  --sf-control-h: 32px; /* scope-btn と select の縦幅を揃える */
  --sf-scope-w: 65px; /* 全て/Works/Blog を同幅に（hover文言でも幅が変わらない） */
}

/* 画面が狭い時だけ2段（検索窓の下にスコープ） */
@media (max-width: 860px) {
  .sf-row-1 {
    flex-wrap: wrap;
  }
  .sf-scope-btns {
    width: 100%;
  }
}

.scope-btn {
  border: 1px solid #ddd;
  background: #fff;
  height: var(--sf-control-h);
  width: var(--sf-scope-w);
  padding: 0;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.scope-btn.active,
.scope-btn:hover {
  background: var(--g-navigation-blue); /* テーマカラー */
  color: #fff;
  border-color: var(--g-navigation-blue);
}

/* 「全て」が選択されている時だけ hover で Reset 表示（ボタン幅は固定なのでズレない） */
.scope-btn[data-scope="all"] {
  position: relative;
}
.scope-btn[data-scope="all"].active:hover,
.scope-btn[data-scope="all"].active:focus-visible {
  color: transparent; /* 元の「全て」を隠す */
}
.scope-btn[data-scope="all"].active:hover::after,
.scope-btn[data-scope="all"].active:focus-visible::after {
  content: "Reset";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* Row 2: タブ */
.sf-row-2 {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.sf-tabs {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto; /* スマホで横スクロール */
  white-space: nowrap;
  gap: 20px;
}

.tab-item {
  padding: 10px 5px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  color: #888;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-item:hover,
.tab-item.active {
  color: var(--g-navigation-blue);
  border-bottom-color: var(--g-navigation-blue);
}

/* Row 3: パネルエリア */
.sf-row-3 {
  min-height: 50px;
  margin-bottom: 12px;
  padding: 10px 0;
}

/* 「全て表示」タブ（sf-row-3 が実質空）の時は縦の空白を消す */
.sf-row-3.is-collapsed {
  min-height: 0;
  margin-bottom: 0;
  padding: 0;
}

.sf-panel {
  display: none; /* デフォルト非表示 */
}

.sf-panel.active {
  display: block;
  animation: fadeIn 0.3s;
}

/* Row 3: プルダウン */
.sf-dropdown-group {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.sf-dropdown-group--inline {
  gap: 10px;
  margin-left: 10px; /* スコープボタン群との間隔 */
}

.sf-select-wrap select {
  height: var(--sf-control-h);
  padding: 0 15px;
  border-radius: 20px; /* スコープボタンと統一 */
  border: 1px solid #ddd;
  background: #fff;
  font-size: 13px;
  min-width: 190px;
}

/* Search Page: custom select (project/client) */
.sf-select-wrap {
  position: relative;
}
.sf-select-wrap--custom .sf-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.sf-select-btn {
  height: var(--sf-control-h);
  width: var(--sf-select-w, 190px);
  padding: 0 34px 0 15px; /* 右は▼分確保 */
  border-radius: 20px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  position: relative;
}
.sf-select-btn::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #666;
  pointer-events: none;
}
.sf-select-btn[aria-expanded="true"]::after {
  content: "▲";
}
.sf-select-label {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis; /* 長い選択肢は … で省略 */
}
.sf-select-pop {
  position: fixed; /* viewport基準で画面外を防ぐ */
  z-index: 99999;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 6px;
  max-height: min(60vh, 420px);
  overflow: auto;
}
.sf-select-opt {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.3;
}
.sf-select-opt:hover,
.sf-select-opt[aria-selected="true"] {
  background: #f0f0f0;
}

@media (max-width: 680px) {
  .sf-dropdown-group--inline {
    margin-left: 0;
    width: 100%;
  }
  .sf-dropdown-group--inline .sf-select-wrap {
    flex: 1;
    min-width: 220px;
  }
  .sf-dropdown-group--inline .sf-select-wrap select {
    width: 100%;
    min-width: 0;
  }
}

/* Row 3: チップ */
.sf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-btn {
  border: 1px solid var(--g-navigation-blue);
  background: #fff;
  color: var(--g-navigation-blue);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
}

.chip-btn:hover,
.chip-btn.active {
  background: var(--g-navigation-blue);
  color: #fff;
}

/* Row 4: タグ */
.sf-row-4 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px dashed #eee;
  padding-top: 15px;
}

.sf-tags-header {
  font-size: 12px;
  color: #666;
  font-weight: bold;
}

/* Search Page: tag list toggle (clickable header) */
.sf-tags-toggle {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sf-tags-toggle:focus-visible {
  outline: 2px solid var(--g-navigation-blue);
  outline-offset: 2px;
  border-radius: 4px;
}
.sf-tags-caret {
  font-size: 11px;
}

.tag-btn {
  border: none;
  background: #f0f0f0;
  color: #555;
  margin: 1px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.tag-btn:hover {
  background: #e0e0e0;
}

/* Search Page: extra tax tag list */
.sf-extra-tags {
  width: 100%;
}
.sf-extra-tax-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 10px;
}
.sf-extra-tax-head img {
  width: 18px;
  height: 18px;
  display: block;
}
.sf-extra-tax-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   Footer
   ========================================= */
footer {
  background: var(--g-navigation-blue);
  padding: 15px 0;
  font-size: 13px;
  color: #fff;
}

.menu-footer-menu-container {
  margin: -6px 0 0 10px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: center;
}

/* Footer - Footer Menu */

.footer-menu {
  /* 100vw は縦スクロールバー幅を含み、横スクロールが出やすいので避ける */
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(4, auto);
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu li {
  line-height: 1.4;
}

.footer-menu li::before {
  content: "";
  border-color: transparent #fff;
  border-style: solid;
  border-width: 0.35em 0 0.35em 0.45em;
  display: block;
  height: 0;
  width: 0;
  left: -0.8em;
  top: 1em;
  position: relative;
}

.footer-menu li a {
  color: #fff;
}

.footer-menu li a:hover {
  color: var(--g-nav-text-hover);
}

/* Footer Info */

.footer-info {
  display: flex;
  margin-top: 10px;
}

.footer-info img {
  width: 130px;
  margin: 0 6px;
}

.footer-info span {
  line-height: 1.3;
  font-size: 11px;
  margin-top: 10px;
}

.copyright {
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
}

@media (min-width: 576px) {
  .footer-menu {
    width: 510px;
    grid-template-columns: repeat(6, auto);
    grid-template-rows: repeat(2, auto);
    text-align: left;
  }
}

@media (min-width: 768px) {
  .site-footer .container {
    display: flex;
    justify-content: space-between;
    flex-direction: unset;
    align-items: unset;
  }
  .footer-menu {
    width: 360px;
    grid-template-columns: repeat(4, auto);
    grid-template-rows: repeat(3, auto);
  }
  .footer-info {
    margin-top: 0;
  }
  .footer-info img {
    width: 150px;
  }
  .footer-info span {
    line-height: 1.8;
    font-size: 12px;
  }
}

@media (min-width: 992px) {
  footer {
    font-size: 14px;
  }
  .footer-menu {
    width: 580px;
    align-items: unset;
  }
}

/* =========================================
   Others
   ========================================= */
#under-construction {
  text-align: center;
  min-height: calc(100vh - 212px);
  display: flex;
  justify-content: center;
  align-items: center;
}

#under-construction h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: bold;
}

/* overlay at start */
.mfp-bg {
  opacity: 0;
  transition: all 0.2s ease-out;
  /* header(z-index:9500) より前面に出す */
  z-index: 12000 !important;
}
/* overlay animate in */
.mfp-bg.mfp-ready {
  opacity: 0.8;
}
/* overlay animate out */
.mfp-bg.mfp-removing {
  opacity: 0;
}
/* content at start */
.mfp-wrap .mfp-content {
  opacity: 0;
  transition: all 0.2s ease-out;
}

/* Magnific Popup wrapper: header より前面に出す */
.mfp-wrap {
  z-index: 12010 !important;
}
/* Magnific Popup captions */
.mfp-title,
.mfp-caption {
  font-size: 14px;
  line-height: 1.5;
  color: #f3f3f3;
  padding-right: 30px; /* カウンターと被らないように */
  text-align: left;
  margin-top: 6px;
}
.mfp-caption p {
  font-size: 14px;
  line-height: 1.6;
}
.mfp-wrap .mfp-title a,
.mfp-wrap .mfp-caption a {
  color: #ffffff;
  text-decoration: underline;
}
.mfp-wrap .mfp-title a:hover,
.mfp-wrap .mfp-caption a:hover {
  color: #dcdddd;
}
/* キャプション幅をメディア幅に合わせる（YouTube/Video inline） */
.mfp-yt-container + .mfp-caption,
.mfp-video-container + .mfp-caption {
  width: min(900px, 100%);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
@media (max-width: 768px) {
  .mfp-title,
  .mfp-caption {
    font-size: 12px;
  }
}
/* Magnific Popup: gallery video support */
.mfp-video-container {
  position: relative;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.mfp-video {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh; /* 縦長動画が画面からはみ出さないように */
  display: block;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
}

/* YouTube (gallery mixed media) */
.mfp-yt-container {
  position: relative;
  width: min(900px, 100%);
  max-height: 90vh;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}
.mfp-yt-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}
.mfp-yt-container .mfp-close {
  z-index: 2;
}

/* Magnific Popup: keep controls fixed while scrolling
   - 注意: デフォルトCSSには `.mfp-image-holder .mfp-close { width:100%; }` があり、
     fixed化するとクリック領域が画面上部全体に広がるため、幅も抑える */
/* NOTE:
   close/arrow を全モードで fixed にすると、特に iframe（YouTube等）でクリックが効かない環境があるため
   fixed は web-scroll-mode（縦スクロール）だけに限定する（下に専用ルールあり）。 */
.mfp-wrap .mfp-image-holder button.mfp-close,
.mfp-wrap .mfp-iframe-holder button.mfp-close {
  width: 44px;
  right: 0;
  text-align: center;
  padding-right: 0;
}

/* close は常にクリックできるように最前面に固定 */
.mfp-wrap .mfp-close {
  pointer-events: auto;
  z-index: 12020;
}

/* Magnific Popup内でのブロックエディタのセンタリング修正 */

/* 1. テキスト配置によるセンタリング (インライン要素やテキストブロック) */
.mfp-content .aligncenter,
.mfp-content .has-text-align-center {
  text-align: center !important;
}

/* 2. マージンによるセンタリング (ブロックレベル要素、画像ブロックなど) */
.mfp-content figure.aligncenter,
.mfp-content .wp-block-image.aligncenter,
.mfp-content .aligncenter img {
  margin-left: auto !important;
  margin-right: auto !important;
  display: block; /* 必要に応じて */
}

/* 3. キャプションなども中央にしたい場合 */
.mfp-content .wp-caption,
.mfp-content figcaption {
  text-align: center !important;
}

/* Popup (AJAX post content) */
.gutz-popup {
  background: #fff;
  padding: 34px 24px 28px;
  max-width: 760px;
  margin: 0 auto;
  box-sizing: border-box;
  border-radius: 4px;
  position: relative; /* close ボタンを右上に固定するため */
}

/* AJAX popup の close をパネル右上に固定（背景と同化して見えない問題の対策） */
.gutz-popup--has-close > button.mfp-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  line-height: 40px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  opacity: 1;
  z-index: 2;
}

.gutz-popup--has-close > button.mfp-close:hover,
.gutz-popup--has-close > button.mfp-close:focus-visible {
  background: rgba(0, 0, 0, 0.75);
}
.gutz-popup-media {
  margin-bottom: 18px;
}
.gutz-popup-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.gutz-popup-media--youtube .gutz-popup-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 4px;
}
.gutz-popup-media--youtube .gutz-popup-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.gutz-popup-title {
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
.gutz-popup-content {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}
.gutz-popup-content img,
.gutz-popup-content video,
.gutz-popup-content iframe,
.gutz-popup-content embed {
  width: 100%;
  max-width: 100%;
}

/* Popup内 Gutenberg埋め込み（YouTube等）を幅100%にする */
.gutz-popup-content .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
}
.gutz-popup-content .wp-block-embed__wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
}
/* content animate it */
.mfp-wrap.mfp-ready .mfp-content {
  opacity: 1;
}
/* content animate out */
.mfp-wrap.mfp-removing .mfp-content {
  opacity: 0;
}

/* オープニングの幕 */
#opening-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #fef8e9; /* テーマカラーのクリーム色 */
  z-index: 9999; /* 最前面 */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* GSAPオープニング/イントロ中の一時的な横はみ出し対策 */
html.is-opening,
body.is-opening {
  overflow-x: hidden;
}

/* オープニング中は縦スクロールバー幅を常に確保（表示/非表示で横幅が変わるカクつき防止） */
html.is-opening {
  overflow-y: scroll;
}

/* SVGのサイズ調整（スマホなどではみ出さないように） */
#logo-svg {
  width: 50%; /* 画面幅の80% */
  max-width: 300px; /* PCでの最大幅 */
  height: auto;
}

/* =========================================
   Intro Scene (Opening Animation)
   ========================================= */
:root {
  --intro-safe-top: 66px; /* JSで header 高さを注入（デフォルトは 66px） */
}

#intro-scene {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 9000; /* ロゴ(9999)の下、サイトより上 */
  background-color: #000;
  overflow: hidden;
  visibility: hidden; /* 最初は隠しておく */
  opacity: 0;
}

/* 背景画像 */
.intro-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.intro-bg-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* ズーム演出のため、transformはJSで制御 */
}

/* ファインダーUI コンテナ */
.finder-frame {
  /* ファインダー全体を固定アスペクトで保持し、枠自体を動かせるようにする */
  position: absolute;
  left: 50%;
  /* ヘッダー(=safe-top)を避けた残り領域のセンターに置く */
  top: calc(var(--intro-safe-top) + (100vh - var(--intro-safe-top)) / 2);
  /* 中央寄せはGSAP側(xPercent/yPercent:-50)で一元管理する */
  transform: translateZ(0);
  /* ウィンドウサイズに合わせてJSで幅/高さを算出（画面の約80%） */
  width: var(--finder-w, 80vw);
  height: var(--finder-h, 60vh);
  aspect-ratio: var(--finder-ar, 1.5);
  /* 念のための安全柵 */
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - var(--intro-safe-top) - 24px);
  z-index: 6; /* 背景より上、テキスト(10)より下 */
  pointer-events: none;
  /* 内側余白（角の距離）。固定値だと大きすぎて「枠が小さく見える」ので可変にする */
  --finder-inset: clamp(18px, 3.5vmin, 48px);
  will-change: transform;
}

.viewfinder-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  padding: var(--finder-inset); /* 枠の内側余白（四隅の距離） */
  box-sizing: border-box;
}

/* グリッド線 */
.grid-line {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.3);
  transition: background-color 0.12s linear;
}
.line-v {
  width: 1px;
  top: var(--finder-inset); /* 上のコーナー枠のY位置 */
  bottom: var(--finder-inset); /* 下のコーナー枠のY位置 */
}
.line-v-1 {
  left: 33.333%;
}
.line-v-2 {
  left: 66.666%;
}

.line-h {
  height: 1px;
  left: var(--finder-inset); /* 左のコーナー枠のX位置 */
  right: var(--finder-inset); /* 右のコーナー枠のX位置 */
}
.line-h-1 {
  top: 33.333%;
}
.line-h-2 {
  top: 66.666%;
}

/* 四隅のコーナー枠 (L字) */
.corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.9);
  border-width: 0;
  transition: border-color 0.12s linear;
}
.corner-tl {
  top: var(--finder-inset);
  left: var(--finder-inset);
  border-top-width: 2px;
  border-left-width: 2px;
}
.corner-tr {
  top: var(--finder-inset);
  right: var(--finder-inset);
  border-top-width: 2px;
  border-right-width: 2px;
}
.corner-bl {
  bottom: var(--finder-inset);
  left: var(--finder-inset);
  border-bottom-width: 2px;
  border-left-width: 2px;
}
.corner-br {
  bottom: var(--finder-inset);
  right: var(--finder-inset);
  border-bottom-width: 2px;
  border-right-width: 2px;
}

/* RECマーク */
.rec-indicator {
  position: absolute;
  top: calc(var(--finder-inset) + 15px);
  right: calc(var(--finder-inset) + 15px);
  color: #ff0000;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  animation: blink 2s infinite;
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* 中心点 */
.center-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  transform: translate(-50%, -50%);
}
.center-mark::before,
.center-mark::after {
  content: "";
  position: absolute;
  background-color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.12s linear;
}
.center-mark::before {
  top: 9px;
  left: 0;
  width: 100%;
  height: 2px;
}
.center-mark::after {
  left: 9px;
  top: 0;
  height: 100%;
  width: 2px;
}

/* フォーカスロック（半押し）: グリッド線と中心の＋だけ緑にする */
.finder-frame.is-focus-lock .grid-line {
  background-color: rgba(80, 255, 120, 0.55);
}
.finder-frame.is-focus-lock .center-mark::before,
.finder-frame.is-focus-lock .center-mark::after {
  background-color: rgba(80, 255, 120, 0.85);
}
.finder-frame.is-focus-lock .corner {
  border-color: rgba(80, 255, 120, 0.9);
}

/* テキスト */
.intro-text-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  width: 100%;
  color: #fff;
  text-shadow: none; /* 影は各テキスト要素側で指定 */
}
.en-copy {
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  font-size: clamp(30px, 5.5vw, 48px);
  line-height: 1.2;
  margin-bottom: 0.1em;
  padding-left: 0.3em;
  padding-right: 0.3em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  opacity: 0; /* JSで表示 */
}
.jp-copy {
  font-family: "Zen Old Mincho", serif;
  font-weight: 500;
  font-size: clamp(16px, 2.3vw, 24px);
  letter-spacing: 0.2em;
  padding-left: 0.3em;
  padding-right: 0.3em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  opacity: 0; /* JSで表示 */
  margin: 0;
}

@media (min-width: 768px) {
  .en-copy {
    letter-spacing: 0.02em;
    padding: 0;
  }
}
/* シャッターフラッシュ */
#shutter-flash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
}

/* スマホ調整 */
@media (max-width: 768px) {
  .finder-frame {
    --finder-inset: clamp(12px, 3vmin, 28px);
    /* アニメーションで動いた時のはみ出し防止に、余白を厚めに確保 */
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - var(--intro-safe-top) - 32px);
  }
  .corner {
    width: 30px;
    height: 30px;
  }
  .rec-indicator {
    font-size: 10px;
  }
}

/* 縦長スマホ（portrait）では「縦に広がる」ファインダーに切り替える */
@media (max-width: 768px) and (orientation: portrait) {
  .finder-frame {
    /* 縦長端末はヘッダーが高くなりがちなので、安全領域を少し厚めに取る */
    --intro-safe-top-portrait: max(
      calc(var(--intro-safe-top, 66px) + 12px),
      96px
    );
    /* 画面の縦を優先して最大化（横溢れしないよう高さに上限をかける） */
    aspect-ratio: 9 / 16;
    width: auto;
    height: min(
      calc(100dvh - var(--intro-safe-top-portrait) - 36px),
      calc((100vw - 32px) * 16 / 9)
    );
    max-height: calc(100dvh - var(--intro-safe-top-portrait) - 36px);
    max-width: calc(100vw - 32px);
    /* センター計算も 100vh ではなく 100dvh ベースに（アドレスバー伸縮対策） */
    top: calc(
      var(--intro-safe-top-portrait) +
        (100dvh - var(--intro-safe-top-portrait)) / 2
    );
  }
}

.term-rich-description {
  margin-bottom: 30px;
}

/* =========================================
   Web制作ポートフォリオ専用設定（縦スクロール）
   ========================================= */

/* ----------------------------------
   1. グリッド一覧表示時のスタイル
   ---------------------------------- */
/* グリッド上の画像を強制的に枠に収める */
.web-thumb {
  width: 100%;
  height: auto; /* ★ここでグリッドの高さを決めます（調整可） */
  aspect-ratio: 1440 / 950;
  overflow: hidden; /* はみ出した部分は隠す */
  position: relative;
}

/* 画像自体のトリミング設定 */
.web-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 枠いっぱいに隙間なく表示 */
  object-position: top center; /* ★重要：常に画像の「一番上（ヘッダー）」を表示 */
  /* “動き”ではなく“拡大”だけにする（object-positionは固定） */
  transform-origin: top center;
  transition: transform 0.2s linear;
  will-change: transform;
}

/* Hover: 少し拡大（動かさない） */
.web-thumb:hover .web-thumb-img {
  transform: scale(1.03);
}

/* ----------------------------------
 2. ポップアップ（Lightbox）時のスタイル
 ---------------------------------- */

/* ポップアップのラッパー（.web-scroll-mode はJSで付与します） */
.mfp-wrap.web-scroll-mode .mfp-container {
  /* Magnific Popup の左右padding(デフォルト8px)があると横溢れ→横スクロールが出やすい */
  padding-left: 0;
  padding-right: 0;
}

.mfp-wrap.web-scroll-mode .mfp-content {
  height: 90vh; /* 画面の高さの90%を使う */
  width: 100%;
  max-width: 1000px; /* PCでの最大幅 */
  margin: 40px auto; /* 中央寄せ */
  overflow-y: auto; /* ★縦スクロールを許可 */
  overflow-x: hidden; /* 横スクロールバーを出さない */
  box-sizing: border-box;
  background: #ffffff; /* Webサイトなので背景は白 */
  vertical-align: top; /* 上詰め表示 */

  /* スクロールバーのデザイン（Chrome/Safari用・お好みで） */
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f1;
}

/* 画像自体の設定 */
.mfp-wrap.web-scroll-mode .mfp-img {
  width: 100%; /* 横幅いっぱい */
  height: auto !important; /* 高さはなりゆき（縮小させない） */
  max-height: none !important; /* Magnific Popupの強制縮小を解除 */
  padding: 0 !important; /* デフォルトの余白を消す */
  display: block;
}

/* 閉じるボタンの位置調整（スクロールしても押しやすい位置に固定） */
.mfp-wrap.web-scroll-mode .mfp-close {
  position: fixed;
  right: 20px;
  top: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-align: center;
  padding: 0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  line-height: 42px;
  opacity: 1;
}
