/*
Theme Name: 天ぷら えび福
Theme URI: https://ebifuku.example.jp/
Author: 天ぷら えび福
Description: 大分・中央町の天ぷら専門店「天ぷら えび福」公式サイト用オリジナルテーマ。墨黒・濃紺・白を基調とした明朝系の和モダンデザイン。
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tempura-ebifuku
Tags: restaurant, japanese, one-column, custom-logo, translation-ready
*/

html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: #0b0d10; overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }

@keyframes ebifuku-hero-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes ebifuku-hero-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ebifuku-scroll-line { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ホバー挙動（Designの style-hover を再現） */
.eb-navlink { transition: opacity .3s; }
.eb-navlink:hover { opacity: .5; }
.eb-line { transition: border-color .35s, letter-spacing .35s; }
.eb-line:hover { letter-spacing: .3em; border-color: #f2efe8; }
.eb-line--light:hover { border-color: #fff; }
.eb-hero-btn { transition: border-color .35s, letter-spacing .35s; }
.eb-hero-btn:hover { letter-spacing: .3em; border-color: #fff; }
.eb-submit { transition: background .35s, color .35s; }
.eb-submit:hover { background: transparent; color: #fff; }
.eb-input:focus { outline: none; border-color: #f2efe8; }


/* スマホ：本文は左右20pxまで使い、途中改行せず自然に折り返す */
@media (max-width: 1180px) {
  section { padding-left: 32px !important; padding-right: 32px !important; }
  header > div, footer > div, #ebifuku-drawer { padding-left: 32px !important; padding-right: 32px !important; }
  p:not([data-keep-br]) br, li br, dd br, span br { display: none; }
  p br + br, span br + br { display: block; }
  p, span, li, dd, div { text-wrap: wrap !important; }
  p { max-width: 100% !important; overflow-wrap: anywhere; }
  [style*="nowrap"]:not([style*="vertical-rl"]):not(h2) { white-space: normal !important; }
  h2[style*="nowrap"] { font-size: 15px !important; letter-spacing: .14em !important; }
}

/* スマホ：PC用の改行を無効化し、文章を自然に折り返す */
@media (max-width: 1180px) {
  br.pc-br { display: none; }
  /* 本文中の改行はスマホでは無効化し、画面幅いっぱいで自然に折り返す */
  p br, .eb-body br { display: none; }
  /* 段落区切り（連続した改行）は1つだけ残す */
  p br + br, .eb-body br + br { display: block; }
  p, .eb-body { text-wrap: pretty; overflow-wrap: anywhere; line-break: strict; }
  /* スマホのファーストビューは写真そのままの明るさで見せる */
  #ebifuku-hero-veil { background: linear-gradient(180deg, rgba(6,8,11,.17) 0%, rgba(6,8,11,.02) 40%, rgba(6,8,11,.2) 100%) !important; }
  #top { min-height: 72svh !important; max-height: 72svh !important; }
  #top > div[style*="z-index: 3"] { padding-left: 16px !important; padding-right: 12px !important; }
  #ebifuku-hero-copy { margin-right: 0 !important; }
  body { -webkit-text-size-adjust: 100%; }
}

/* スマホ：横長フレーム・縦書き・両端揃えの調整 */
@media (max-width: 1180px) {
  [style*="min-height: 240px"], [style*="min-height: 320px"] { min-height: 0 !important; }
  [style*="aspect-ratio: 21 / 9"] { aspect-ratio: 4 / 3 !important; }
  #ebifuku-signature-frame { aspect-ratio: 4 / 3 !important; min-height: 0 !important; }
  img, iframe { max-width: 100%; }
  p:not([style*="text-align"]):not([style*="vertical-rl"]) { text-align: left; }
  [style*="text-align: center"] p, [style*="text-align:center"] p { text-align: center !important; }
  [style*="clamp(32px,4vw,56px)"], [style*="clamp(32px, 4vw, 56px)"],
  [style*="clamp(28px,3.4vw,40px)"], [style*="clamp(28px, 3.4vw, 40px)"] { padding: 28px 24px !important; }
  /* スマホ：本文・小見出しの縦書きを横書きにして左右いっぱいで折り返す（キャッチのみ縦書き維持） */
  p[style*="vertical-rl"], h3[style*="vertical-rl"], span[style*="vertical-rl"] {
    writing-mode: horizontal-tb !important; text-orientation: mixed !important;
    height: auto !important; max-height: none !important; white-space: normal !important;
    letter-spacing: .06em !important; text-align: left;
  }
  p[style*="vertical-rl"] { font-size: 14.5px !important; line-height: 2.3 !important; }
  h3[style*="vertical-rl"] { font-size: 21px !important; line-height: 1.9 !important; letter-spacing: .06em !important; text-align: left !important; }
  span[style*="vertical-rl"] { font-size: 12px !important; letter-spacing: .2em !important; }
  [style*="row-reverse"]:not(#ebifuku-hero-copy) { flex-direction: column !important; align-items: flex-start !important; justify-content: flex-start !important; gap: 18px !important; }
  h1[style*="vertical-rl"] { line-height: 2 !important; letter-spacing: .2em !important; }
}

@media (max-width: 1180px) {
  p[style*="vertical-rl"] span, h3[style*="vertical-rl"] span {
    writing-mode: horizontal-tb !important; text-orientation: mixed !important;
    text-combine-upright: none !important; letter-spacing: .06em !important;
  }
  h3[style*="vertical-rl"] br { display: none; }
  h1[style*="vertical-rl"] span { text-orientation: upright; }
}

/* スマホ：text-wrap:pretty による右端の余りを解消し、右端まで使って折り返す */
@media (max-width: 1180px) {
  p, li, dd, h2, h3, span { text-wrap: wrap !important; }
}



/* ヘッダーを黒に／横スクロール防止 */
html { overflow-x: hidden; }
body > .eb-page, body > div { overflow-x: clip; }
#ebifuku-header { background: rgba(11,13,16,.96) !important; color: #fff; border-bottom: 1px solid rgba(255,255,255,.14); }
#ebifuku-header nav a span + span, #ebifuku-header > div > a span + span { color: #fff !important; }
#ebifuku-burger { border-color: rgba(255,255,255,.3) !important; }
#ebifuku-burger span { background: #fff !important; }

/* 白の面（情報セクション） */
[data-eb-light] { background: #f7f5f0 !important; }
[data-eb-light] *:not(img):not(image-slot) { color: #0b0d10 !important; border-color: rgba(11,13,16,.16) !important; }
[data-eb-light] a { border-color: rgba(11,13,16,.4) !important; }
[data-eb-light] a:hover { background: #0b0d10 !important; color: #fff !important; border-color: #0b0d10 !important; }
[data-eb-light] [style*="background: #01254c"], [data-eb-light] [style*="background: #01254c"] *:not(img):not(image-slot), [data-eb-light] [style*="background: rgb(1, 37, 76)"], [data-eb-light] [style*="background: rgb(1, 37, 76)"] *:not(img):not(image-slot),
[data-eb-light] [style*="background: #0b0d10"], [data-eb-light] [style*="background: #0b0d10"] *:not(img):not(image-slot), [data-eb-light] [style*="background: rgb(11, 13, 16)"], [data-eb-light] [style*="background: rgb(11, 13, 16)"] *:not(img):not(image-slot),
[data-eb-light] [style*="background: #101b2a"], [data-eb-light] [style*="background: #101b2a"] *:not(img):not(image-slot), [data-eb-light] [style*="background: rgb(16, 27, 42)"], [data-eb-light] [style*="background: rgb(16, 27, 42)"] *:not(img):not(image-slot),
[data-eb-light] [style*="background: rgba(1,37,76"], [data-eb-light] [style*="background: rgba(1,37,76"] *:not(img):not(image-slot), [data-eb-light] [style*="background: rgba(1, 37, 76"], [data-eb-light] [style*="background: rgba(1, 37, 76"] *:not(img):not(image-slot) { color: #fff !important; border-color: rgba(255,255,255,.24) !important; }
[data-eb-light] [style*="background: #01254c"] span[style*="italic"], [data-eb-light] [style*="background: rgb(1, 37, 76)"] span[style*="italic"], [data-eb-light] [style*="background: #0b0d10"] span[style*="italic"], [data-eb-light] [style*="background: rgb(11, 13, 16)"] span[style*="italic"], [data-eb-light] [style*="background: #101b2a"] span[style*="italic"], [data-eb-light] [style*="background: rgb(16, 27, 42)"] span[style*="italic"] { color: #fff !important; }


#eb-course-fuku, #eb-course-fuku * { color: #fff !important; border-color: rgba(255,255,255,.22) !important; }
#eb-course-fuku { border-color: rgba(255,255,255,.4) !important; }

@media (max-width: 700px) { #eb-master-row { flex-wrap: wrap !important; } }


  @media (max-width: 1180px) {
    #ebifuku-header { position: fixed !important; top: 0; left: 0; right: 0; padding-block: 0 !important; }
    #ebifuku-header > div:first-child { height: 64px; padding-top: 0 !important; padding-bottom: 0 !important; align-items: center !important; }
    #ebifuku-header + section, #ebifuku-header ~ section:first-of-type { margin-top: 64px; }
    .admin-bar #ebifuku-header { top: 32px; }
  }
  @media (max-width: 782px) { .admin-bar #ebifuku-header { top: 46px; } }

/* ヒーロー動画：1本に統一 */
@media (max-width: 760px) {
  #ebifuku-hero-media { inset: 0 !important; transform: none !important; }
  #ebifuku-hero-media video { object-position: center 35%; }
}

/* SEO 用：画面には表示せず検索エンジン・読み上げにのみ伝えるテキスト */
.eb-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; writing-mode: horizontal-tb !important; }
