/*
Theme Name: 995 Lite
Theme URI: https://www.995law.tw/
Description: 995律師 輕量手刻主題 — 取代 Elementor/Flatsome 的精簡前端。保留 WP 後台、文章系統、Yoast SEO 與所有對外網址。經典主題（Classic Theme）寫法。
Author: 創意數位科技
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: gc995-lite
Tags: classic, lightweight, custom
*/

/* =========================================================
   Design tokens
   ========================================================= */
:root{
  --gold:#E2A84D;
  --gold-dark:#c8902f;
  --navy:#34495E;
  --navy-dark:#2b3c4e;
  --text:#333333;
  --muted:#8E8E93;
  --line:#E5E5E5;
  --cta-red:#E60012;       /* 立即諮詢 */
  --line-green:#5FB236;    /* LINE 諮詢 */
  --email-gold:#D2A24C;    /* Email 諮詢 */
  --white:#ffffff;
  --header-h:84px;
  --container:1200px;
  --font:"Noto Sans TC","PingFang TC","Microsoft JhengHei",-apple-system,"Helvetica Neue",sans-serif;
}

/* =========================================================
   Reset / base
   ========================================================= */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family:var(--font);
  font-size:16px;
  line-height:1.7;
  color:var(--text);
  background:#fff;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
svg{display:block}
a{color:var(--navy);text-decoration:none;transition:color .2s}
a:hover{color:var(--gold)}
ul{margin:0;padding:0;list-style:none}
h1,h2,h3,h4{margin:0 0 .5em;line-height:1.35;color:var(--navy);font-weight:700}
button{font-family:inherit;cursor:pointer}

/* inline SVG icons — single colour via currentColor */
.gc-icon{width:1em;height:1em;display:inline-block;vertical-align:-.125em;fill:currentColor;flex:0 0 auto}

.container{max-width:var(--container);margin:0 auto;padding:0 20px}
.skip-link{position:absolute;left:-9999px;top:0;background:var(--gold);color:#fff;padding:8px 16px;z-index:1000}
.skip-link:focus{left:0}
.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* =========================================================
   Header
   ========================================================= */
.site-header{
  position:sticky;top:0;z-index:200;
  background:#fff;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
}
.header-inner{
  display:flex;align-items:center;gap:24px;
  height:var(--header-h);
}
.site-logo{flex:0 0 auto}
.site-logo img{width:150px;height:auto}

.primary-nav{margin-left:auto}
.primary-nav > ul{display:flex;align-items:center;gap:4px}
.primary-nav .menu-item > a{
  display:block;padding:10px 16px;
  color:var(--navy);font-size:16px;font-weight:500;
  /* animated gold underline (background avoids clashing with caret ::after) */
  background-image:linear-gradient(var(--gold),var(--gold));
  background-size:0% 2px;background-position:center bottom 4px;background-repeat:no-repeat;
  transition:background-size .25s ease,color .2s;
}
.primary-nav > ul > .menu-item:hover > a,
.primary-nav > ul > .menu-item.current-menu-item > a{color:var(--gold)}
.primary-nav > ul > .menu-item:hover > a,
.primary-nav > ul > .menu-item.current-menu-item > a{background-size:calc(100% - 32px) 2px}

/* dropdowns */
.primary-nav .menu-item-has-children{position:relative}
.primary-nav .menu-item-has-children > a{padding-right:28px}
.primary-nav .menu-item-has-children > a::after{
  content:"";display:block;position:absolute;right:12px;top:50%;
  border:5px solid transparent;border-top-color:currentColor;
  transform:translateY(-2px);transition:transform .25s;
}
.primary-nav .menu-item-has-children:hover > a::after{transform:translateY(-6px) rotate(180deg)}
.primary-nav .sub-menu{
  position:absolute;top:100%;left:0;min-width:200px;
  background:#fff;box-shadow:0 8px 24px rgba(0,0,0,.12);
  border-top:3px solid var(--gold);
  padding:8px 0;opacity:0;visibility:hidden;transform:translateY(8px);
  transition:.18s;z-index:10;
}
.primary-nav .menu-item-has-children:hover > .sub-menu{opacity:1;visibility:visible;transform:translateY(0)}
.primary-nav .sub-menu a{display:block;padding:9px 20px;color:var(--text);font-size:15px;white-space:nowrap}
.primary-nav .sub-menu a:hover{color:var(--gold);background:#faf6ee}
/* 中和舊版外掛殘留的全域 li{margin-left:22px}，移除下拉選單左側空白 */
.primary-nav .sub-menu li{margin-left:0}

/* header CTA — 品牌金色膠囊 + 對話 icon */
.header-cta{
  display:inline-flex;align-items:center;gap:7px;
  background:var(--gold);color:#fff!important;
  padding:11px 26px;border-radius:50px;font-weight:700;font-size:15px;
  white-space:nowrap;box-shadow:0 4px 12px rgba(226,168,77,.4);
  transition:background .2s,box-shadow .2s,transform .2s;
}
.header-cta::before{
  content:"";width:16px;height:16px;flex:0 0 auto;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.header-cta:hover{background:var(--navy);color:#fff;box-shadow:0 6px 16px rgba(52,73,94,.32);transform:translateY(-1px)}

/* 公司查詢（主選單最右、立即諮詢左側）— 與其他選單項目同樣式（純文字 + 金色底線） */
.header-search-btn{
  display:block;padding:10px 16px;white-space:nowrap;
  color:var(--navy);font-size:16px;font-weight:500;
  background-image:linear-gradient(var(--gold),var(--gold));
  background-size:0% 2px;background-position:center bottom 4px;background-repeat:no-repeat;
  transition:background-size .25s ease,color .2s;
}
.header-search-btn:hover{color:var(--gold);background-size:calc(100% - 32px) 2px}
.drawer-btn-search{background:transparent;border:1.5px solid rgba(255,255,255,.4);box-shadow:none}
.drawer-btn-search:hover{background:rgba(255,255,255,.12);border-color:var(--gold);color:var(--gold)!important}

/* hamburger */
.nav-toggle{display:none;border:0;background:none;padding:8px;line-height:0}
.nav-toggle span{display:block;width:26px;height:2px;background:var(--navy);margin:5px 0;transition:.2s}

/* =========================================================
   Mobile off-canvas
   ========================================================= */
.mobile-drawer{
  position:fixed;top:0;left:0;bottom:0;width:100%;max-width:420px;
  background:linear-gradient(180deg,#3b5168 0%,var(--navy) 100%);
  z-index:400;padding:0 0 28px;overflow-y:auto;
  transform:translateX(-100%);transition:transform .28s ease;
  box-shadow:2px 0 28px rgba(0,0,0,.35);
}
.mobile-drawer.open{transform:translateX(0)}
.drawer-overlay{
  position:fixed;inset:0;background:rgba(15,22,30,.55);z-index:350;
  opacity:0;visibility:hidden;transition:.28s;
}
.drawer-overlay.open{opacity:1;visibility:visible}

/* drawer header: logo + close */
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;margin-bottom:8px}
.drawer-logo img{width:120px;height:auto;display:block}
.drawer-close{
  width:40px;height:40px;border:0;border-radius:50%;background:rgba(255,255,255,.14);
  color:#fff;font-size:24px;line-height:1;cursor:pointer;flex:0 0 auto;
  display:flex;align-items:center;justify-content:center;transition:background .2s;
}
.drawer-close:hover{background:rgba(255,255,255,.26)}

/* menu */
.mobile-drawer .drawer-menu{flex-direction:column}
.mobile-drawer .menu-item{position:relative;border-top:1px solid rgba(255,255,255,.1)}
.mobile-drawer .menu-item:last-of-type{border-bottom:1px solid rgba(255,255,255,.1)}
.mobile-drawer .menu-item > a{
  display:block;padding:17px 52px 17px 24px;color:#fff;font-weight:500;font-size:17px;letter-spacing:.5px;
}
.mobile-drawer .menu-item > a:hover,
.mobile-drawer .menu-item.current-menu-item > a{color:var(--gold)}
.mobile-drawer .sub-menu{display:none;background:rgba(0,0,0,.16);padding:4px 0}
.mobile-drawer .sub-menu a{padding:13px 24px 13px 38px;font-weight:400;font-size:15px;color:rgba(255,255,255,.82)}
.mobile-drawer .sub-menu a:hover{color:var(--gold)}
.mobile-drawer .menu-item-has-children.open > .sub-menu{display:block}
/* chevron toggle */
.mobile-drawer .sub-toggle{
  position:absolute;top:0;right:0;width:52px;height:58px;
  border:0;background:none;padding:0;cursor:pointer;
}
.mobile-drawer .sub-toggle::after{
  content:"";position:absolute;top:50%;left:50%;width:9px;height:9px;
  border-right:2px solid rgba(255,255,255,.7);border-bottom:2px solid rgba(255,255,255,.7);
  transform:translate(-50%,-65%) rotate(45deg);transition:transform .25s;
}
.mobile-drawer .menu-item-has-children.open > .sub-toggle::after{
  transform:translate(-50%,-35%) rotate(-135deg);border-color:var(--gold)
}

/* bottom CTAs (gcreate 風格雙金鈕) */
.drawer-cta{padding:24px 22px 0;display:flex;flex-direction:column;gap:14px}
.drawer-btn{
  display:flex;align-items:center;justify-content:center;gap:8px;
  background:var(--gold);color:#fff!important;padding:15px;border-radius:50px;
  font-size:17px;font-weight:700;box-shadow:0 4px 14px rgba(226,168,77,.3);transition:background .2s;
}
.drawer-btn:hover{background:var(--gold-dark);color:#fff}
.drawer-btn .gc-icon{width:18px;height:18px}
.drawer-btn-line{background:var(--line-green);box-shadow:0 4px 14px rgba(95,178,54,.3)}
.drawer-btn-line:hover{background:#52a02f}

/* =========================================================
   Footer
   ========================================================= */
.site-footer{background:var(--navy);color:rgba(255,255,255,.75);font-size:14px;padding:56px 0 28px}
.footer-grid{display:grid;grid-template-columns:1.3fr 1fr 1.2fr;gap:40px}
.site-footer a{color:rgba(255,255,255,.75)}
.site-footer a:hover{color:var(--gold)}
.footer-logo img{width:160px;margin-bottom:18px}
.footer-copy{font-size:13px;color:rgba(255,255,255,.55);margin-bottom:18px}
.footer-legal{display:flex;gap:14px;flex-wrap:wrap;font-size:13px}
.footer-col h4{color:#fff;font-size:16px;margin-bottom:18px;font-weight:500}
.footer-contact li{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.footer-contact .ico{color:var(--gold);flex:0 0 auto;display:inline-flex}
.footer-contact .ico .gc-icon{width:16px;height:16px}
.footer-partners{margin-top:10px}
.footer-partners .label{display:block;margin-bottom:6px}
.region-grid{display:grid;grid-template-columns:repeat(4,auto);gap:8px 16px;justify-content:start}
.region-grid span{color:rgba(255,255,255,.7)}

/* =========================================================
   Floating CTAs
   ========================================================= */
/* desktop round LINE button */
.line-float{
  position:fixed;right:20px;bottom:110px;z-index:150; /* 110px：讓出下方 scroll-top 按鈕（48px@marginY:50）的位置 */
  width:74px;height:74px;border-radius:50%;
  background:var(--gold);color:#fff!important;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  font-weight:700;box-shadow:0 6px 18px rgba(0,0,0,.25);text-align:center;line-height:1.2;
}
.line-float small{font-size:11px;font-weight:400}
.line-float:hover{background:var(--gold-dark);color:#fff}

/* mobile sticky consult bar */
.consult-bar{display:none;position:fixed;left:0;right:0;bottom:0;z-index:160}
.consult-bar a{
  flex:1;display:flex;align-items:center;justify-content:center;gap:8px;
  padding:16px 8px;color:#fff!important;font-weight:700;font-size:16px;
}
.consult-bar .c-line{background:var(--line-green)}
.consult-bar .c-mail{background:var(--email-gold)}
.consult-bar .gc-icon{width:20px;height:20px}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width:1024px){
  :root{--header-h:64px}
  .primary-nav,.header-cta,.header-search-btn{display:none}
  .nav-toggle{display:block;margin-left:auto}
  .header-inner{justify-content:space-between;gap:12px}
  .site-logo img{width:120px}
  .footer-grid{grid-template-columns:1fr;gap:32px}
  .line-float{bottom:110px;width:62px;height:62px}
  .line-float small{font-size:10px}
  .consult-bar{display:flex}
}
