/*
Theme Name: Broward County Fence
Theme URI: https://browardcountyfence.com/
Author: Trade Search Marketing
Author URI: https://tradesearchmarketing.com/
Description: Bespoke theme for Broward County Fence & Pergola. Replaces Hello Elementor + Elementor Pro theme templates (header, footer, archive, single-post) with real theme files, in the same design language as the rebuilt homepage. No page builder required.
Version: 1.0.0
Requires at least: 6.0
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: bcf
*/

/* ─────────────────────────────────────────────────────────────────────────
   Design tokens — identical to the rebuilt homepage's .bcf-home block, so the
   chrome and the page content read as one site.
   ───────────────────────────────────────────────────────────────────────── */
:root{
  --ink:#0c1a2a; --ink-soft:#16304b; --ink-deep:#071220;
  --accent:#1f7fd6; --accent-deep:#1565b8;
  --hi-vis:#ffc42e; --hi-vis-deep:#e8a800;
  --paper:#fbfaf6; --paper-cool:#f2f5f8; --white:#fff;
  --rule:#d9d7cf; --rule-cool:#d9e1e9; --muted:#5f6b78;
  --mono:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;
  --wrap:1200px;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--white);color:var(--ink);
  font-family:'Manrope',system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:17px;line-height:1.65;-webkit-font-smoothing:antialiased;
  overflow-x:clip;
}
img{max-width:100%;height:auto}
a{color:var(--accent-deep)}
:focus-visible{outline:3px solid var(--hi-vis);outline-offset:3px}
.wrap{max-width:var(--wrap);margin-inline:auto;padding-inline:clamp(1.25rem,4vw,2.5rem)}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}
.skip-link{position:absolute;left:-9999px}
.skip-link:focus{left:1rem;top:1rem;z-index:999;background:var(--hi-vis);color:var(--ink);padding:.75rem 1.25rem;border-radius:3px;font-weight:700}

/* the picket rule — the signature carried over from the homepage */
.picket{height:11px;width:100%;background:repeating-linear-gradient(90deg,var(--ink) 0 3px,transparent 3px 15px)}
.picket--hi{background:repeating-linear-gradient(90deg,var(--hi-vis) 0 3px,transparent 3px 15px)}

/* ── HEADER ─────────────────────────────────────────────────────────────── */
.topbar{background:var(--ink-deep);color:rgba(255,255,255,.72);font-family:var(--mono);font-size:.74rem;letter-spacing:.08em;text-transform:uppercase}
.topbar .wrap{display:flex;flex-wrap:wrap;gap:.4rem 1.75rem;align-items:center;justify-content:center;padding-block:.6rem}
.topbar a{color:rgba(255,255,255,.72);text-decoration:none}
.topbar a:hover{color:var(--hi-vis)}
.topbar .sep{opacity:.35}

.site-header{background:var(--white);border-bottom:1px solid var(--rule);position:relative;z-index:20}
.site-header .wrap{display:flex;align-items:center;gap:1.5rem;padding-block:.9rem}
.site-branding .brand-link{display:inline-flex;align-items:center;gap:.7rem;text-decoration:none;min-width:0}
.site-branding .site-logo{height:52px;width:auto;max-height:52px;display:block;flex:none}
.site-branding .site-title{font-family:'Archivo',sans-serif;font-weight:900;font-size:1.15rem;letter-spacing:-.02em;color:var(--ink);text-decoration:none}
@media(max-width:560px){
  .site-branding .site-logo{height:42px;max-height:42px}
  .site-branding .site-title{font-size:1.02rem}
}
@media(max-width:400px){
  .site-branding .site-logo{height:36px;max-height:36px}
  .site-branding .site-title{font-size:.94rem}
}
.header-cta{margin-left:auto;display:flex;align-items:center;gap:.75rem}
.header-cta .tel{font-family:'Archivo',sans-serif;font-weight:800;font-size:1.02rem;color:var(--ink);text-decoration:none;white-space:nowrap}
.header-cta .tel:hover{color:var(--accent-deep)}
.btn{
  display:inline-flex;align-items:center;gap:.5rem;white-space:nowrap;
  font-family:'Archivo',sans-serif;font-weight:700;font-size:.92rem;
  padding:.72rem 1.25rem;border-radius:3px;text-decoration:none;border:2px solid transparent;transition:.18s;
}
.btn svg{width:1.05em;height:1.05em;flex:none}
.btn-primary{background:var(--hi-vis);color:var(--ink);border-color:var(--hi-vis)}
.btn-primary:hover{background:var(--hi-vis-deep);border-color:var(--hi-vis-deep)}
.btn-ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.4)}
.btn-ghost:hover{border-color:#fff;background:rgba(255,255,255,.08)}
.btn-dark{background:var(--ink);color:#fff;border-color:var(--ink)}
.btn-dark:hover{background:var(--ink-soft);border-color:var(--ink-soft)}

/* nav */
.nav-toggle{display:none;background:none;border:1px solid var(--rule);border-radius:3px;padding:.55rem .7rem;cursor:pointer;align-items:center;gap:.5rem;font-family:'Archivo',sans-serif;font-weight:700;font-size:.85rem;color:var(--ink)}
.nav-toggle span{display:block;width:18px;height:2px;background:var(--ink);position:relative}
.nav-toggle span::before,.nav-toggle span::after{content:"";position:absolute;left:0;width:18px;height:2px;background:var(--ink)}
.nav-toggle span::before{top:-6px}.nav-toggle span::after{top:6px}
.site-nav{background:var(--ink);border-top:1px solid rgba(255,255,255,.08)}
.site-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center}
.site-nav li{position:relative}
.site-nav a{
  display:block;padding:.95rem 1.1rem;color:rgba(255,255,255,.88);text-decoration:none;
  font-family:'Archivo',sans-serif;font-weight:600;font-size:.88rem;letter-spacing:.01em;transition:.16s;
}
.site-nav a:hover,.site-nav .current-menu-item>a,.site-nav .current_page_item>a{color:var(--hi-vis)}
.site-nav .menu-item-has-children>a::after{content:"\25BE";font-size:.7em;margin-left:.4em;opacity:.7}
.site-nav ul ul{
  display:none;position:absolute;top:100%;left:0;min-width:230px;background:var(--ink);
  flex-direction:column;padding:.35rem 0;border:1px solid rgba(255,255,255,.1);border-radius:0 0 3px 3px;z-index:30;
}
.site-nav li:hover>ul,.site-nav li:focus-within>ul{display:flex}
.site-nav ul ul a{padding:.6rem 1.1rem;font-weight:500;font-size:.86rem}

@media(max-width:960px){
  .nav-toggle{display:inline-flex}
  .header-cta .tel{display:none}
  .site-nav{display:none}
  .site-nav.is-open{display:block}
  .site-nav ul{flex-direction:column;align-items:stretch}
  .site-nav ul ul{display:flex;position:static;border:0;padding:0 0 .35rem 1rem;min-width:0}
  .site-nav .menu-item-has-children>a::after{display:none}
}

/* Narrow phones: the header row is branding + Menu + "Request a quote", and at
   ~390px those three do not fit — the button was being clipped off the right edge.
   Let the row wrap and give the business name its own line, so the two controls
   sit together beneath it. */
@media(max-width:560px){
  .site-header .wrap{flex-wrap:wrap;gap:.7rem 1rem;padding-block:.8rem}
  .site-branding{flex:1 1 100%}
  .nav-toggle{order:2}
  .header-cta{order:3;margin-left:auto}
  .header-cta .btn{padding:.62rem 1rem;font-size:.86rem}
  /* separators can otherwise end a wrapped line with a dangling middot */
  .topbar .sep{display:none}
  .topbar .wrap{gap:.25rem 1.1rem}
}
/* Smallest phones still in use (320px — original SE, older Androids): Menu plus
   the quote button together are wider than the row, so tighten both rather than
   push the button onto a third line. */
@media(max-width:400px){
  .nav-toggle{padding:.5rem .6rem;font-size:.8rem}
  .header-cta .btn{padding:.55rem .7rem;font-size:.78rem}
}

/* SIC/NAICS badge — footer, under the social row in the identity column.
   The art is blue on white, so it gets a little breathing room from the dark panel
   rather than sitting flush against it. */
.footer-badge{display:inline-block;margin-top:1.5rem;line-height:0;opacity:.92;transition:opacity .16s}
.footer-badge:hover{opacity:1}
.footer-badge img{width:180px;height:60px;display:block;border-radius:3px}

/* ---------------------------------------------------------------------------
   Sticky mobile contact bar
   Phones only. Two actions, equal width, thumb-reachable at the bottom of the
   screen. `body` gets matching bottom padding so it never hides the footer.
--------------------------------------------------------------------------- */
.callbar{display:none}
@media(max-width:760px){
  .callbar{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:60;
    background:var(--ink-deep);border-top:1px solid rgba(255,255,255,.14);
    padding:.5rem .6rem calc(.5rem + env(safe-area-inset-bottom,0px));
    gap:.5rem;box-shadow:0 -8px 24px -18px rgba(0,0,0,.9);
  }
  .callbar a{
    flex:1 1 0;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
    padding:.82rem .5rem;border-radius:3px;text-decoration:none;
    font-family:'Archivo',sans-serif;font-weight:700;font-size:.92rem;
    border:2px solid transparent;min-height:48px;   /* comfortable tap target */
  }
  .callbar svg{width:1.05em;height:1.05em;flex:none}
  .callbar-call{background:var(--hi-vis);color:var(--ink);border-color:var(--hi-vis)}
  .callbar-call:active{background:var(--hi-vis-deep)}
  .callbar-quote{background:transparent;color:#fff;border-color:rgba(255,255,255,.38)}
  .callbar-quote:active{background:rgba(255,255,255,.1)}
  /* keep the end of the footer clear of the fixed bar */
  body{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
}
@media(max-width:400px){
  .callbar a{font-size:.85rem;gap:.4rem;padding:.78rem .35rem}
}

/* ── PAGE / POST CONTENT ────────────────────────────────────────────────── */
.site-main{min-height:40vh}
.entry{padding-block:clamp(2.5rem,5vw,4rem)}
/* The converted pages are full-bleed and start/end on their own coloured bands,
   so this padding showed as white strips: one under the picket rule above the
   hero, one above the footer. Only pages whose content supplies its own H1 get
   `is-full` (see page.php), so ordinary pages keep their breathing room. */
.entry:has(> .entry-content.is-full){padding-block:0}
.entry-header{max-width:70ch}
.entry-header .eyebrow{font-family:var(--mono);font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);display:block;margin-bottom:.9rem}
.entry-title{font-family:'Archivo',sans-serif;font-weight:800;letter-spacing:-.03em;line-height:1.1;font-size:clamp(1.9rem,3.6vw,2.8rem);margin:0 0 1rem;color:var(--ink)}
.entry-meta{font-family:var(--mono);font-size:.74rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0 0 1.75rem}
.entry-featured{margin:0 0 2rem}
.entry-featured img{width:100%;border-radius:3px;display:block}

/* Content typography. Scoped to .entry-content so the converted pages' own
   inline blocks (.bcf-home / .bcf-inner) keep full control of their own areas. */
.entry-content{max-width:72ch}
.entry-content.is-full{max-width:none}
.entry-content h2{font-family:'Archivo',sans-serif;font-weight:800;letter-spacing:-.02em;line-height:1.18;font-size:clamp(1.5rem,2.6vw,2rem);margin:2.75rem 0 1rem;color:var(--ink)}
.entry-content h3{font-family:'Archivo',sans-serif;font-weight:700;letter-spacing:-.015em;font-size:clamp(1.2rem,2vw,1.45rem);margin:2.25rem 0 .75rem;color:var(--ink)}
.entry-content h4{font-family:'Archivo',sans-serif;font-weight:700;font-size:1.08rem;margin:1.75rem 0 .6rem;color:var(--ink)}
.entry-content p{margin:0 0 1.15rem;color:var(--ink-soft)}
.entry-content ul,.entry-content ol{margin:0 0 1.4rem;padding-left:1.3rem;color:var(--ink-soft)}
.entry-content li{margin:.4rem 0}
.entry-content a{color:var(--accent-deep);text-decoration:underline;text-underline-offset:2px}
.entry-content img{border-radius:3px;margin:1.5rem 0}
.entry-content blockquote{margin:1.75rem 0;padding:.35rem 0 .35rem 1.25rem;border-left:3px solid var(--hi-vis);color:var(--ink-soft);font-style:normal}
.entry-content table{width:100%;border-collapse:collapse;margin:1.5rem 0;font-size:.95rem}
.entry-content th,.entry-content td{border:1px solid var(--rule);padding:.6rem .8rem;text-align:left}
.entry-content figure{margin:1.5rem 0}
.entry-content figcaption{font-size:.85rem;color:var(--muted);margin-top:.5rem}

/* post layout with sidebar */
.post-layout{display:grid;grid-template-columns:1fr;gap:2.5rem}
@media(min-width:1000px){.post-layout{grid-template-columns:minmax(0,1fr) 320px;gap:3.5rem;align-items:start}}
.post-aside{display:grid;gap:1.25rem}
@media(min-width:1000px){.post-aside{position:sticky;top:1.5rem}}
.card{background:var(--white);border:1px solid var(--rule);border-radius:3px;padding:1.5rem}
.card--dark{background:var(--ink);border-color:var(--ink);color:#fff}
.card h3,.card h4{font-family:'Archivo',sans-serif;margin:0 0 .75rem;font-size:1.05rem;font-weight:800;letter-spacing:-.015em}
.card--dark h3,.card--dark h4{color:#fff}
.card p{margin:0 0 1rem;font-size:.93rem;color:var(--muted)}
.card--dark p{color:rgba(255,255,255,.8)}
.card .label{font-family:var(--mono);font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);display:block;margin-bottom:.6rem}
.card--dark .label{color:var(--hi-vis)}
.card .tel-big{display:flex;align-items:center;gap:.5rem;font-family:'Archivo',sans-serif;font-weight:800;font-size:1.35rem;color:var(--ink);text-decoration:none;margin:0 0 .85rem}
.card--dark .tel-big{color:var(--hi-vis)}

/* related posts / archive cards */
.post-grid{display:grid;grid-template-columns:1fr;gap:1.5rem}
@media(min-width:640px){.post-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1000px){.post-grid{grid-template-columns:repeat(3,1fr)}}
.post-card{display:flex;flex-direction:column;background:var(--white);border:1px solid var(--rule);border-top:4px solid var(--ink);border-radius:3px;overflow:hidden;transition:.2s}
.post-card:hover{border-top-color:var(--hi-vis);transform:translateY(-3px);box-shadow:0 18px 40px -28px rgba(12,26,42,.55)}
.post-card .shot{aspect-ratio:16/10;overflow:hidden;background:var(--paper-cool)}
.post-card .shot img{width:100%;height:100%;object-fit:cover;display:block;margin:0;border-radius:0}
.post-card .body{padding:1.35rem;display:flex;flex-direction:column;flex:1}
.post-card h3{font-family:'Archivo',sans-serif;font-weight:800;font-size:1.02rem;line-height:1.3;letter-spacing:-.015em;margin:0 0 .5rem}
.post-card h3 a{color:var(--ink);text-decoration:none}
.post-card h3 a:hover{color:var(--accent-deep)}
.post-card p{margin:0 0 1rem;font-size:.9rem;color:var(--muted);line-height:1.6}
.post-card .more{margin-top:auto;align-self:flex-start;font-family:'Archivo',sans-serif;font-weight:700;font-size:.86rem;color:var(--ink);text-decoration:none;border-bottom:2px solid var(--hi-vis);padding-bottom:2px}
.post-card .more:hover{color:var(--accent-deep);border-bottom-color:var(--accent)}

.section-head{max-width:62ch;margin-bottom:2rem}
.section-head .eyebrow{font-family:var(--mono);font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);display:block;margin-bottom:.85rem}
.section-head h2{font-family:'Archivo',sans-serif;font-weight:800;letter-spacing:-.025em;font-size:clamp(1.6rem,3vw,2.3rem);margin:0;color:var(--ink)}

.band-paper{background:var(--paper);padding-block:clamp(2.75rem,6vw,4.25rem)}
.pagination{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:2.5rem}
.pagination .page-numbers{display:inline-flex;padding:.55rem .9rem;border:1px solid var(--rule);border-radius:3px;text-decoration:none;color:var(--ink-soft);font-weight:600;font-size:.9rem;background:var(--white)}
.pagination .page-numbers.current,.pagination .page-numbers:hover{background:var(--ink);color:#fff;border-color:var(--ink)}

.post-nav{display:grid;grid-template-columns:1fr;gap:1rem;margin-top:2.5rem;padding-top:2rem;border-top:1px solid var(--rule)}
@media(min-width:700px){.post-nav{grid-template-columns:repeat(2,1fr)}}
.post-nav a{display:block;padding:1.1rem 1.25rem;border:1px solid var(--rule);border-radius:3px;text-decoration:none;background:var(--white)}
.post-nav a:hover{border-color:var(--accent)}
.post-nav .label{font-family:var(--mono);font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;color:var(--muted);display:block;margin-bottom:.35rem}
.post-nav .t{font-family:'Archivo',sans-serif;font-weight:700;font-size:.96rem;color:var(--ink);line-height:1.3}

/* search */
.searchform{display:flex;gap:.5rem}
.searchform input[type=search]{flex:1;min-width:0;padding:.7rem .9rem;border:1px solid var(--rule);border-radius:3px;font:inherit;font-size:.95rem;background:var(--white);color:var(--ink)}
.searchform button{border:0;cursor:pointer}

/* ── FOOTER ─────────────────────────────────────────────────────────────── */
.site-footer{background:var(--ink-deep);color:rgba(255,255,255,.76);padding-block:clamp(2.75rem,6vw,4rem) 0;margin-top:clamp(3rem,7vw,5rem)}
/* The converted pages are full-bleed and finish on their own dark CTA band, so the
   footer's top margin showed as a white strip between two dark sections.
   TWO structures have to be covered, because they render through different templates:
     1. While Elementor is installed, the converted pages use its
        `elementor_header_footer` page template, which drops the content straight
        into <main> — so .bcf-home / .bcf-inner is a DIRECT child of .site-main.
     2. Once Elementor is gone they fall back to page.php, which wraps content in
        article.entry > .entry-content.is-full.
   The direct-child combinator in (1) matters: converted POSTS also carry .bcf-inner
   but sit inside article.entry via single.php, and they SHOULD keep the gap because
   .bcf-inpost cancels the full-bleed and their content ends on white. */
.site-main:has(> .bcf-home, > .bcf-inner) + .site-footer,
.site-main:has(.entry-content.is-full) + .site-footer{margin-top:0}
.site-footer a{color:rgba(255,255,255,.76);text-decoration:none}
.site-footer a:hover{color:var(--hi-vis)}
.footer-grid{display:grid;grid-template-columns:1fr;gap:2.25rem}
@media(min-width:760px){.footer-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1040px){.footer-grid{grid-template-columns:1.3fr 1fr 1fr}}
.site-footer h2,.site-footer h3{font-family:'Archivo',sans-serif;font-weight:800;letter-spacing:-.02em;color:#fff;margin:0 0 1rem;font-size:1.05rem}
.site-footer .brand{font-size:1.3rem}
.site-footer ul{list-style:none;margin:0;padding:0}
.site-footer li{margin:.45rem 0;font-size:.94rem}
.footer-contact li{display:flex;gap:.65rem;align-items:flex-start}
.footer-contact svg{width:16px;height:16px;flex:none;margin-top:.3em;color:var(--hi-vis)}
.footer-social{display:flex;gap:.6rem;margin-top:1.25rem}
.footer-social a{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid rgba(255,255,255,.22);border-radius:3px}
.footer-social a:hover{border-color:var(--hi-vis);background:rgba(255,255,255,.06)}
.footer-social svg{width:17px;height:17px}
.footer-areas{margin-top:2.5rem;padding-top:1.75rem;border-top:1px solid rgba(255,255,255,.14);font-size:.9rem;line-height:1.9}
.footer-areas .label{font-family:var(--mono);font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--hi-vis);display:block;margin-bottom:.6rem}
.footer-bottom{margin-top:2rem;padding-block:1.25rem;border-top:1px solid rgba(255,255,255,.14);font-size:.85rem;color:rgba(255,255,255,.55);display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;justify-content:space-between}

/* ── 404 ────────────────────────────────────────────────────────────────── */
.e404{background:var(--ink-deep);color:#fff;padding-block:clamp(3rem,7vw,5rem);position:relative}
.e404 .code{font-family:var(--mono);font-size:.78rem;letter-spacing:.18em;text-transform:uppercase;color:var(--hi-vis);display:block;margin-bottom:1.1rem}
.e404 h1{font-family:'Archivo',sans-serif;font-weight:900;letter-spacing:-.03em;line-height:1.08;font-size:clamp(2rem,4.6vw,3.2rem);color:#fff;margin:0 0 1rem;max-width:20ch}
.e404 p{color:rgba(255,255,255,.82);max-width:52ch;margin:0 0 2rem}
.e404 .actions{display:flex;flex-wrap:wrap;gap:.85rem}
.e404 .picket{position:absolute;left:0;bottom:0}
.e404-links{background:var(--paper);padding-block:clamp(2.75rem,6vw,4rem)}
.e404-links .grid{display:grid;grid-template-columns:1fr;gap:.75rem}
@media(min-width:600px){.e404-links .grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:900px){.e404-links .grid{grid-template-columns:repeat(3,1fr)}}
.e404-links .grid a{display:flex;align-items:center;justify-content:space-between;gap:.75rem;background:var(--white);border:1px solid var(--rule);border-left:3px solid var(--accent);border-radius:3px;padding:.95rem 1.15rem;text-decoration:none;font-family:'Archivo',sans-serif;font-weight:700;font-size:.95rem;color:var(--ink);transition:.18s}
.e404-links .grid a:hover{border-left-color:var(--hi-vis);transform:translateY(-2px)}
.e404-links .grid a::after{content:"\2192";color:var(--accent);font-weight:400}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
