/*
Theme Name: Kadence Child - ParishLocal
Theme URI: https://parishlocal.com.au
Description: ParishLocal child theme for Kadence. Registers the Parish taxonomy for Directorist and applies brand styles.
Author: ParishLocal
Template: kadence
Version: 1.2.0
Text Domain: kadence-child-parishlocal
*/

/* ============================================================
   PARISHLOCAL BRAND CSS
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --pl-ivory:       #F5F0E8;
  --pl-ivory-dark:  #EDE8DC;
  --pl-green:       #2D5016;
  --pl-green-light: #3D6B1F;
  --pl-green-pale:  #E8F0E0;
  --pl-charcoal:    #1A1A1A;
  --pl-text:        #2C2C2C;
  --pl-text-muted:  #6B6B6B;
  --pl-gold:        #C9A84C;
  --pl-gold-light:  #F5EDD0;
  --pl-blue-grey:   #4A6B7A;
  --pl-blue-pale:   #E0EBF0;
  --pl-burgundy:    #7A2D3A;
  --pl-burgundy-pale: #F0E0E3;
  --pl-white:       #FFFFFF;
  --pl-border:      #D4CFC5;
  --pl-shadow:      rgba(45, 80, 22, 0.08);
  --pl-radius:      8px;
  --pl-radius-lg:   12px;
  --pl-font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --pl-font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Base Typography --- */
body {
  font-family: var(--pl-font-sans);
  color: var(--pl-text);
  background-color: var(--pl-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--pl-font-serif);
  color: var(--pl-charcoal);
  font-weight: 700;
  line-height: 1.2;
}

/* --- Header --- */
.site-header,
#masthead {
  background-color: var(--pl-white) !important;
  border-bottom: 1px solid var(--pl-border);
  box-shadow: 0 1px 4px var(--pl-shadow);
}

.site-branding .site-title a,
.site-branding .site-title {
  font-family: var(--pl-font-serif);
  color: var(--pl-green) !important;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

/* --- Navigation --- */
.main-navigation a,
.primary-menu a {
  font-family: var(--pl-font-sans);
  color: var(--pl-text) !important;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-navigation a:hover,
.primary-menu a:hover {
  color: var(--pl-green) !important;
}

/* --- Buttons --- */
.wp-block-button__link,
.button,
button[type="submit"],
.fl-btn,
a.pl-btn-primary {
  background-color: var(--pl-green) !important;
  color: var(--pl-white) !important;
  border: none !important;
  border-radius: var(--pl-radius) !important;
  padding: 0.75rem 1.75rem !important;
  font-family: var(--pl-font-sans) !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
  text-decoration: none !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease, transform 0.1s ease !important;
  display: inline-block !important;
}

.wp-block-button__link:hover,
.button:hover,
button[type="submit"]:hover,
a.pl-btn-primary:hover {
  background-color: var(--pl-green-light) !important;
  transform: translateY(-1px) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  color: var(--pl-green) !important;
  border: 2px solid var(--pl-green) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--pl-green-pale) !important;
}

/* --- Listing Badge Styles --- */
.pl-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}

.pl-badge-parishioner {
  background-color: var(--pl-green-pale);
  color: var(--pl-green);
  border: 1px solid rgba(45, 80, 22, 0.2);
}

.pl-badge-recommended {
  background-color: var(--pl-gold-light);
  color: #7A5A1A;
  border: 1px solid rgba(201, 168, 76, 0.3);
}

.pl-badge-supporter {
  background-color: var(--pl-blue-pale);
  color: var(--pl-blue-grey);
  border: 1px solid rgba(74, 107, 122, 0.2);
}

.pl-badge-featured {
  background-color: var(--pl-burgundy-pale);
  color: var(--pl-burgundy);
  border: 1px solid rgba(122, 45, 58, 0.2);
}

/* --- Cards --- */
.pl-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-border);
  border-radius: var(--pl-radius-lg);
  padding: 1.75rem;
  box-shadow: 0 2px 8px var(--pl-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pl-card:hover {
  box-shadow: 0 4px 16px rgba(45, 80, 22, 0.12);
  transform: translateY(-2px);
}

/* --- Section Backgrounds --- */
.pl-section-ivory {
  background-color: var(--pl-ivory);
}

.pl-section-white {
  background-color: var(--pl-white);
}

.pl-section-green {
  background-color: var(--pl-green);
  color: var(--pl-white);
}

.pl-section-green h1,
.pl-section-green h2,
.pl-section-green h3 {
  color: var(--pl-white);
}

/* --- Hero Section --- */
.pl-hero {
  background-color: var(--pl-ivory);
  padding: 5rem 2rem;
}

.pl-hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  color: var(--pl-charcoal);
  max-width: 600px;
  line-height: 1.15;
}

.pl-hero p.lead {
  font-size: 1.15rem;
  color: var(--pl-text-muted);
  max-width: 520px;
  line-height: 1.7;
}

/* --- Step Numbers --- */
.pl-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background-color: var(--pl-green);
  color: var(--pl-white);
  border-radius: 50%;
  font-family: var(--pl-font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Revenue Table --- */
.pl-revenue-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--pl-font-sans);
}

.pl-revenue-table th {
  background-color: var(--pl-green);
  color: var(--pl-white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.pl-revenue-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--pl-border);
  font-size: 0.9rem;
}

.pl-revenue-table tr:nth-child(even) td {
  background-color: var(--pl-ivory);
}

.pl-revenue-total {
  background-color: var(--pl-green-pale) !important;
  font-weight: 700;
  color: var(--pl-green);
}

/* --- Footer --- */
.site-footer,
#colophon {
  background-color: var(--pl-charcoal) !important;
  color: rgba(255,255,255,0.7) !important;
  padding: 3rem 2rem 1.5rem !important;
}

.site-footer a,
#colophon a {
  color: rgba(255,255,255,0.7) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover,
#colophon a:hover {
  color: var(--pl-white) !important;
}

/* --- Directorist Overrides --- */
.directorist-listing-card {
  border-radius: var(--pl-radius-lg) !important;
  border: 1px solid var(--pl-border) !important;
  box-shadow: 0 2px 8px var(--pl-shadow) !important;
  overflow: hidden;
}

.directorist-listing-card:hover {
  box-shadow: 0 4px 16px rgba(45, 80, 22, 0.12) !important;
}

.directorist-search-form .directorist-btn-primary,
.directorist-btn-primary {
  background-color: var(--pl-green) !important;
  border-color: var(--pl-green) !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .pl-hero {
    padding: 3rem 1.25rem;
  }
  
  .pl-hero h1 {
    font-size: 1.9rem;
  }
  
  .pl-card {
    padding: 1.25rem;
  }
}

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

/* --- Nav CTA Button Styles --- */

/* Make the nav fill the full header width so margin-left:auto works correctly */
/* The site-header-item wrapping the nav must grow to fill the right section */
.site-header-main-section-right {
  flex-grow: 1 !important;
}
.site-header-main-section-right .site-header-item {
  flex-grow: 1 !important;
  width: 100% !important;
}
#site-navigation,
.header-navigation,
.header-menu-container,
.primary-menu-container {
  flex-grow: 1 !important;
  width: 100% !important;
}

/* Override Kadence's justify-content:center so margin-left:auto can push Sign in to the right */
.header-navigation .menu,
#primary-menu,
ul#primary-menu {
  justify-content: flex-start !important;
  width: 100% !important;
}

/* Push Sign in (and CTA button) to the far right of the nav */
#primary-menu .nav-sign-in,
#primary-menu li.nav-sign-in,
ul#primary-menu > .nav-sign-in,
.menu-item.nav-sign-in {
  margin-left: auto !important;
}

/* Sign in: plain text link, same colour as other nav items */
.nav-sign-in > a,
.menu-item.nav-sign-in > a {
  color: inherit !important;
  font-weight: 500;
  padding: 6px 8px !important;
  transition: color 0.2s;
}
.nav-sign-in > a:hover,
.menu-item.nav-sign-in > a:hover {
  color: #2D5016 !important;
  text-decoration: none !important;
  background: transparent !important;
}

/* Start a Parish Directory: dark green button, white text, pill-shaped, far right */
.nav-cta-button > a,
.menu-item.nav-cta-button > a {
  background: #2D5016 !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 22px !important;
  border-radius: 50px !important;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
  display: inline-block;
  margin-left: 12px;
  font-size: 0.95rem;
  line-height: 1.4;
}
.nav-cta-button > a:hover,
.menu-item.nav-cta-button > a:hover {
  background: #3a6b1e !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

/* Mobile nav: ensure button looks correct in drawer */
@media (max-width: 1024px) {
  .nav-cta-button > a,
  .menu-item.nav-cta-button > a {
    display: inline-block !important;
    margin: 8px 0 4px 0 !important;
    padding: 10px 20px !important;
    width: auto !important;
  }
  .nav-sign-in > a,
  .menu-item.nav-sign-in > a {
    padding: 8px 0 !important;
  }
}

/* --- Footer: Remove Kadence WP Attribution --- */
/* Hide the entire footer credit paragraph and replace with just copyright */
.footer-html-inner a[href*="kadencewp.com"],
.site-info a[href*="kadencewp.com"] {
  display: none !important;
}
/* Hide the " - WordPress Theme by " text node by hiding the whole paragraph
   and using ::after to show only the copyright portion */
.footer-html-inner p {
  font-size: 0 !important;
  line-height: 0 !important;
}

.footer-html-inner p > *:not(a[href*="kadencewp.com"]) {
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* --- Mobile: directory listing cards get breathing room from screen edges --- */
@media (max-width: 600px) {
  .directorist-archive-contents .directorist-container-fluid {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .directorist-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .directorist-col-4 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}
/* --- Mobile: category filter pills scroll horizontally --- */
@media (max-width: 600px) {
  /* Main directory page pills */
  div.pl-dir-cats {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 16px 8px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    scrollbar-width: none !important;
  }
  div.pl-dir-cats > * {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
  div.pl-dir-cats::-webkit-scrollbar {
    display: none !important;
  }

  /* Category page pills (inside .pl-cat-header) */
  div.pl-cat-pills {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 8px !important;
    scrollbar-width: none !important;
  }
  div.pl-cat-pills::-webkit-scrollbar {
    display: none !important;
  }
  div.pl-cat-pills > a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
}
.pl-prev-nav-logo img { height: 84px !important; width: auto !important; }



