/*
Theme Name: LHH
Description: Lightweight standalone theme for 聯興行建築材料有限公司 Luen Hing Hong Building Materials Ltd. Recreates the previous Flatsome design without a page builder.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: lhh
*/

:root{
  --accent:#62bbde; --accent-dark:#3a9cc4; --text:#666; --text-soft:#777; --head:#555;
  --line:#ececec; --grey:#f5f5f5; --grey-2:#f0f0f0; --footer:#323232; --footer-bottom:#212121;
  --navy:#0a3a73; --w:1080px; --hdr:100px; --hdr-sticky:70px;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:Lato,"Noto Sans TC","PingFang TC","Microsoft JhengHei",sans-serif;font-size:16px;line-height:1.6;color:var(--text-soft);background:#fff}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent-dark);text-decoration:none}
a:hover{color:var(--accent)}
h1,h2,h3,h4,h5,h6{color:var(--head);font-weight:700;line-height:1.3;margin:0 0 .6em}
h1{font-size:2em}h2{font-size:1.6em}h3{font-size:1.25em}h4{font-size:1.1em}
p{margin:0 0 1.1em}
table{width:100%;border-collapse:collapse;margin:0 0 1.2em;font-size:.9em}
td,th{padding:.45em .3em;border-bottom:1px solid var(--line);text-align:left}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link:focus{position:fixed;left:8px;top:8px;z-index:999;background:#fff;padding:8px 12px;clip:auto;width:auto;height:auto}
.container{max-width:var(--w);margin:0 auto;padding:0 15px}

/* Header */
.site-header{overflow-anchor:none;position:sticky;top:0;z-index:50;background:#fff;transition:box-shadow .2s}
.admin-bar .site-header{top:32px}
.site-header.is-stuck{box-shadow:0 1px 3px rgba(0,0,0,.12)}
.header-inner{display:flex;align-items:center;gap:30px;height:var(--hdr);transition:height .2s}
.is-stuck .header-inner{height:var(--hdr-sticky)}
.site-logo img{width:200px;height:auto;transition:width .2s}
.is-stuck .site-logo img{width:140px}
.main-nav{flex:1}
.main-nav ul{list-style:none;margin:0;padding:0}
.main-nav>ul{display:flex;gap:22px}
.main-nav li{position:relative}
.main-nav>ul>li>a{display:block;padding:10px 0;font-weight:700;font-size:15px;color:rgba(102,102,102,.85);letter-spacing:.02em}
.main-nav>ul>li>a:hover,.main-nav .current-menu-item>a,.main-nav .current-menu-ancestor>a{color:#333}
.main-nav .menu-item-has-children>a::after{content:"";display:inline-block;width:5px;height:5px;margin:0 0 3px 5px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:rotate(45deg);opacity:.7}
.main-nav .sub-menu{position:absolute;left:-15px;top:100%;min-width:200px;background:#fff;box-shadow:1px 1px 15px rgba(0,0,0,.15);padding:8px 0;opacity:0;visibility:hidden;transition:opacity .15s}
.main-nav li:hover>.sub-menu,.main-nav li:focus-within>.sub-menu{opacity:1;visibility:visible}
.main-nav .sub-menu .sub-menu{left:100%;top:-8px}
.main-nav .sub-menu a{display:block;padding:8px 20px;color:#555;font-size:14px}
.main-nav .sub-menu a:hover{background:var(--grey)}
.header-search{position:relative}
.header-search button,.nav-toggle{background:none;border:0;padding:8px;cursor:pointer;color:#777}
.header-search form{position:absolute;right:0;top:100%;display:none;background:#fff;box-shadow:1px 1px 15px rgba(0,0,0,.15);padding:10px;width:260px}
.header-search.is-open form{display:flex}
.search-form{display:flex}
.search-form input[type=search]{flex:1;min-width:0;border:1px solid #ddd;padding:8px 10px;font:inherit;font-size:14px}
.search-form button{background:var(--accent);color:#fff;border:0;padding:0 12px;cursor:pointer}
.nav-toggle{display:none}
.nav-toggle span,.nav-toggle span::before,.nav-toggle span::after{display:block;width:22px;height:2px;background:#666;position:relative;content:""}
.nav-toggle span::before{position:absolute;top:-7px}.nav-toggle span::after{position:absolute;top:7px}

/* Banners (from Flatsome ux_banner / text_box) */
.lhh-banner{position:relative;width:100%;height:var(--h,300px);background-color:#444;background-size:cover;background-position:center;overflow:hidden}
.lhh-banner__overlay{position:absolute;inset:0}
.lhh-banner__inner{position:relative;max-width:var(--w);height:100%;margin:0 auto;padding:0 15px}
.lhh-textbox{position:absolute;width:var(--bw,60%);left:var(--bx,50%);top:var(--by,50%);transform:translate(calc(var(--bx,50%) * -1),calc(var(--by,50%) * -1));color:#fff;z-index:1}
.lhh-textbox.is-dark-text{color:var(--head)}
.lhh-textbox h1,.lhh-textbox h2,.lhh-textbox h3,.lhh-textbox h4{color:inherit}
.lhh-textbox.is-dark-text h1,.lhh-textbox.is-dark-text h2,.lhh-textbox.is-dark-text h3,.lhh-textbox.is-dark-text h4{color:var(--head)}
.lhh-textbox .page-title-text{font-size:280%;margin:10px 60px;line-height:1.3;font-weight:400}
.lhh-home .lhh-banner{--h:calc(100vh - var(--hdr))}
.lhh-card{background:rgba(255,255,255,.9);border-radius:3px;box-shadow:0 1px 3px rgba(0,0,0,.12);color:var(--text-soft)}
.lhh-card h1,.lhh-card h2,.lhh-card h3,.lhh-card h4,.lhh-card h5{color:#333}

/* Grid (from row / col) */
.lhh-row{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:30px;max-width:var(--w);margin:0 auto;padding:0 15px}
.lhh-row .lhh-row{padding:0;max-width:none}
.lhh-row.is-collapse{column-gap:0}
.lhh-row.is-small{column-gap:20px}
.lhh-row.is-full{max-width:none}
.lhh-row.v-center{align-items:center}
.lhh-row.v-bottom{align-items:end}
.lhh-col{grid-column:span var(--span,12);min-width:0;padding:var(--pad,0 0 30px)}
.lhh-row.is-divided>.lhh-col+.lhh-col{border-left:1px solid var(--line)}
.lhh-col.align-center{text-align:center}
.lhh-col.align-right{text-align:right}
.lhh-gap{height:30px}
.lhh-divider{border:0;border-top:3px solid rgba(0,0,0,.1);width:30px;margin:1em 0}
.lhh-divider.is-full{width:100%;border-top-width:1px}
.lhh-section{position:relative;background-size:cover;background-position:center;padding:30px 0}
.lhh-img{margin:0 0 1em}
.lhh-img img{width:100%}
.lhh-imgbox{margin:0 0 20px}
.lhh-imgbox img{width:100%;aspect-ratio:4/3;object-fit:cover}
.lhh-imgbox__text{padding:10px 0;text-align:center}
.lhh-imgbox__text h4{font-size:15px;font-weight:400;color:#333;margin:0}
.lhh-title{font-size:1.15em;margin:0 0 .8em;padding-bottom:.4em;border-bottom:2px solid var(--line)}
.lhh-subhead{font-size:1em;font-weight:700;color:#333;margin:0 0 .6em}
.lhh-btn{display:inline-block;background:var(--accent);color:#fff;font-weight:700;padding:.45em 1.2em;border-radius:3px;box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.22);transition:box-shadow .2s,transform .2s}
.lhh-btn:hover{color:#fff;box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);transform:translateY(1px)}
.lhh-btn.is-outline{background:none;color:#999;border:2px solid #ccc;box-shadow:none;font-size:12px;padding:.2em .9em;font-weight:400}

/* Tabs and accordions */
.lhh-tabs__title{font-size:1.1em;margin:10px 0}
.lhh-tabs__nav{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 20px}
.lhh-tabs__nav button{font:inherit;font-size:13px;background:#e9e9e9;border:0;border-top:2px solid transparent;padding:8px 26px;color:#555;cursor:pointer;min-width:110px}
.lhh-tabs__nav button[aria-selected=true]{background:#fff;border-top-color:var(--accent);color:#222}
.lhh-tabs__panel[hidden]{display:none}
.lhh-acc{border-top:1px solid #ddd;margin:0}
.lhh-acc:last-child{border-bottom:1px solid #ddd}
.lhh-acc summary{cursor:pointer;padding:10px 12px;color:var(--accent-dark);list-style:none;font-size:1.05em}
.lhh-acc summary::-webkit-details-marker{display:none}
.lhh-acc summary::before{content:"";display:inline-block;width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin:0 12px 2px 2px;transition:transform .2s}
.lhh-acc[open] summary{background:#f2f8fb;border-top:2px solid var(--accent)}
.lhh-acc[open] summary::before{transform:rotate(45deg)}
.lhh-acc__body{padding:12px}
.lhh-acc iframe,.entry-content iframe{width:100%;max-width:100%;border:0;min-height:320px}

/* Page chrome */
.breadcrumb{font-size:13px;color:#999;margin:10px 0 20px}
.breadcrumb a{color:#555}
.page-wrap{padding:30px 0 60px}
.entry-content>*:last-child{margin-bottom:0}
.content-plain{max-width:var(--w);margin:0 auto;padding:30px 15px 60px}
.layout-sidebar{display:grid;grid-template-columns:200px minmax(0,1fr);gap:30px;max-width:var(--w);margin:0 auto;padding:30px 15px 60px}
.sidebar h3{font-size:14px;font-weight:400;color:#555;margin:0 0 12px;padding-bottom:10px;position:relative}
.sidebar h3::after{content:"";position:absolute;left:0;bottom:0;width:25px;height:3px;background:rgba(0,0,0,.1)}
.sidebar ul{list-style:none;margin:0 0 30px;padding:0}
.sidebar li{padding:5px 0;border-bottom:1px solid var(--line);font-size:14px}
.sidebar li span{color:#999}
.post-card{background:#fff;box-shadow:0 1px 3px -2px rgba(0,0,0,.12),0 1px 6px rgba(0,0,0,.16);padding:15px;margin:0 0 25px}
.post-card h2{font-size:15px;margin:0 0 4px}
.post-card h2 a{color:#555}
.post-meta{font-size:11px;color:#999;margin:0 0 6px}
.post-meta::after{content:"";display:block;width:20px;height:2px;background:rgba(0,0,0,.1);margin:6px 0 0}
.post-card p{font-size:13px;margin:0 0 12px}
.single-post .entry-title{font-size:1.6em}
.pagination{display:flex;gap:6px;margin:20px 0}
.pagination a,.pagination span{border:2px solid #ddd;padding:2px 10px;font-size:13px}
.pagination .current{background:var(--accent);border-color:var(--accent);color:#fff}

/* Contact Form 7 */
.wpcf7 label{display:block;font-weight:700;font-size:.9em;color:#222;margin-bottom:4px}
.wpcf7 input[type=text],.wpcf7 input[type=email],.wpcf7 input[type=tel],.wpcf7 input[type=date],.wpcf7 select,.wpcf7 textarea{width:100%;border:1px solid #ddd;box-shadow:inset 0 1px 2px rgba(0,0,0,.1);padding:8px 10px;font:inherit;font-size:.95em;margin-bottom:14px;background:#fff}
.wpcf7 input[type=submit]{background:var(--accent);color:#fff;border:0;padding:10px 28px;font:inherit;font-weight:700;border-radius:3px;cursor:pointer}
.wpcf7 .wpcf7-list-item{display:block;margin:0 0 8px}
.wpcf7-not-valid-tip{font-size:.85em}

/* Housing project list */
.lhh-districts{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:20px;margin:20px 0}
.lhh-district{background:var(--grey);padding:15px}
.lhh-district h3{color:#b40000;font-size:1.05em;margin:0 0 8px}
.lhh-district ul{margin:0;padding-left:18px;font-size:14px}

/* Footer */
.site-footer{background:var(--footer);color:rgba(255,255,255,.8);font-size:15px}
.footer-widgets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:30px;padding:40px 15px 25px;max-width:var(--w);margin:0 auto}
.footer-widgets h3{color:#fff;font-size:15px;margin:0 0 15px;padding-bottom:12px;position:relative}
.footer-widgets h3::after{content:"";position:absolute;left:0;bottom:0;width:25px;height:3px;background:rgba(255,255,255,.3)}
.footer-widgets ul{list-style:none;margin:0;padding:0}
.footer-widgets li{border-bottom:1px solid rgba(255,255,255,.08);padding:6px 0}
.footer-widgets li:last-child{border-bottom:0}
.footer-widgets a{color:rgba(255,255,255,.85)}
.footer-widgets a:hover{color:#fff}
.footer-logos{display:flex;gap:30px;align-items:center;padding:0 15px 30px;max-width:var(--w);margin:0 auto}
.footer-logos img{max-height:80px;width:auto}
.footer-bottom{background:var(--footer-bottom);color:rgba(255,255,255,.5);font-size:13px;text-transform:uppercase}
.footer-bottom .container{padding-top:15px;padding-bottom:15px}
.footer-bottom ul{list-style:none;margin:0 0 6px;padding:0 0 6px;display:flex;gap:12px;border-bottom:1px solid rgba(255,255,255,.08);width:max-content;max-width:100%;font-size:11px}
.footer-bottom a{color:rgba(255,255,255,.5)}
.footer-bottom a:hover{color:#fff}

/* Visibility (from Flatsome) */
.lhh-show-sm,.lhh-show-md{display:none}

/* Responsive */
@media (max-width:849px){
  :root{--hdr:70px}
  .lhh-hide-md{display:none}
  .lhh-show-md{display:block}
  .nav-toggle{display:block;order:-1}
  .header-inner{gap:10px;justify-content:space-between}
  .site-logo img{width:140px}
  .main-nav{position:fixed;inset:var(--hdr) 0 0 0;background:#fff;overflow:auto;display:none;padding:10px 20px 40px}
  .admin-bar .main-nav{top:calc(var(--hdr) + 46px)}
  .nav-open .main-nav{display:block}
  .main-nav>ul{flex-direction:column;gap:0}
  .main-nav>ul>li>a{padding:12px 0;border-bottom:1px solid var(--line)}
  .main-nav .sub-menu{position:static;opacity:1;visibility:visible;box-shadow:none;padding:0 0 0 15px}
  .lhh-banner{height:var(--h-sm,var(--h,300px))}
  .lhh-textbox{width:var(--bw-sm,90%);left:var(--bx-sm,50%);top:var(--by-sm,var(--by,50%));transform:translate(calc(var(--bx-sm,50%) * -1),calc(var(--by-sm,var(--by,50%)) * -1))}
  .lhh-textbox .page-title-text{font-size:200%;margin:10px 20px}
  .lhh-col{grid-column:span var(--span-sm,12)}
  .lhh-row.is-divided>.lhh-col+.lhh-col{border-left:0}
  .layout-sidebar{grid-template-columns:1fr}
  .layout-sidebar .sidebar{order:2}
  .footer-widgets{grid-template-columns:1fr 1fr}
}
@media (max-width:549px){
  .footer-widgets{grid-template-columns:1fr}
  .lhh-hide-sm{display:none}
  .lhh-show-sm{display:block}
  .lhh-home .lhh-banner{--h:auto;min-height:calc(100vh - var(--hdr));padding:30px 0}
  .lhh-home .lhh-textbox{position:relative;left:auto;top:auto;transform:none;width:100%;margin:0 0 20px!important}
}
@media (min-width:850px) and (max-width:1100px){
  .lhh-textbox{left:var(--bx-md,var(--bx,50%));transform:translate(calc(var(--bx-md,var(--bx,50%)) * -1),calc(var(--by,50%) * -1))}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
