/*
Theme Name: HerveyBay.Directory
Theme URI: https://herveybay.directory/
Author: HerveyBay.Directory
Description: Custom WordPress theme for HerveyBay.Directory - a local trades & services directory for Hervey Bay and the Fraser Coast. Includes a Business custom post type with a Category taxonomy and a hierarchical Region/Suburb location taxonomy, live search, and a bulk CSV importer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: herveybay-directory
*/

/* =========================================================
   1. DESIGN TOKENS - coastal deep ocean teal + warm sand gold
   ========================================================= */
:root {
  --background: 190 30% 97%;
  --foreground: 200 35% 12%;
  --card: 0 0% 100%;
  --card-foreground: 200 35% 12%;
  --primary: 200 68% 24%;           /* deep ocean teal */
  --primary-foreground: 190 30% 98%;
  --accent: 40 82% 54%;             /* warm sand gold */
  --accent-foreground: 200 35% 12%;
  --secondary: 190 24% 92%;
  --secondary-foreground: 200 68% 24%;
  --muted: 190 20% 94%;
  --muted-foreground: 200 12% 42%;
  --border: 190 18% 87%;
  --input: 190 18% 87%;
  --radius: 0.625rem;
  --green-50: #f0fdf4;
  --green-700: #15803d;
}

/* =========================================================
   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: hsl(var(--background));
  color: hsl(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.25; font-family: "Playfair Display", Georgia, "Times New Roman", serif; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.container-sm { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.container-xs { width: 100%; max-width: 768px; margin: 0 auto; padding: 0 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =========================================================
   3. LAYOUT UTILITIES
   ========================================================= */
.flex { display: flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.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%; }
.relative { position: relative; }

@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;}
.py-20{padding-top:5rem;padding-bottom:5rem;}
.mb-2{margin-bottom:.5rem;} .mb-4{margin-bottom:1rem;} .mb-6{margin-bottom:1.5rem;}
.mb-8{margin-bottom:2rem;} .mb-12{margin-bottom:3rem;}
.mt-4{margin-top:1rem;} .mt-6{margin-top:1.5rem;} .mt-8{margin-top:2rem;}

/* =========================================================
   4. TYPOGRAPHY
   ========================================================= */
.h1 { font-size: 2.5rem; font-weight: 700; }
.h2 { font-size: 1.9rem; font-weight: 700; }
.h3 { font-size: 1.3rem; font-weight: 700; }
.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: .06em; }
.text-primary { color: hsl(var(--primary)); }
.text-accent { color: hsl(var(--accent)); }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-white { color: #fff; }
@media (min-width: 768px) {
  .h1 { font-size: 3.4rem; }
}

/* =========================================================
   5. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: var(--radius); font-weight: 600; font-size: 1rem; font-family: "Inter", sans-serif;
  padding: .75rem 1.5rem; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s ease, opacity .15s ease; line-height: 1.2;
}
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
.btn-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn-primary:hover { background: hsl(var(--primary) / .88); }
.btn-accent { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); font-weight: 700; }
.btn-accent:hover { background: hsl(var(--accent) / .88); }
.btn-outline { background: hsl(var(--background)); border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover { border-color: hsl(var(--primary)); }
.btn-link { background: none; padding: 0; color: hsl(var(--primary)); font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-full { width: 100%; }

/* =========================================================
   6. CARDS / BADGES
   ========================================================= */
.card {
  background: hsl(var(--card)); color: hsl(var(--card-foreground));
  border: 1px solid hsl(var(--border)); border-radius: .75rem; overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-hover { transition: box-shadow .2s ease, border-color .2s ease, transform .15s ease; }
.card-hover:hover { box-shadow: 0 12px 28px -8px rgb(0 0 0 / .12); border-color: hsl(var(--primary) / .3); transform: translateY(-2px); }
.shadow { box-shadow: 0 4px 14px -4px rgb(0 0 0 / .1); }
.shadow-lg { box-shadow: 0 20px 40px -12px rgb(0 0 0 / .18); }

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; font-weight: 600; padding: .3rem .7rem;
  border-radius: 999px; border: 1px solid hsl(var(--border)); background: hsl(var(--muted));
}
.badge-accent { background: hsl(var(--accent) / .15); color: #92640a; border-color: hsl(var(--accent) / .3); }
.badge-green { background: var(--green-50); color: var(--green-700); border-color: #bbf7d0; }

/* =========================================================
   7. HEADER / NAV
   ========================================================= */
.site-header { background: #fff; border-bottom: 1px solid hsl(var(--border)); padding: .9rem 0; position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-logo { display: flex; align-items: center; gap: .6rem; color: hsl(var(--primary)); font-weight: 700; font-size: 1.15rem; font-family: "Playfair Display", serif; }
.site-logo .logo-mark { width: 2.2rem; height: 2.2rem; border-radius: .5rem; background: hsl(var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: "Playfair Display", serif; }
.main-nav { display: flex; align-items: center; gap: 1.75rem; }
.main-nav a { color: hsl(var(--foreground)); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: hsl(var(--primary)); }
.nav-toggle { display: none; background: none; border: none; color: hsl(var(--primary)); font-size: 1.6rem; }
@media (max-width: 900px) {
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid hsl(var(--border)); flex-direction: column; align-items: flex-start; padding: 1rem 1.5rem 1.5rem; gap: 1rem; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
}

/* =========================================================
   8. HERO
   ========================================================= */
.hero { position: relative; padding: 6rem 0 8rem; overflow: hidden; background: linear-gradient(160deg, hsl(200 62% 20%), hsl(198 55% 30%)); }
.hero-bg { position: absolute; inset: 0; z-index: 0; opacity: .35; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 1; max-width: 42rem; }
.hero-pill { display: inline-flex; align-items: center; gap: .4rem; background: rgb(255 255 255 / .12); color: #fff; padding: .4rem 1rem; border-radius: 999px; font-size: .8rem; font-weight: 600; margin-bottom: 1.5rem; }

/* =========================================================
   9. FORMS
   ========================================================= */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .92rem; }
.input, select.input, textarea.input {
  width: 100%; padding: .75rem 1rem; border: 1px solid hsl(var(--input)); border-radius: var(--radius);
  background: hsl(var(--background)); color: hsl(var(--foreground));
}
.input:focus, select.input:focus, textarea.input:focus { outline: 2px solid hsl(var(--primary) / .35); border-color: hsl(var(--primary)); }
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); opacity: .5; }
.input-icon-wrap .input { padding-left: 2.6rem; }
.input-lg { padding: .95rem 1rem; font-size: 1.05rem; }
textarea.input { resize: vertical; min-height: 120px; }

/* =========================================================
   10. SECTIONS
   ========================================================= */
.section { padding: 4.5rem 0; }
.section-muted { background: hsl(var(--muted) / .5); }
.section-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.step-num { font-family: "Playfair Display", serif; font-size: 2.6rem; font-weight: 700; color: hsl(var(--accent) / .8); }
.category-tile { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem; height: 100%; }
.category-icon { width: 2.6rem; height: 2.6rem; border-radius: .6rem; background: hsl(var(--muted)); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.region-card { padding: 0; }
.why-icon { width: 2.4rem; height: 2.4rem; border-radius: 999px; background: hsl(var(--accent) / .18); color: hsl(var(--accent)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* =========================================================
   11. BUSINESS CARD / SEARCH
   ========================================================= */
.business-card { display: flex; gap: 1.25rem; padding: 1.5rem; flex-wrap: wrap; }
.business-card .logo { width: 5rem; height: 5rem; object-fit: cover; border-radius: .6rem; border: 1px solid hsl(var(--border)); flex-shrink: 0; background: hsl(var(--muted)); }
.business-card .body { flex: 1; min-width: 220px; }
.business-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .875rem; color: hsl(var(--muted-foreground)); margin: .2rem 0 .7rem; }
.business-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; border-top: 1px solid hsl(var(--border)); margin-top: 1rem; }
.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: hsl(var(--muted-foreground)); }

/* =========================================================
   12. BUSINESS PROFILE
   ========================================================= */
.profile-banner { background: hsl(var(--primary)); color: #fff; padding: 3rem 0; }
.profile-logo-wrap { background: #fff; padding: .5rem; border-radius: .8rem; box-shadow: 0 10px 25px rgb(0 0 0 / .2); width: fit-content; }
.profile-logo-wrap img { width: 7rem; height: 7rem; object-fit: cover; border-radius: .5rem; }
.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: .75rem; align-items: flex-start; color: hsl(var(--muted-foreground)); margin-bottom: 1rem; }
.service-chip { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem; border: 1px solid hsl(var(--border)); border-radius: .5rem; background: hsl(var(--muted) / .3); font-weight: 600; font-size: .92rem; }

/* =========================================================
   13. FOOTER
   ========================================================= */
.site-footer { background: hsl(var(--muted) / .6); border-top: 1px solid hsl(var(--border)); padding: 3rem 0 1.5rem; }
.footer-cols { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-cols { grid-template-columns: 1fr; } }
.footer-col h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: hsl(var(--muted-foreground)); margin-bottom: .9rem; font-family: "Inter", sans-serif; font-weight: 700; }
.footer-col ul { display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: hsl(var(--foreground)); font-size: .92rem; }
.footer-col a:hover { color: hsl(var(--primary)); }
.footer-bottom { border-top: 1px solid hsl(var(--border)); padding-top: 1.5rem; font-size: .8rem; color: hsl(var(--muted-foreground)); }

/* =========================================================
   14. MISC
   ========================================================= */
.divider-dot { width: .25rem; height: .25rem; border-radius: 999px; background: hsl(var(--border)); }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag-pill { display: inline-flex; align-items: center; gap: .4rem; background: hsl(var(--muted)); padding: .4rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
