/*
Theme Name: Match My NDIS
Theme URI: https://matchmyndis.com/
Author: Match My NDIS
Description: Custom WordPress theme for Match My NDIS - Australia's Independent NDIS Provider Directory. Includes a Providers custom post type with service, state and disability taxonomies, a live search/filter directory, National Agencies and Fraser Coast listing pages, a blog, and lead-capture forms.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: match-my-ndis
*/

/* =========================================================
   1. DESIGN TOKENS
   ========================================================= */
:root {
  --background: 0 0% 100%;
  --foreground: 222 84% 5%;
  --card: 0 0% 100%;
  --card-foreground: 222 84% 5%;
  --primary: 218 85% 30%;           /* #0B3B8C */
  --primary-foreground: 210 40% 98%;
  --secondary: 359 74% 50%;         /* #D62828 */
  --secondary-foreground: 210 40% 98%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215 16% 47%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222 47% 11%;
  --border: 214 32% 91%;
  --input: 214 32% 91%;
  --radius: 0.5rem;
  --green-50: #f0fdf4;
  --green-700: #15803d;
  --blue-50: #eff6ff;
  --blue-700: #1d4ed8;
  --yellow-400: #facc15;
  --yellow-500: #eab308;
}

html.high-contrast {
  --background: 0 0% 0%;
  --foreground: 0 0% 100%;
  --card: 0 0% 10%;
  --card-foreground: 0 0% 100%;
  --primary: 60 100% 50%;
  --primary-foreground: 0 0% 0%;
  --secondary: 0 0% 100%;
  --secondary-foreground: 0 0% 0%;
  --muted: 0 0% 20%;
  --muted-foreground: 0 0% 90%;
  --border: 0 0% 100%;
}

html.large-text { font-size: 110%; }

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.55;
  -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.2; }
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; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.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); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.w-full { width: 100%; }
.relative { position: relative; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .md-grid-1 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { 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;} .py-24{padding-top:6rem;padding-bottom:6rem;}
.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.75rem; font-weight: 800; }
.h2 { font-size: 2rem; font-weight: 800; }
.h3 { font-size: 1.4rem; font-weight: 700; }
.text-lg { font-size: 1.15rem; }
.text-xl { font-size: 1.35rem; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.uppercase { text-transform: uppercase; letter-spacing: .05em; }
.text-primary { color: hsl(var(--primary)); }
.text-secondary { color: hsl(var(--secondary)); }
.text-muted { color: hsl(var(--muted-foreground)); }
.text-white { color: #fff; }
@media (min-width: 768px) {
  .h1 { font-size: 3.5rem; }
}

/* =========================================================
   5. BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: var(--radius); font-weight: 600; font-size: 1rem;
  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.1rem; }
.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) / .9); }
.btn-secondary { background: hsl(var(--secondary)); color: hsl(var(--secondary-foreground)); }
.btn-secondary:hover { background: hsl(var(--secondary) / .9); }
.btn-outline { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--foreground)); }
.btn-outline:hover { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .05); }
.btn-link { background: none; padding: 0; color: hsl(var(--primary)); font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-full { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* =========================================================
   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; }
.card-hover:hover { box-shadow: 0 10px 25px -5px rgb(0 0 0 / .1); border-color: hsl(var(--primary)); }
.shadow { box-shadow: 0 4px 14px -4px rgb(0 0 0 / .12); }
.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-blue { background: var(--blue-50); color: var(--blue-700); border-color: #bfdbfe; }
.badge-green { background: var(--green-50); color: var(--green-700); border-color: #bbf7d0; }

/* =========================================================
   7. HEADER / NAV
   ========================================================= */
.site-header {
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  padding: 1rem 0; position: sticky; top: 0; z-index: 50;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.site-logo { display: flex; flex-direction: column; color: #fff; }
.site-logo .name { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.site-logo .tagline { font-size: .72rem; color: rgb(255 255 255 / .7); }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { color: rgb(255 255 255 / .92); font-weight: 500; }
.main-nav a:hover { color: #fff; text-decoration: underline; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; }
@media (max-width: 900px) {
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: hsl(var(--primary)); 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; min-height: 500px; display: flex; align-items: center; justify-content: center; padding: 6rem 1rem; text-align: center; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.5); }
.hero-content { position: relative; z-index: 1; max-width: 56rem; margin: 0 auto; color: #fff; }

/* =========================================================
   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) / .4); 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 (homepage)
   ========================================================= */
.section { padding: 4rem 1rem; }
.section-muted { background: hsl(var(--muted) / .5); }
.section-primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.search-card { margin-top: -6rem; position: relative; z-index: 20; }
.icon-circle { width: 4rem; height: 4rem; border-radius: 999px; background: hsl(var(--primary) / .1); color: hsl(var(--primary)); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.service-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .6rem; padding: 1.5rem; height: 100%; }
.browse-link { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border: 1px solid hsl(var(--border)); border-radius: .6rem; font-weight: 600; }
.browse-link:hover { border-color: hsl(var(--primary)); background: hsl(var(--primary) / .05); }
.why-card { background: rgb(255 255 255 / .1); border: none; border-radius: .75rem; padding: 1.5rem; text-align: center; }
.resource-card img { height: 12rem; width: 100%; object-fit: cover; }

/* =========================================================
   11. PROVIDER CARD / SEARCH
   ========================================================= */
.provider-card { display: flex; gap: 1.5rem; padding: 1.5rem; flex-wrap: wrap; }
.provider-card .logo { width: 6rem; height: 6rem; object-fit: cover; border-radius: .6rem; border: 1px solid hsl(var(--border)); flex-shrink: 0; }
.provider-card .body { flex: 1; min-width: 240px; }
.provider-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .875rem; color: hsl(var(--muted-foreground)); margin: .3rem 0 .8rem; }
.provider-services { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0; }
.provider-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; }
.availability-pill { display: inline-flex; align-items: center; gap: .4rem; background: var(--green-50); color: var(--green-700); font-weight: 600; font-size: .875rem; padding: .35rem .9rem; border-radius: 999px; }

.search-layout { display: grid; grid-template-columns: 260px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .search-layout { grid-template-columns: 1fr; } }
.filters-box h3 { font-size: .95rem; margin-bottom: .5rem; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem; }

/* =========================================================
   12. PROVIDER 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: 8rem; height: 8rem; object-fit: cover; border-radius: .5rem; }
.tabs-nav { display: flex; gap: .5rem; border-bottom: 1px solid hsl(var(--border)); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs-nav a { padding: .8rem 1.2rem; font-weight: 600; color: hsl(var(--muted-foreground)); border-bottom: 2px solid transparent; }
.tabs-nav a.active, .tabs-nav a:hover { color: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.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: .9rem; border: 1px solid hsl(var(--border)); border-radius: .5rem; background: hsl(var(--muted) / .3); font-weight: 600; }

/* =========================================================
   13. FOOTER
   ========================================================= */
.site-footer { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 3rem 0; text-align: center; }
.site-footer a:hover { color: hsl(var(--secondary)); }
.footer-top { display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .footer-top { flex-direction: row; } }
.footer-links { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .2); padding-top: 2rem; }
.footer-fine { font-size: .75rem; color: rgb(255 255 255 / .7); max-width: 48rem; margin: 0 auto .75rem; }

/* =========================================================
   14. ACCESSIBILITY WIDGET + CHATBOT
   ========================================================= */
.a11y-widget { position: fixed; left: 1rem; bottom: 6rem; z-index: 60; }
.a11y-btn { width: 3rem; height: 3rem; border-radius: 999px; background: hsl(var(--background)); border: 2px solid hsl(var(--primary)); color: hsl(var(--primary)); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 20px rgb(0 0 0 / .15); }
.a11y-btn:hover { background: hsl(var(--primary)); color: #fff; }
.a11y-menu { display: none; position: absolute; bottom: 3.6rem; left: 0; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); border-radius: .6rem; box-shadow: 0 10px 25px rgb(0 0 0 / .15); width: 13rem; padding: .5rem; }
.a11y-widget.open .a11y-menu { display: block; }
.a11y-menu button { width: 100%; text-align: left; background: none; border: none; padding: .6rem; border-radius: .4rem; display: flex; gap: .6rem; align-items: center; font-size: .9rem; }
.a11y-menu button:hover { background: hsl(var(--muted)); }

.chat-widget { position: fixed; right: 1rem; bottom: 1.5rem; z-index: 60; }
.chat-toggle { width: 3.5rem; height: 3.5rem; border-radius: 999px; background: hsl(var(--secondary)); color: #fff; display: flex; align-items: center; justify-content: center; border: none; box-shadow: 0 8px 20px rgb(0 0 0 / .2); }
.chat-window { display: none; position: absolute; bottom: 4.2rem; right: 0; width: 20rem; max-width: 85vw; background: hsl(var(--card)); border-radius: .8rem; box-shadow: 0 20px 40px rgb(0 0 0 / .2); border: 1px solid hsl(var(--border)); overflow: hidden; }
.chat-widget.open .chat-window { display: flex; flex-direction: column; }
.chat-header { background: hsl(var(--primary)); color: #fff; padding: .9rem 1rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.chat-body { padding: 1rem; height: 18rem; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; }
.chat-msg { max-width: 85%; padding: .6rem .9rem; border-radius: .8rem; font-size: .9rem; }
.chat-msg.bot { background: hsl(var(--muted)); align-self: flex-start; }
.chat-msg.user { background: hsl(var(--primary)); color: #fff; align-self: flex-end; }
.chat-form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid hsl(var(--border)); }
.chat-form input { flex: 1; }

/* =========================================================
   15. BLOG
   ========================================================= */
.tag-pill { display: inline-flex; align-items: center; gap: .4rem; background: rgb(255 255 255 / .1); padding: .5rem 1rem; border-radius: 999px; font-size: .875rem; font-weight: 600; }
.post-thumb { position: relative; height: 14rem; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-cat-pill { position: absolute; top: 1rem; left: 1rem; background: hsl(var(--secondary)); color: #fff; padding: .3rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.blog-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; }
@media (max-width: 960px) { .blog-layout { grid-template-columns: 1fr; } }
.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* =========================================================
   16. MISC
   ========================================================= */
.divider-dot { width: .25rem; height: .25rem; border-radius: 999px; background: hsl(var(--border)); }
.stars { color: var(--yellow-500); letter-spacing: .1em; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.no-results { text-align: center; padding: 3rem 0; color: hsl(var(--muted-foreground)); }
.step-progress { width: 100%; height: .5rem; background: hsl(var(--muted)); border-radius: 999px; overflow: hidden; margin-bottom: .5rem; }
.step-progress-fill { height: 100%; background: hsl(var(--primary)); transition: width .3s ease; }
.value-icon { background: hsl(var(--primary) / .1); padding: .75rem; border-radius: 999px; width: fit-content; color: hsl(var(--primary)); }
