/*
Theme Name: 玉川電化センター
Theme URI: https://tamagawadenkacenter.com/
Author: 有限会社玉川電化センター
Description: 有限会社玉川電化センター（大分県別府市）オリジナルテーマ。完成済みデザインをそのままWordPress化した軽量テーマです。
Version: 1.5.6
Requires at least: 6.3
Requires PHP: 7.4
Text Domain: tamagawa-denka
*/
:root{--dc-head:"M PLUS 2",sans-serif;--dc-body:"M PLUS 2",sans-serif}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:#fffaf1}
html{-webkit-text-size-adjust:100%;overflow-x:clip}
body{font-family:var(--dc-body);color:#26323d;-webkit-font-smoothing:antialiased;font-size:17px;line-height:1.9;letter-spacing:.04em;font-weight:500;overflow-x:clip}
a,:root a{color:#2a7bbf;text-decoration:none}
a:hover{color:#1d5f99}
img{max-width:100%}
.tgw-img{display:block;width:100%;height:100%;object-fit:cover;background:#e9eef2;opacity:0;transition:opacity .6s ease}
.tgw-img.is-loaded,.tgw-img[fetchpriority="high"]{opacity:1}
@media (prefers-reduced-motion:reduce){.tgw-img{opacity:1;transition:none}}
button,input,select,textarea{font-family:inherit}

/* 改行ルール：見出しは文節単位＋最終行1〜2文字を防止／本文は右端まで詰める（balanceは使用しない） */
h1,h2,h3,h4,.tgw-hd{text-wrap:pretty;word-break:auto-phrase;line-break:strict}
h1 *,h2 *,h3 *,h4 *,.tgw-hd *{word-break:auto-phrase}
span,a,strong,div{text-wrap:pretty;word-break:auto-phrase;line-break:strict}
p,li,dd,dt,small,p *,li *,dd *{word-break:normal!important;text-wrap:wrap!important;line-break:strict}

.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip-link:focus{position:fixed;left:8px;top:8px;z-index:100;width:auto;height:auto;clip:auto;background:#fff;padding:8px 16px}

/* Header */
.tgw-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border-bottom:1px solid #e4e7ea}
.tgw-header__in{max-width:1360px;margin:0 auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:20px}
:root .tgw-logo{display:flex;align-items:center;gap:12px;color:#26323d}
:root .tgw-logo:hover{color:#26323d}
.tgw-logo__txt{display:flex;flex-direction:column;line-height:1.3;margin:0;font-size:inherit;font-weight:inherit}
:root .tgw-logo__sub{font-size:12px;color:#5b6773;letter-spacing:.1em}
.tgw-logo__name{font-family:var(--dc-head);font-weight:700;font-size:min(22px,calc((100vw - 200px)/12));letter-spacing:.08em;white-space:nowrap}
.tgw-logo img{display:block;width:auto;height:40px}
.tgw-nav{flex:1;min-width:0}
.tgw-nav ul{margin:0;padding:0;list-style:none}
.tgw-nav>ul{display:flex;justify-content:center;gap:4px}
:root .tgw-nav__a{display:flex;align-items:center;gap:6px;padding:12px;color:#26323d;font-weight:500;font-size:15px;white-space:nowrap;cursor:pointer}
:root .tgw-nav__a:hover{color:#2a7bbf}
:root .tgw-nav .is-current>.tgw-nav__a{color:#2a7bbf;font-weight:700;border-bottom:2px solid #2a7bbf}
.tgw-nav__parent{cursor:default}
.tgw-nav li{position:relative}
.tgw-nav .tgw-sub{position:absolute;top:100%;left:0;min-width:260px;padding:8px 0;background:#fff;border:1px solid #e4e7ea;border-radius:8px;box-shadow:0 12px 32px rgba(31,68,99,.12);z-index:60;display:none}
.tgw-nav li:hover>.tgw-sub,.tgw-nav li:focus-within>.tgw-sub{display:block}
:root .tgw-sub a{display:block;padding:10px 20px;color:#26323d;font-size:16px}
:root .tgw-sub a:hover{background:#eef5fc;color:#2a7bbf}
.tgw-hright{display:flex;align-items:center;gap:16px;flex-shrink:0}
.tgw-hright__tel{display:flex;flex-direction:column;align-items:flex-end;line-height:1.3}
:root .tgw-hright__hours{font-size:11px;color:#5b6773;white-space:nowrap}
:root .tgw-hright__num{font-size:21px;font-weight:700;color:#1d5f99;letter-spacing:.04em;white-space:nowrap}
:root .tgw-btn-contact{display:inline-flex;align-items:center;gap:8px;background:#2a7bbf;color:#fff;padding:13px 20px;border-radius:6px;font-weight:700;font-size:15px;white-space:nowrap}
:root .tgw-btn-contact:hover{background:#1d5f99 !important;color:#fff !important}
:root .tgw-btn-contact,:root .tgw-btn-contact *{color:#fff !important;-webkit-text-fill-color:#fff}
.tgw-hmobile{display:none;align-items:center;gap:10px}
:root .tgw-hmobile__tel{width:52px;height:52px;border-radius:6px;background:#e8f2fb;color:#1d5f99;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;font-weight:700;line-height:1.2;gap:2px}
:root .tgw-menu-btn{width:52px;height:52px;border:none;background:#2a7bbf;color:#fff;border-radius:6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;padding:0}
.tgw-menu-btn__bars{position:relative;width:22px;height:14px}
.tgw-menu-btn__bars i{position:absolute;left:0;width:22px;height:2px;border-radius:1px;background:#fff;transition:transform .25s,opacity .25s,top .25s}
.tgw-menu-btn__bars i:nth-child(1){top:0}.tgw-menu-btn__bars i:nth-child(2){top:6px}.tgw-menu-btn__bars i:nth-child(3){top:12px}
.tgw-menu-btn__label{font-size:10px;font-weight:700;letter-spacing:.06em;line-height:1}
.is-menu-open .tgw-menu-btn__bars i:nth-child(1){top:6px;transform:rotate(45deg)}
.is-menu-open .tgw-menu-btn__bars i:nth-child(2){opacity:0}
.is-menu-open .tgw-menu-btn__bars i:nth-child(3){top:6px;transform:rotate(-45deg)}
.tgw-mnav{display:none;border-top:1px solid #eef0f2;background:#fff;padding:8px 24px 24px;max-height:calc(100vh - 80px);overflow-y:auto;box-shadow:0 16px 32px rgba(31,68,99,.12)}
.tgw-mnav__list{display:flex;flex-direction:column}
:root .tgw-mnav__a{padding:14px 0;border-bottom:1px solid #eef0f2;color:#26323d;font-weight:500}
:root .tgw-mnav__a.is-current{color:#2a7bbf;font-weight:700}
:root .tgw-mnav__label{padding:14px 0 6px;color:#26323d;font-weight:500}
.tgw-mnav__sub{display:grid;grid-template-columns:1fr 1fr;gap:4px 16px;padding:0 0 12px 14px;border-bottom:1px solid #eef0f2;font-size:15px}
:root .tgw-mnav__sub a{padding:8px 0;color:#4a5763}
:root .tgw-mnav__call{margin-top:20px;display:flex;justify-content:center;background:#2a7bbf;color:#fff;padding:14px;border-radius:6px;font-weight:700;font-size:18px}
:root .tgw-mnav__call:hover{color:#fff;background:#1d5f99}
@media (max-width:1179px){
.tgw-nav,.tgw-hright{display:none}
.tgw-hmobile{display:flex}
.is-menu-open .tgw-mnav{display:block}
[data-sdfmax]{max-width:none!important}
}
@media (max-width:767px){
.tgw-logo{gap:8px}
.tgw-logo svg,.tgw-logo img{width:36px!important;height:36px!important}
.tgw-logo__sub{font-size:10px}
}

/* Responsive helpers（インライン指定の上書きのため最小限の!importantを使用） */
@media (max-width:1023px){
.od2{order:2}
.od1{order:-1}
.c13{padding-left:13px!important;padding-right:13px!important}
}

/* Totop */
:root .tgw-totop{position:fixed;right:20px;bottom:20px;z-index:60;width:64px;height:64px;border-radius:50%;border:none;background:#2a7bbf;color:#fff;box-shadow:0 8px 24px rgba(31,68,99,.25);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s}
.tgw-totop.is-show{opacity:1;visibility:visible}
.tgw-totop:hover{background:#1d5f99}

/* Entry（お知らせ本文） */
:root .tgw-entry{color:#3b4853}
.tgw-entry>*{margin:0 0 1.2em}
:root .tgw-entry h2{font-size:clamp(22px,2.4vw,28px);line-height:1.6;color:#1e2a35;margin:2em 0 .8em;padding-bottom:.4em;border-bottom:2px solid #e8f2fb}
:root .tgw-entry h3{font-size:20px;line-height:1.6;color:#1d5f99;margin:1.8em 0 .6em}
.tgw-entry img{height:auto;border-radius:12px}
.tgw-entry ul,.tgw-entry ol{padding-left:1.4em}
.tgw-entry a{text-decoration:underline}
.tgw-pager{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:40px}
:root .tgw-pager .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:44px;padding:0 12px;border:1.5px solid #2a7bbf;border-radius:6px;color:#2a7bbf;font-weight:700}
:root .tgw-pager .page-numbers.current,:root .tgw-pager .page-numbers:hover{background:#2a7bbf;color:#fff}
.tgw-err[hidden]{display:none}

/* ホバー（デザインのhover指定をクラス化。インライン指定より優先させるため!important） */
.hv1:hover{background:#2a7bbf!important;color:#fff!important}
.hv2:hover{color:#2a7bbf!important}
.hv3:hover{background:#f3eee5!important;color:#1d5f99!important}
.hv4:hover{background:rgba(255,255,255,0.12)!important;color:#fff!important}
.hv5:hover{background:#1d5f99!important;color:#fff!important}
.hv6:hover{opacity:0.85!important}
.hv7:focus{outline:none!important;border-color:#2a7bbf!important}
.hv8:focus{outline:none!important;border-color:#2a7bbf!important;box-shadow:0 0 0 3px rgba(42,123,191,0.18)!important}
.hv9:hover{background:#1d5f99!important}
.hv10:hover{background:#1a4e7c!important;color:#fff!important}
:root .tgw-flink:hover{color:#fff!important}
:root .tgw-btn-line:hover{background:#2a7bbf!important;color:#fff!important}
:root .tgw-chip{display:inline-flex;align-items:center;padding:6px 16px;border-radius:20px;border:1.5px solid #2a7bbf;color:#2a7bbf;font-size:14px;font-weight:700;background:#fff}
:root .tgw-chip.is-on,:root .tgw-chip:hover{background:#2a7bbf;color:#fff}

/* TOP v3 アニメーション */
[data-reveal]{opacity:0;transform:translateY(48px);transition:opacity 1s cubic-bezier(.2,.7,.2,1),transform 1s cubic-bezier(.2,.7,.2,1)}
[data-reveal][data-in]{opacity:1;transform:none}
[data-mask]>span{transform:translateY(110%);transition:transform 1.1s cubic-bezier(.16,.8,.2,1)}
[data-mask][data-band]>span{transform:none;clip-path:inset(0 100% 0 0);transition:clip-path 1.1s cubic-bezier(.7,0,.2,1)}
[data-mask][data-in]>span{transform:none;clip-path:inset(0 0 0 0)}
@media (max-width:767px){[data-reveal]{transform:translateY(20px);transition-duration:.6s,.6s;transition-delay:0s!important}[data-mask]>span{transition-duration:.7s}}
@media (prefers-reduced-motion:reduce){[data-reveal],[data-mask]>span{opacity:1!important;transform:none!important;clip-path:none!important;transition:none!important}}
.hv11:hover{transform:translateY(-8px)!important;box-shadow:0 28px 56px rgba(31,68,99,0.16)!important}

/* WordPress標準スタイルの影響を打ち消す */
:root .tgw-entry a{text-decoration:underline}
body{margin:0!important}
main img:not(.tgw-img){height:auto}
