/*
Theme Name: Find Directory Site
Theme URI: https://github.com/availabl/find-directory-site
Author: Availabl
Author URI: https://availabl.com.au
Description: A flexible regional business directory theme for any find[region].com.au site. Live availability, zone display, ad spaces, Availabl sync, front-end listing management, user registration, and shortcodes. Deploy once — configure per region.
Version: 3.22.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: finddirectorysite
Tags: directory, listings, business, regional, availability, community, local
*/

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  --fds-green:       #1B4332;
  --fds-green-dark:  #132E23;
  --fds-green-mid:   #2D5A3D;
  --fds-green-light: #4A7C59;
  --fds-mint:        #E8F0EB;
  --fds-gold:        #D4A017;
  --fds-gold-dark:   #B8891A;
  --fds-cream:       #FAF7F2;
  --fds-white:       #FFFFFF;
  --fds-text:        #2D3748;
  --fds-text-muted:  #718096;
  --fds-border:      #E2E8F0;
  --fds-radius-sm:   4px;
  --fds-radius-md:   6px;
  --fds-radius-lg:   10px;
  --fds-shadow:      0 2px 8px rgba(27,67,50,0.08);
  --fds-shadow-md:   0 4px 16px rgba(27,67,50,0.12);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--fds-cream);
  color: var(--fds-text);
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  line-height: 1.2;
  color: var(--fds-green);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--fds-gold); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.section-header h2 { font-size: 1.6rem; font-weight: 600; }

.view-all {
  font-size: 0.78rem;
  color: var(--fds-gold);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.view-all:hover { color: var(--fds-gold-dark); }

/* =============================================
   NAVIGATION
   ============================================= */
.site-header {
  background: var(--fds-green);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.site-logo {
  font-family: 'Playfair Display', serif;
  color: var(--fds-cream);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-logo span { color: var(--fds-gold); }

.main-nav { display: flex; gap: 0; list-style: none; }

.main-nav a {
  color: rgba(250,247,242,0.8);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border-radius: var(--fds-radius-sm);
  transition: color 0.15s, background 0.15s;
}

.main-nav a:hover {
  color: var(--fds-cream);
  background: rgba(255,255,255,0.08);
}

.nav-cta {
  background: var(--fds-gold);
  color: var(--fds-green) !important;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 1.1rem;
  border-radius: var(--fds-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-cta:hover { background: var(--fds-gold-dark); color: var(--fds-green) !important; }

/* Browse Directory — outlined green */
.nav-cta--directory {
  background: transparent;
  color: var(--fds-cream) !important;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.nav-cta--directory:hover {
  background: rgba(255,255,255,0.12);
  color: var(--fds-cream) !important;
}

/* All Listings — subtle outline */
.nav-cta--listings {
  background: transparent;
  color: var(--fds-cream) !important;
  border: 1.5px solid rgba(255,255,255,0.35);
}
.nav-cta--listings:hover {
  background: rgba(255,255,255,0.12);
  color: var(--fds-cream) !important;
}

/* Wrapper for all header action buttons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fds-cream);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  background: var(--fds-green);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.06;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(212,160,23,0.18);
  color: var(--fds-gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 2px;
  margin-bottom: 1.2rem;
}

.hero h1 {
  color: var(--fds-cream);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.hero h1 em { color: var(--fds-gold); font-style: normal; }

.hero-subtitle {
  color: rgba(250,247,242,0.72);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 2.2rem;
  line-height: 1.65;
}

.search-wrap {
  background: var(--fds-cream);
  border-radius: var(--fds-radius-md);
  display: flex;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto 1.25rem;
  box-shadow: var(--fds-shadow-md);
}

.search-wrap input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--fds-text);
  outline: none;
  min-width: 0;
}

.search-wrap input::placeholder { color: var(--fds-text-muted); }

.search-wrap select {
  border: none;
  border-left: 1px solid var(--fds-border);
  background: #ffffff;
  padding: 0.9rem 0.6rem 0.9rem 0.75rem;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--fds-text-muted);
  outline: none;
  cursor: pointer;
  max-width: 170px;   /* prevents select dominating the bar with long names */
  flex-shrink: 0;
}

.search-wrap button {
  background: var(--fds-gold);
  border: none;
  color: var(--fds-green);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0 1.5rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s;
  white-space: nowrap;
}

.search-wrap button:hover { background: var(--fds-gold-dark); }

.hero-tags {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-tag {
  background: rgba(250,247,242,0.1);
  color: rgba(250,247,242,0.72);
  font-size: 0.72rem;
  padding: 0.25rem 0.7rem;
  border-radius: 2px;
  border: 1px solid rgba(250,247,242,0.15);
  cursor: pointer;
  transition: background 0.15s;
}

.hero-tag:hover { background: rgba(250,247,242,0.18); }

/* =============================================
   CATEGORY TILES
   ============================================= */
.categories { padding: 3rem 0; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}

/* Cat-card: a proper button tile — name at top, large emoji, count below */
.cat-card {
  background: var(--fds-white);
  border: 1.5px solid var(--fds-mint);
  border-radius: 12px;
  padding: 1.1rem 0.6rem 0.9rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--fds-text);
}

.cat-card:hover {
  border-color: var(--fds-green);
  background: #F0F8F4;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(27,67,50,.10);
  color: var(--fds-green);
}

/* Category name — top, bold, small caps */
.cat-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--fds-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: block;
  order: 1;
  line-height: 1.2;
}
.cat-card:hover .cat-label { color: var(--fds-green); }

/* Emoji — large, below the label */
.cat-icon {
  font-size: 2rem;
  display: block;
  order: 2;
  line-height: 1;
}

/* Listing count — below emoji, muted */
.cat-count {
  font-size: 0.62rem;
  color: var(--fds-text-muted);
  display: block;
  order: 3;
}

/* Responsive breakpoints */
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 380px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }


/* ── Hero category quick-access buttons ───────────────────────────────── */
.hero-cat-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
  justify-content: center;  /* match hero-inner text-align:center on desktop */
}
.hero-cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255,255,255,0.20);  /* solid enough without blur dependency */
  color: #fff !important;              /* force white — never inherit a dark parent colour */
  border: 1.5px solid rgba(255,255,255,0.45);
  border-radius: 9999px;
  padding: 0.48rem 1.1rem 0.48rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.hero-cat-btn:hover {
  background: rgba(255,255,255,0.32);
  border-color: rgba(255,255,255,0.70);
  color: #fff !important;
  transform: translateY(-1px);
}
.hero-cat-btn__emoji {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
}
.hero-cat-btn__label {
  line-height: 1;
  color: #fff;
}
.hero-cat-btn--all {
  background: rgba(255,255,255,0.10);
  border-style: dashed;
}
@media (max-width: 680px) {
  .hero-cat-buttons { justify-content: flex-start; gap: 0.4rem; }
  .hero-cat-btn { font-size: 0.75rem; padding: 0.4rem 0.85rem 0.4rem 0.65rem; }
  .hero-cat-btn__emoji { font-size: 1rem; }
}

/* ── LISTING CARD — PRICE LABEL + DATE ──────────────────────────────────── */
.listing-card__price {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--fds-green, #1B4332);
  background: #E8F4EE;
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: .02em;
}
.listing-card__price-label {
  font-size: 0.72em;
  font-weight: 400;
  color: var(--fds-text-muted, #718096);
  margin-left: 0;
}
.listing-card__date {
  font-size: 0.75rem;
  color: var(--fds-text-muted, #9CA3AF);
  margin-left: auto;
  white-space: nowrap;
}

/* ── LISTING CARD DATE UPDATED ───────────────────────────────────────────── */
.listing-card__date-updated {
  color: var(--fds-text-muted, #9CA3AF);
  font-size: 0.8em;
}

/* ══════════════════════════════════════════════════════════════════════════
   HERO SLIDESHOW
   ══════════════════════════════════════════════════════════════════════════ */

/* Hero section must be position:relative for absolute children */
.hero--slideshow {
  position: relative;
  overflow: hidden;
  min-height: 560px;
}

/* Each slide — full cover, absolutely positioned */
.hero-slideshow { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}
.hero-slide--active { opacity: 1; }

/* Gradient overlay so text is always readable over photos */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(27, 67, 50, 0.72) 0%,
    rgba(27, 67, 50, 0.45) 50%,
    rgba(27, 67, 50, 0.30) 100%
  );
}

/* SVG and content must sit above both slide and overlay */
.hero--slideshow .hero-bg-svg { position: relative; z-index: 2; }
.hero--slideshow .container   { position: relative; z-index: 2; }

/* Dot indicators */
.hero-slide-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 7px;
}
.hero-slide-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .3s, border-color .3s;
}
.hero-slide-dot--active {
  background: white;
  border-color: white;
}

/* ── Search bar — simple (no category select) ──────────────────────────── */
.search-wrap--simple {
  display: flex;
  gap: 0;
  max-width: 560px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.search-wrap--simple input[type="text"] {
  flex: 1;
  border: none;
  padding: 14px 18px;
  font-size: 1rem;
  outline: none;
  background: white;
}
.search-wrap--simple button {
  background: var(--fds-gold, #C8861A);
  color: white;
  border: none;
  padding: 14px 22px;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.search-wrap--simple button:hover { background: #a06f14; }

/* =============================================
   HEADER — MOBILE NAV (desktop: always visible)
   ============================================= */

/* Desktop: nav always shown, toggle hidden */
.main-nav-wrap { display: flex; align-items: center; flex: 1; }
.main-nav { display: flex; gap: 0; list-style: none; margin: 0; padding: 0; }

/* Mobile toggle — hidden on desktop */
@media (min-width: 769px) {
  .nav-toggle { display: none !important; }
}

/* Hide mobile CTAs on desktop */
.nav-mobile-ctas { display: none; }

/* Mobile: collapse nav into hamburger */
@media (max-width: 768px) {
  .main-nav-wrap {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--fds-green-dark);
    flex-direction: column;
    align-items: stretch;
    padding: .75rem 0 1rem;
    z-index: 200;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .main-nav-wrap.is-open { display: flex; }
  .main-nav { flex-direction: column; }
  .main-nav a { padding: 0.75rem 1.5rem; border-radius: 0; }
  .nav-toggle { display: block; }
  .site-header { position: relative; }
  .site-header .container { position: relative; }
  /* Hide the desktop CTA bar — CTAs are in the dropdown instead */
  .nav-actions { display: none; }
  /* Show mobile CTAs inside the dropdown */
  .nav-mobile-ctas {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .75rem 1rem .25rem;
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: .25rem;
  }
  .nav-mobile-ctas .nav-cta {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: .65rem 1rem;
  }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: var(--fds-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
}
.btn-gold {
  background: var(--fds-gold);
  color: var(--fds-green);
}
.btn-gold:hover { background: var(--fds-gold-dark); color: var(--fds-green); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--fds-gold);
  color: var(--fds-gold);
}
.btn-outline:hover { background: var(--fds-gold); color: var(--fds-green); }
.btn-green {
  background: var(--fds-green);
  color: var(--fds-cream);
}
.btn-green:hover { background: var(--fds-green-dark); color: var(--fds-cream); }

/* =============================================
   ARCHIVE PAGE LAYOUT
   ============================================= */

/* Archive hero banner */
.archive-hero {
  background: var(--fds-green);
  padding: 2rem 0;
  border-bottom: 3px solid rgba(212,160,23,.3);
}
.archive-hero__inner { max-width: 700px; }
.archive-hero__title {
  color: var(--fds-cream);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.4rem;
}
.archive-hero__desc {
  color: rgba(250,247,242,.75);
  font-size: 0.95rem;
}

/* Category filter strip */
.cat-strip {
  background: var(--fds-white);
  border-bottom: 1.5px solid var(--fds-border);
  position: sticky;
  top: 64px;
  z-index: 90;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cat-inner {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 0;
  flex-wrap: nowrap;
  min-height: 48px;
  align-items: center;
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  border: 1.5px solid var(--fds-border);
  background: var(--fds-white);
  color: var(--fds-text);
  font-size: 0.8rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.cat-pill:hover,
.cat-pill.active {
  border-color: var(--fds-green);
  background: var(--fds-mint);
  color: var(--fds-green);
}
.cat-pill__count {
  font-size: 0.7rem;
  color: var(--fds-text-muted);
  background: var(--fds-mint);
  border-radius: 9999px;
  padding: 0 0.4rem;
}
.cat-pill.active .cat-pill__count { background: rgba(27,67,50,.12); color: var(--fds-green); }

/* Two-column archive layout: main + sidebar */
.archive-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .archive-layout { grid-template-columns: 1fr; }
  .archive-sidebar { display: none; } /* sidebar collapses on tablet/mobile */
}

.archive-main { min-width: 0; }

/* Sort row */
.archive-sort {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.archive-sort__count {
  font-size: 0.85rem;
  color: var(--fds-text-muted);
  font-weight: 500;
}
.archive-sort__btns { display: flex; gap: 0.35rem; }
.sort-btn {
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1.5px solid var(--fds-border);
  background: var(--fds-white);
  color: var(--fds-text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.sort-btn:hover,
.sort-btn.active {
  border-color: var(--fds-green);
  color: var(--fds-green);
  background: var(--fds-mint);
}

/* Listing grid */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 1100px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .listing-grid { grid-template-columns: 1fr; } }

/* Inline ad slot in grid */
.listing-grid__ad {
  grid-column: 1 / -1;
  margin: 0.25rem 0;
}

/* No results */
.no-listings {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--fds-text-muted);
}

/* Archive sidebar */
.archive-sidebar { position: sticky; top: calc(64px + 48px + 1.5rem); }
.archive-widget {
  background: var(--fds-white);
  border: 1.5px solid var(--fds-mint);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.archive-widget h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fds-green);
  margin-bottom: 0.75rem;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--fds-green-dark);
  color: rgba(250,247,242,.8);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .site-logo { font-size: 1.3rem; margin-bottom: 0.65rem; }
.footer-brand p { font-size: 0.85rem; line-height: 1.65; max-width: 280px; color: rgba(250,247,242,.65); }

.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fds-gold);
  margin-bottom: 0.9rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a {
  color: rgba(250,247,242,.7);
  font-size: 0.85rem;
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--fds-cream); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: rgba(250,247,242,.5);
}
@media (max-width: 540px) {
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* =============================================
   LISTING CARD — DESKTOP FIXES
   ============================================= */

/* Ensure listing cards are full height in the grid */
.listing-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--fds-white);
  border: 1.5px solid var(--fds-mint);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--fds-text);
}
.listing-card:hover {
  box-shadow: var(--fds-shadow-md);
  transform: translateY(-2px);
}

/* Card image */
.listing-card__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--fds-mint);
  flex-shrink: 0;
}
.listing-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.listing-card:hover .listing-card__img-wrap img { transform: scale(1.03); }

/* Card body grows to fill available space */
.listing-card__body {
  flex: 1;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Card name */
.listing-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fds-green);
  line-height: 1.25;
  margin: 0;
}
.listing-card__name a { color: inherit; text-decoration: none; }
.listing-card:hover .listing-card__name { color: var(--fds-green-dark); }

/* Card meta row */
.listing-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--fds-text-muted);
}
/* listing-card__cat styled in shortcodes.css */
.listing-card__suburb::before { content: '·'; margin-right: 0.3rem; }

/* Push footer to bottom */
.listing-card__footer {
  margin-top: auto;
  padding: 0.6rem 1rem 0.8rem;
  border-top: 1px solid var(--fds-mint);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--fds-text-muted);
}

/* =============================================
   PAGINATION
   ============================================= */
.nav-links {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid var(--fds-border);
  background: var(--fds-white);
  color: var(--fds-text);
  font-size: 0.85rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
  text-decoration: none;
}
.page-numbers.current,
.page-numbers:hover {
  border-color: var(--fds-green);
  background: var(--fds-mint);
  color: var(--fds-green);
}
.page-numbers.dots { border-color: transparent; background: transparent; }

/* =============================================
   GENERAL CONTENT PAGES
   ============================================= */
.fds-content-wrap {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.fds-content-wrap h1, .fds-content-wrap h2, .fds-content-wrap h3 { margin-bottom: 1rem; }
.fds-content-wrap p { margin-bottom: 1rem; line-height: 1.75; }
.fds-content-wrap ul, .fds-content-wrap ol { margin: 0 0 1rem 1.5rem; line-height: 1.75; }

/* ── Hide WordPress page title on all standard pages ──────────────────── */
/* Pages using FDS shortcodes are self-explanatory — title is redundant.
   Excludes single listings (handled by custom template) and archive pages. */
.page .entry-title,
.page .page-title,
.page h1.page-title,
.fds-page-content > h1:first-child,
.page-header .page-title {
  display: none !important;
}

/* =============================================
   FRONT PAGE — MOBILE
   ============================================= */

/* Hero — reduce padding and font sizes on mobile */
@media (max-width: 768px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero--slideshow { min-height: 420px; }
  .hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); margin-bottom: 0.75rem; }
  .hero-subtitle { font-size: 0.9rem; margin-bottom: 1.5rem; }
  .hero-inner { max-width: 100%; padding: 0 1rem; }

  /* Search bar — full width, stack on very small screens */
  .search-wrap {
    flex-direction: column;
    border-radius: var(--fds-radius-sm);
    max-width: 100%;
  }
  .search-wrap input[type="text"],
  .search-wrap select {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--fds-border);
  }
  .search-wrap button[type="submit"] {
    width: 100%;
    border-radius: 0 0 var(--fds-radius-sm) var(--fds-radius-sm);
  }

  /* Hero search wrap */
  .fds-hero-search-wrap { padding: 0 0.5rem; }

  /* Hero category buttons — scroll horizontally */
  .hero-cat-buttons {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .hero-cat-buttons::-webkit-scrollbar { display: none; }
  .hero-cat-btn { flex-shrink: 0; font-size: 0.72rem; }

  /* Slideshow dots — make easier to tap */
  .hero-slide-dots { bottom: 10px; gap: 9px; }
  .hero-slide-dot { width: 10px; height: 10px; }
}

@media (max-width: 480px) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero--slideshow { min-height: 360px; }
  .hero-eyebrow { font-size: 0.65rem; margin-bottom: 0.85rem; }
  .hero h1 { font-size: clamp(1.4rem, 8vw, 1.9rem); }
  .hero-subtitle { display: none; } /* hide subtitle on very small screens to keep hero clean */
}

/* Home sections below hero — stack on mobile */
@media (max-width: 768px) {
  .fds-home-split { padding: 1.5rem 0; }
  .fds-home-split__grid { gap: 2rem; }
  .fds-cta-panel { padding: 2rem 1rem; }
}

/* =============================================
   FLASH AVAILABILITY (build step 2)
   Distinct amber/pulse — must NOT read as the standard green "open".
   ============================================= */
.fds-flash {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 7px 12px;
  margin: 0 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFB020, #F5860B);
  color: #3A2600;
  box-shadow: 0 2px 10px rgba(245, 134, 11, .35);
  animation: fds-flash-pulse 1.8s ease-in-out infinite;
}
.fds-flash__badge {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.fds-flash__note {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.fds-flash__countdown {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .14);
  white-space: nowrap;
}
.fds-flash__countdown--ending { opacity: .85; font-weight: 600; }
.fds-flash--card { padding: 5px 10px; margin-bottom: 8px; }
.fds-flash--card .fds-flash__note { font-size: 12px; }
@keyframes fds-flash-pulse {
  0%, 100% { box-shadow: 0 2px 10px rgba(245, 134, 11, .35); }
  50%      { box-shadow: 0 2px 18px rgba(245, 134, 11, .65); }
}
@media (prefers-reduced-motion: reduce) {
  .fds-flash { animation: none; }
}

/* =============================================
   LISTING DETAIL — commerce, external rating, preferred contact (step 3)
   ============================================= */
.sidebar-price__quote { font-size: 12px; color: var(--fds-text-muted, #6b7280); margin-top: 2px; }
.sidebar-commerce__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sidebar-chip {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--fds-mint, #E8F0EB); color: var(--fds-green, #1B4332);
}
.listing-extrating {
  display: inline-block; font-size: 13px; font-weight: 600;
  color: var(--fds-green, #1B4332); text-decoration: none;
}
.listing-extrating[href]:hover { text-decoration: underline; }
.contact-row__item--pref {
  order: -1; font-weight: 700;
  background: #F0FDF4; border-color: #86EFAC;
}
.contact-pref-pill {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: #166534; color: #fff; padding: 2px 6px; border-radius: 4px; margin-left: 6px;
}
.contact-pref-pill--primary { background: #1A6FA8; }

/* =============================================
   ZONE STRUCTURE (step 4) — names + messages + deep-link, NO live band
   ============================================= */
.listing-zones { list-style: none; margin: 0; padding: 0; }
.listing-zone {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.06);
}
.listing-zone:last-child { border-bottom: 0; }
.listing-zone__name { font-weight: 700; color: var(--fds-green, #1B4332); }
.listing-zone__msg { font-size: 13px; color: var(--fds-text-muted, #6b7280); }
.listing-zones__deeplink {
  display: inline-block; margin-top: 10px; font-weight: 600;
  color: var(--fds-green, #1B4332); text-decoration: none;
}
.listing-zones__deeplink:hover { text-decoration: underline; }
.listing-zones__note { margin-top: 10px; font-size: 12px; color: var(--fds-text-muted, #6b7280); }
