/*
Theme Name: Canberra Electrical Directory
Theme URI: https://canberraelectricaldirectory.com.au/
Author: Canberra Electrical Directory
Description: Custom WordPress theme for the Canberra Electrical Directory - a local electrician directory for the ACT. Includes an Electrician custom post type with Service and Region taxonomies, live search, guides, Q&A, and a bulk CSV importer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: canberra-electrical-directory
*/

/* =========================================================
   1. DESIGN TOKENS - deep navy + electric yellow, from brand logo
   ========================================================= */
:root {
  --background: #fafafa;
  --foreground: #10192b;
  --card: #ffffff;
  --primary: #0a2540;           /* deep Canberra electric blue/navy */
  --primary-foreground: #f7f9fc;
  --secondary: #eef1f6;
  --secondary-foreground: #0a2540;
  --accent: #f5d800;            /* electric yellow/amber spark */
  --accent-foreground: #10192b;
  --muted: #eef1f6;
  --muted-foreground: #5b6579;
  --border: #e3e7ee;
  --radius: .7rem;
  --emerald: #059669;
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container-ce { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1rem; }
.container-md { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.container-sm { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 1rem; }

/* =========================================================
   3. LAYOUT
   ========================================================= */
.flex { display: flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.text-center { text-align: center; }
.gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; } .gap-12 { gap: 3rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.w-full { width: 100%; }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.py-4{padding-top:1rem;padding-bottom:1rem;} .py-8{padding-top:2rem;padding-bottom:2rem;}
.py-12{padding-top:3rem;padding-bottom:3rem;} .py-16{padding-top:4rem;padding-bottom:4rem;}
.mb-2{margin-bottom:.5rem;} .mb-3{margin-bottom:.75rem;} .mb-4{margin-bottom:1rem;} .mb-6{margin-bottom:1.5rem;}
.mb-8{margin-bottom:2rem;} .mb-12{margin-bottom:3rem;}
.mt-2{margin-top:.5rem;} .mt-3{margin-top:.75rem;} .mt-4{margin-top:1rem;} .mt-6{margin-top:1.5rem;} .mt-8{margin-top:2rem;}

/* =========================================================
   4. TYPOGRAPHY
   ========================================================= */
.h1 { font-size: 2.5rem; }
.h2 { font-size: 1.9rem; }
.h3 { font-size: 1.2rem; }
.text-lg { font-size: 1.1rem; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; letter-spacing: .07em; }
.text-primary { color: var(--primary); }
.text-accent { color: #a37e00; }
.text-muted { color: var(--muted-foreground); }
.text-white { color: #fff; }
@media (min-width: 768px) { .h1 { font-size: 3.2rem; } }

/* =========================================================
   5. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: .5rem; font-weight: 700; font-size: .9rem;
  padding: .8rem 1.4rem; border: 2px solid transparent; cursor: pointer;
  transition: transform .1s ease, background-color .15s ease;
}
.btn-lg { padding: .95rem 1.7rem; font-size: .95rem; }
.btn-sm { padding: .5rem 1rem; font-size: .82rem; }
.btn-accent { background: var(--accent); color: var(--accent-foreground); }
.btn-accent:hover { background: #ffe233; }
.btn-outline-light { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .3); color: #fff; }
.btn-outline-light:hover { background: rgb(255 255 255 / .18); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--foreground); }
.btn-outline:hover { border-color: var(--primary); }

/* =========================================================
   6. CARDS / BADGES
   ========================================================= */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-body { padding: 1.5rem; }
.card-hover { transition: border-color .15s ease, box-shadow .15s ease, transform .1s ease; }
.card-hover:hover { border-color: var(--accent); box-shadow: 0 10px 24px -12px rgb(10 37 64 / .18); transform: translateY(-2px); }

.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px; background: var(--secondary); color: var(--primary); }
.badge-verified { background: rgb(5 150 105 / .12); color: var(--emerald); }
.badge-emergency { background: #fee2e2; color: #b91c1c; }
.badge-accent { background: rgb(245 216 0 / .2); color: #8a6d00; }

/* =========================================================
   7. HEADER / NAV
   ========================================================= */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 2px rgb(0 0 0 / .03); }
.site-header .container-ce { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.site-logo { display: flex; align-items: center; gap: .6rem; }
.site-logo img { height: 2.6rem; width: auto; }
.site-logo .word { font-weight: 800; font-size: 1.05rem; color: var(--primary); line-height: 1.15; }
.site-logo .word small { display: block; font-size: .62rem; font-weight: 700; letter-spacing: .06em; color: var(--muted-foreground); }
.main-nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.main-nav a { font-size: .88rem; font-weight: 600; color: var(--foreground); }
.main-nav a:hover { color: var(--primary); }
.main-nav a.list-biz { color: #a37e00; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--primary); }
@media (max-width: 1100px) {
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; align-items: flex-start; padding: 1rem 1.25rem 1.5rem; }
  .main-nav.open { display: flex; }
  .main-nav.open a { padding: .5rem .25rem; width: 100%; }
  .nav-toggle { display: block; }
}

/* =========================================================
   8. HERO
   ========================================================= */
.hero { background: linear-gradient(180deg, var(--primary) 0%, #123458 60%, var(--background) 100%); color: #fff; }
.hero-pill { display: inline-flex; align-items: center; gap: .4rem; background: rgb(245 216 0 / .18); border: 1px solid rgb(245 216 0 / .3); color: #ffe233; padding: .4rem 1rem; border-radius: 999px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; }

/* =========================================================
   9. FORMS
   ========================================================= */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
.input, select.input, textarea.input {
  width: 100%; padding: .7rem 1rem; border: 1px solid var(--border); border-radius: .5rem;
  background: #fff; color: var(--foreground);
}
.input:focus, select.input:focus, textarea.input:focus { outline: 2px solid rgb(10 37 64 / .15); border-color: var(--primary); }
textarea.input { resize: vertical; min-height: 110px; }

/* =========================================================
   10. LISTING CARDS
   ========================================================= */
.elec-card { padding: 1.5rem; }
.elec-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.elec-meta { display: flex; flex-wrap: wrap; gap: .6rem; font-size: .85rem; color: var(--muted-foreground); margin: .5rem 0; }
.elec-services { display: flex; flex-wrap: wrap; gap: .45rem; margin: .8rem 0; }
.elec-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--border); }
.stars { color: #f5a524; }
.check-row { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted-foreground); }
.check-row.on { color: var(--emerald); font-weight: 600; }

.search-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .search-layout { grid-template-columns: 1fr; } }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }
.no-results { text-align: center; padding: 3rem 0; color: var(--muted-foreground); }

/* =========================================================
   11. ACCORDION
   ========================================================= */
.acc-item { border: 1px solid var(--border); border-radius: .6rem; margin-bottom: .7rem; overflow: hidden; background: #fff; }
.acc-trigger { width: 100%; text-align: left; background: none; border: none; padding: 1rem 1.3rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.acc-trigger:hover { background: var(--secondary); }
.acc-panel { padding: 0 1.3rem 1rem; color: var(--muted-foreground); display: none; }
.acc-item.open .acc-panel { display: block; }
.acc-icon { font-size: 1.2rem; transition: transform .15s ease; }
.acc-item.open .acc-icon { transform: rotate(45deg); }

/* =========================================================
   12. PROFILE
   ========================================================= */
.profile-banner { background: var(--primary); color: #fff; padding: 3rem 0; }
.profile-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
@media (max-width: 960px) { .profile-grid { grid-template-columns: 1fr; } }
.contact-row { display: flex; gap: .7rem; align-items: flex-start; color: var(--muted-foreground); margin-bottom: 1rem; }
.service-chip { display: flex; gap: .5rem; align-items: flex-start; padding: .8rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--secondary); font-weight: 600; font-size: .9rem; }

/* =========================================================
   13. FOOTER
   ========================================================= */
.site-footer { background: var(--primary); color: rgb(255 255 255 / .85); padding: 3.5rem 0 2rem; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-col h4 { color: #fff; margin-bottom: 1rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-col ul { display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { color: rgb(255 255 255 / .7); font-size: .9rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .15); padding-top: 1.5rem; text-align: center; font-size: .8rem; color: rgb(255 255 255 / .55); }

/* =========================================================
   14. MISC
   ========================================================= */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag-pill { display: inline-flex; align-items: center; background: var(--secondary); padding: .35rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
