/*
 * UIZU-ART 共通CSS（ヘッダー・フッター・共通ユーティリティ）
 *
 * 移植元：uizu-art-mockup_20260702/css/style.css
 * - Lightning の CSS より後に読み込む（functions.php で依存指定）
 * - 全ページの本文に影響させないため、ベーススタイルは .uizu-header／.uizu-footer 配下に限定
 * - Lightning のルールに負ける箇所は .uizu-header／.uizu-footer を重ねて詳細度で上書き（!important は使わない）
 * - トップ固有（ヒーロー・新着・施工事例・選ばれる理由）とカードの hover ラップは front.css（フェーズ2）
 */

/* ==========================================================================
   Variables & Fonts
   ========================================================================== */
:root {
  --font-serif: 'Noto Serif JP', serif;
  --font-sans: 'Noto Sans JP', sans-serif;

  --color-primary: #111827;
  /* Dark Navy (Base) */
  --color-secondary: #1e293b;
  /* Lighter Navy */
  --color-accent-gold: #d4af37;
  /* Gold */
  --color-accent-red: #b91d47;
  /* Red */

  --color-text-main: #333333;
  --color-text-light: #666666;
  --color-white: #ffffff;
  --color-gray-bg: #f5f5f5;
  --color-border: #eaeaea;

  --max-width: 1200px;
  --max-width-sm: 900px;
  --header-height: 90px;
  --header-top-height: 30px;
  --header-height-sp: 70px;

  --transition: all 0.3s ease;
}

/* ==========================================================================
   Reset & Base（ヘッダー・フッター配下のみ）
   ========================================================================== */
.uizu-header,
.uizu-header *,
.uizu-header *::before,
.uizu-header *::after,
.uizu-footer,
.uizu-footer *,
.uizu-footer *::before,
.uizu-footer *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.uizu-header,
.uizu-footer {
  font-family: var(--font-sans);
  line-height: 1.6;
  letter-spacing: 0.05em;
  -webkit-font-smoothing: antialiased;
}

.uizu-header a,
.uizu-footer a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.uizu-header a:hover,
.uizu-footer a:hover {
  color: var(--color-accent-gold);
}

.uizu-header ul,
.uizu-footer ul {
  list-style: none;
}

.uizu-header img,
.uizu-footer img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout / Utilities
   ========================================================================== */
.uizu-footer .container,
.uizu-front .container {
  width: auto;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 4%;
}

.section-padding {
  padding: 100px 0;
}

.bg-gray {
  position: relative;
  background-color: var(--color-gray-bg);
  /* Top is solid/heavily blurred gray, gradually fading down to reveal the image more clearly */
  background-image:
    linear-gradient(to bottom,
      rgba(245, 245, 245, 1) 0%,
      rgba(245, 245, 245, 0.8) 40%,
      rgba(245, 245, 245, 0.6) 100%),
    url('../images/20260308-125530.jpg');
  background-size: cover;
  background-position: center bottom;
  background-attachment: fixed;
}

/* ==========================================================================
   1. Header
   ========================================================================== */
/* Lightning: .site-header { position: relative; box-shadow } / origin3: .site-header { background-color: #fff } を上書き */
.site-header.uizu-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
  box-shadow: none;
  color: var(--color-text-main);
  transition: background-color 0.4s ease, border-bottom 0.4s ease;
}

.site-header.uizu-header.scrolled {
  background-color: var(--color-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ログイン中の管理バー分だけ下げる */
.admin-bar .site-header.uizu-header {
  top: 32px;
}

.uizu-header .header-top {
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: 0.75rem;
  height: var(--header-top-height);
  display: flex;
  align-items: center;
}

.uizu-header .header-top .header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 4%;
  display: flex;
  justify-content: flex-end;
}

.uizu-header .header-phone {
  letter-spacing: 0.1em;
}

.uizu-header .header-main {
  height: var(--header-height);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.uizu-header.scrolled .header-main {
  border-bottom: 1px solid var(--color-border);
}

.uizu-header .header-main .header-inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.uizu-header .site-logo img {
  height: 48px;
  /* logo01 is a wide 6.4:1 horizontal lockup; 48px (width ≒307px) — nav is tightened to stay on one line */
  width: auto;
  object-fit: contain;
  /* Transparent PNG: shape-hugging shadow gives readability without a chip.
     Identical in both header states so size/position never shifts on scroll. */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

/* Lightning: @media (width <= 992px) { .global-nav { display: none } } を上書き */
.uizu-header .global-nav {
  display: block;
}

.uizu-header .global-nav ul {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.uizu-header .global-nav a {
  color: var(--color-white);
  font-size: 0.8rem;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.uizu-header.scrolled .global-nav a {
  color: var(--color-primary);
  text-shadow: none;
}

.uizu-header .global-nav a:hover {
  color: var(--color-accent-gold);
}

.uizu-header .global-nav .contact-btn a {
  background-color: var(--color-accent-red);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-shadow: none;
  transition: var(--transition);
}

.uizu-header.scrolled .global-nav .contact-btn a {
  color: var(--color-white);
}

.uizu-header .global-nav .contact-btn a:hover {
  background-color: #9a183b;
  color: var(--color-white);
}

/* モックアップは div。子テーマでは button にしたためブラウザ既定の見た目を消す */
.uizu-header .hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
}

.uizu-header .hamburger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  transition: var(--transition);
}

.uizu-header.scrolled .hamburger-menu span {
  background-color: var(--color-primary);
}

/* トップ以外：固定ヘッダーの高さ分だけ本文を下げる */
.uizu-header-spacer {
  height: calc(var(--header-top-height) + var(--header-height));
}

/* --------------------------------------------------------------------------
   ナビのドロップダウン（header.php・instructions/20260926-001 1-4）
   PC のマウス操作（768px 超）でだけ開く。SP・タッチ端末では常に非表示（ハンバーガーは従来どおり）
   詳細度は SP の .global-nav.is-open ul（0,3,1）より高くする
   -------------------------------------------------------------------------- */
.uizu-header .global-nav .has-dropdown > .nav-dropdown {
  display: none;
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .uizu-header .global-nav .has-dropdown {
    position: relative;
  }

  /* 親項目の下向き矢印 */
  .uizu-header .global-nav .has-dropdown > a::after {
    content: '';
    display: inline-block;
    width: 0.4em;
    height: 0.4em;
    margin-left: 0.4em;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-0.2em) rotate(45deg);
  }

  .uizu-header .global-nav .has-dropdown > .nav-dropdown {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 12rem;
    padding: 0.5rem 0;
    background-color: var(--color-white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }

  /* 親項目との隙間でホバーが切れないよう、隙間を透明な領域で埋める */
  .uizu-header .global-nav .has-dropdown > .nav-dropdown::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    width: 100%;
    height: 16px;
  }

  .uizu-header .global-nav .has-dropdown:hover > .nav-dropdown,
  .uizu-header .global-nav .has-dropdown:focus-within > .nav-dropdown {
    display: flex;
  }

  .uizu-header .global-nav .nav-dropdown a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--color-primary);
    font-size: 0.85rem;
    white-space: nowrap;
    text-shadow: none;
  }

  .uizu-header .global-nav .nav-dropdown a:hover,
  .uizu-header .global-nav .nav-dropdown a:focus-visible {
    background-color: var(--color-gray-bg);
    color: var(--color-accent-gold);
  }
}

/* ==========================================================================
   Page Header・Breadcrumb（下層の固定ページ・アーカイブ共通。instructions/20260923-005 L2-6）
   Lightning 標準の構造（.page-header／#breadcrumb）はそのまま、色と書体だけ揃える
   ========================================================================== */
/* origin3: .page-header { color:#fff; background-color: var(--vk-color-primary) } を上書き */
.page-header {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Lightning: .page-header-title, h1.page-header-title { font-size:2rem; font-weight:700 } を上書き */
.page-header .page-header-title {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.breadcrumb .breadcrumb-list a {
  color: var(--color-primary);
  text-decoration: none;
}

.breadcrumb .breadcrumb-list a:hover {
  color: var(--color-accent-gold);
}

/* ==========================================================================
   reCAPTCHA v3 のバッジ（右下・全ページに出る）を非表示（instructions/20260923-005 L4）
   代わりの表記（Google のプライバシーポリシー・利用規約へのリンク）はお問い合わせフォームの下に入れてある
   ========================================================================== */
.grecaptcha-badge {
  visibility: hidden;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
/* Lightning: .site-footer { font-size: 12px; overflow: hidden; content-visibility: auto } / origin3: border-top を上書き */
.site-footer.uizu-footer {
  display: block;
  background-color: var(--color-primary);
  color: var(--color-white);
  font-size: 1rem;
  border-top: 0;
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.uizu-footer .footer-top {
  padding: 4rem 0;
}

.uizu-footer .footer-flex {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
}

.uizu-footer .footer-info {
  flex: 1;
  min-width: 300px;
}

.uizu-footer .company-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.uizu-footer .company-address,
.uizu-footer .company-contact {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #cccccc;
  margin-bottom: 1rem;
}

/* SNS アイコン（footer.php・instructions/20260926-001 1-3） */
.uizu-footer .footer-sns {
  display: flex;
  gap: 1rem;
  /* 40px の枠のうちアイコン（26px）の左側の余白分だけ戻し、住所・電話と左端を揃える */
  margin-left: calc((26px - 40px) / 2);
}

.uizu-footer .footer-sns a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: #cccccc;
}

.uizu-footer .footer-sns a:hover {
  color: var(--color-accent-gold);
}

.uizu-footer .footer-sns svg {
  display: block;
  width: 26px;
  height: 26px;
}

.uizu-footer .footer-nav-wrap {
  display: flex;
  flex: 2;
  gap: 4rem;
}

/* Lightning: .footer-nav { padding; line-height: 1 } .footer-nav li { padding } / origin3: border-bottom を上書き */
.uizu-footer .footer-nav {
  flex: 1;
  padding: 0;
  line-height: inherit;
  border-bottom: 0;
}

.uizu-footer .footer-nav li {
  padding: 0;
  margin-bottom: 1rem;
}

.uizu-footer .footer-nav a {
  color: #cccccc;
  font-size: 0.95rem;
}

.uizu-footer .footer-nav a:hover {
  color: var(--color-accent-gold);
}

.uizu-footer .footer-bottom {
  background-color: #0b101a;
  padding: 1.5rem 0;
  text-align: center;
}

.uizu-footer .copyright {
  font-size: 0.8rem;
  color: #888888;
  font-family: Arial, sans-serif;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media screen and (max-width: 992px) {
  .uizu-footer .footer-flex {
    flex-direction: column;
    gap: 2rem;
  }

  .uizu-footer .footer-nav-wrap {
    gap: 2rem;
  }
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header.uizu-header {
    top: 46px;
  }
}

@media screen and (max-width: 768px) {
  .uizu-header .header-top {
    display: none;
  }

  .uizu-header .header-main {
    height: var(--header-height-sp);
  }

  .uizu-header .site-logo img {
    height: 40px;
    /* Wide logo01 lockup; 40px fits inside the 70px mobile header without clashing the hamburger */
  }

  .uizu-header .global-nav {
    display: none;
    /* Hide on mobile initially, JS toggles .is-open */
  }

  /* モックアップ script.js がインラインで当てていた展開時スタイルをクラス化 */
  .uizu-header .global-nav.is-open {
    display: block;
    position: absolute;
    top: var(--header-height-sp);
    left: 0;
    width: 100%;
    background-color: var(--color-primary);
    padding: 20px;
  }

  .uizu-header .global-nav.is-open ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* 白背景ヘッダー（スクロール後・トップ以外）でも展開メニューの文字は白 */
  .uizu-header .global-nav.is-open a,
  .uizu-header.scrolled .global-nav.is-open a {
    color: var(--color-white);
  }

  .uizu-header .hamburger-menu {
    display: flex;
  }

  .uizu-header-spacer {
    height: var(--header-height-sp);
  }

  .uizu-footer .footer-nav-wrap {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ==========================================================================
   本文のギャラリー（[gallery]・旧エディターの「ギャラリーを作成」）
   L19-2・instructions/20261110-001 2-1（決定 D8・D9）。PHP 側は inc/gallery.php
   - 本体のインライン <style> は inc/gallery.php で止めている（use_default_gallery_style = false）
   - 全投稿タイプ・固定ページ共通。.entry-body 配下に限定（ヘッダー・フッター・サイドバー・カードには効かせない）
   - 列：既定 3 列、992px 以上 4 列、768px 以下 2 列。columns=2 の指定（.gallery-columns-2）は常に 2 列、
     columns=1（.gallery-columns-1）は 1 列を尊重。4・6・7 等の指定は既定（画面幅で決まる）
   - 写真は 4:3・object-fit: cover・枠線なし。角は既存カード（front.css .work-image・lower.css .section-card）と同じく付けない
   - 本体は <dl> 形式（Lightning G3 が html5 ギャラリーを宣言していないため）。dt/dd の既定余白と
     列ごとの <br style="clear: both"> を打ち消す
   ========================================================================== */
.entry-body .gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px;
  margin: 0 0 var(--vk-margin-element-bottom, 1.5rem);
}

.entry-body .gallery.gallery-columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.entry-body .gallery.gallery-columns-1 {
  grid-template-columns: 1fr;
}

/* 列ごとの <br style="clear: both"> がグリッドの 1 マスを取らないようにする */
.entry-body .gallery > br {
  display: none;
}

/* Lightning: dl { margin-bottom: 1.5rem } dt { font-weight: 700; margin-bottom: .5em } を打ち消す */
.entry-body .gallery .gallery-item {
  margin: 0;
  min-width: 0;
}

.entry-body .gallery .gallery-icon {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--color-gray-bg);
  font-weight: 400;
  line-height: 0;
}

.entry-body .gallery .gallery-icon a {
  display: block;
  width: 100%;
  height: 100%;
}

/* 本体の 2px 灰色枠線は <style> ごと止めているが、念のため border: 0 */
.entry-body .gallery .gallery-icon img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border: 0;
  border-radius: 0;
}

/* 縦位置の写真（本体が .gallery-icon に付ける .portrait）は 4:3 で上下が切れるので、上寄りで切り抜く（頭が切れにくい） */
.entry-body .gallery .gallery-icon.portrait img {
  object-position: 50% 25%;
}

/* キャプション（dd.gallery-caption）は小さめ・中央。キャプションが無い写真は dd 自体が出ないので余白は生じない */
.entry-body .gallery .gallery-caption {
  margin: 0.4em 0 0;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-light);
  text-align: center;
}

/* ギャラリー同士の縦の余白（前後の段落とは Lightning の p { margin-bottom: 1.5rem } と .gallery の margin-bottom で空く） */
.entry-body .gallery + .gallery {
  margin-top: calc(-1 * var(--vk-margin-element-bottom, 1.5rem) + 16px);
}

@media (min-width: 992px) {
  .entry-body .gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .entry-body .gallery.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .entry-body .gallery.gallery-columns-1 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .entry-body .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 8px;
  }

  .entry-body .gallery.gallery-columns-1 {
    grid-template-columns: 1fr;
  }

  .entry-body .gallery .gallery-caption {
    font-size: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   ひな形ページ用のクラス（決定 D10。instructions/20261110-001 2-3 の本文 HTML で使う）
   .entry-body 配下に限定。ヘッダーの <li class="contact-btn">（header.php）には効かせない
   -------------------------------------------------------------------------- */
.entry-body .lead {
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.9;
}

.entry-body .contact-lead {
  margin: 2.5rem 0 1rem;
  text-align: center;
}

.entry-body .contact-btn {
  margin-bottom: 2rem;
  text-align: center;
}

.entry-body .contact-btn .btn {
  padding: 0.8em 2.5em;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 0;
}

.entry-body .contact-btn .btn:hover,
.entry-body .contact-btn .btn:focus-visible {
  background-color: var(--color-accent-gold);
  border-color: var(--color-accent-gold);
  color: var(--color-white);
}
