/*
Theme Name:   Bartonville Parks
Theme URI:    https://bartonville.org/parks-recreation/
Description:  Official companion theme for the Bartonville Parks & Recreation plugin. Fully customizable colors, logo, fonts, and layout via the WordPress Customizer.
Version:      1.0.0
Author:       Village of Bartonville
Author URI:   https://bartonville.org
License:      GPL-2.0+
Text Domain:  bartonville-parks-theme
Tags:         parks, recreation, government, responsive, accessibility-ready, custom-colors, custom-logo
*/

/* ============================================================
   CSS Custom Properties (overridden by Customizer)
   ============================================================ */
:root {
  --theme-primary:      #2d6a4f;
  --theme-secondary:    #52b788;
  --theme-accent:       #e67e22;
  --theme-text:         #2c3e50;
  --theme-bg:           #ffffff;
  --theme-bg-alt:       #f8faf9;
  --theme-border:       #e0e7e3;
  --theme-radius:       8px;
  --theme-font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --theme-font-heading: var(--theme-font-body);
  --theme-max-width:    1200px;
  --theme-header-bg:    #2d6a4f;
  --theme-header-text:  #ffffff;
  --theme-footer-bg:    #1b4332;
  --theme-footer-text:  #d8f3dc;
}

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--theme-font-body);
  color: var(--theme-text);
  background: var(--theme-bg);
  font-size: 16px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--theme-primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--theme-secondary); }
h1,h2,h3,h4,h5,h6 { font-family: var(--theme-font-heading); line-height: 1.25; color: var(--theme-text); }

/* ─── Layout ───────────────────────────────────────────────── */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }
.container { max-width: var(--theme-max-width); margin: 0 auto; padding: 0 24px; }

/* ─── Skip Link ────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 8px;
  background: var(--theme-primary); color: #fff;
  padding: 8px 16px; border-radius: 0 0 8px 8px;
  z-index: 10000; font-size: 14px;
}
.skip-link:focus { top: 0; }

/* ─── Site Header ──────────────────────────────────────────── */
.site-header {
  background: var(--theme-header-bg);
  color: var(--theme-header-text);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  min-height: 70px;
  max-width: var(--theme-max-width);
  margin: 0 auto;
}
.site-branding { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.site-branding a { text-decoration: none; }
.custom-logo { max-height: 56px; width: auto; }
.site-title {
  font-size: 20px; font-weight: 800;
  color: var(--theme-header-text);
  margin: 0; line-height: 1.2;
}
.site-title a { color: inherit; text-decoration: none; }
.site-description { font-size: 12px; opacity: .8; margin: 0; }

/* ─── Navigation ───────────────────────────────────────────── */
.main-navigation { display: flex; align-items: center; }
.main-navigation ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; align-items: center; gap: 4px;
}
.main-navigation li { position: relative; }
.main-navigation a {
  display: block; padding: 8px 14px;
  color: var(--theme-header-text);
  font-size: 14px; font-weight: 600;
  border-radius: 6px; text-decoration: none;
  transition: background .2s;
  opacity: .9;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  background: rgba(255,255,255,.15);
  opacity: 1;
}
/* Dropdown */
.main-navigation .sub-menu {
  position: absolute; top: 100%; left: 0;
  background: #fff; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  min-width: 200px; flex-direction: column;
  padding: 8px 0;
  display: none;
  z-index: 200;
}
.main-navigation li:hover > .sub-menu { display: flex; }
.main-navigation .sub-menu a { color: var(--theme-text); padding: 8px 16px; border-radius: 0; font-size: 14px; }
.main-navigation .sub-menu a:hover { background: var(--theme-bg-alt); color: var(--theme-primary); }

/* Mobile menu toggle */
.menu-toggle {
  display: none; background: rgba(255,255,255,.15);
  border: none; color: var(--theme-header-text);
  padding: 8px 12px; border-radius: 6px;
  cursor: pointer; font-size: 20px; line-height: 1;
}
.menu-toggle:hover { background: rgba(255,255,255,.25); }

/* ─── Hero Banner ──────────────────────────────────────────── */
.site-hero {
  background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary));
  color: #fff;
  padding: 60px 24px;
  text-align: center;
}
.site-hero h1 { font-size: clamp(28px, 5vw, 52px); margin: 0 0 12px; color: #fff; }
.site-hero p  { font-size: 18px; opacity: .9; max-width: 600px; margin: 0 auto 24px; }

/* ─── Quick Links ──────────────────────────────────────────── */
.quick-links-bar { background: var(--theme-bg-alt); border-bottom: 1px solid var(--theme-border); }
.quick-links-bar .container { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.quick-link-card {
  flex: 1; min-width: 140px;
  background: #fff; border: 1.5px solid var(--theme-border);
  border-radius: var(--theme-radius);
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--theme-text);
  transition: all .2s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
}
.quick-link-card:hover { border-color: var(--theme-primary); color: var(--theme-primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); text-decoration: none; }
.quick-link-card .icon { font-size: 28px; }

/* ─── Page Header ──────────────────────────────────────────── */
.page-header {
  background: var(--theme-bg-alt);
  border-bottom: 1px solid var(--theme-border);
  padding: 32px 0 24px;
}
.page-title { font-size: 32px; margin: 0; }
.page-description { color: #666; margin: 8px 0 0; }
.breadcrumb { font-size: 13px; color: #888; margin-bottom: 12px; }
.breadcrumb a { color: var(--theme-primary); }

/* ─── Main Content Area ────────────────────────────────────── */
.content-area { padding: 40px 0; }
.content-with-sidebar {
  display: grid; grid-template-columns: 1fr 280px; gap: 40px;
}
.entry-content { max-width: 100%; }
.entry-content p,
.entry-content ul,
.entry-content ol { margin: 0 0 1.2em; }
.entry-content h2, .entry-content h3 { margin: 1.5em 0 .5em; }

/* ─── Sidebar ──────────────────────────────────────────────── */
.sidebar { padding-top: 8px; }
.widget { margin-bottom: 32px; }
.widget-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--theme-primary);
  border-bottom: 2px solid var(--theme-primary);
  padding-bottom: 8px; margin-bottom: 16px;
}

/* ─── Cards ────────────────────────────────────────────────── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: #fff; border: 1.5px solid var(--theme-border);
  border-radius: var(--theme-radius);
  overflow: hidden; transition: all .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-3px); }
.card-img { height: 180px; overflow: hidden; background: var(--theme-bg-alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; }
.card-title { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.card-text  { font-size: 14px; color: #666; margin: 0 0 16px; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn, .wp-block-button .wp-block-button__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px;
  border-radius: var(--theme-radius);
  font-size: 15px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  text-decoration: none; transition: all .2s;
  font-family: var(--theme-font-body); line-height: 1;
}
.btn-primary, .wp-block-button .wp-block-button__link {
  background: var(--theme-primary); color: #fff;
  border-color: var(--theme-primary);
}
.btn-primary:hover, .wp-block-button .wp-block-button__link:hover {
  background: #1b4332; border-color: #1b4332; text-decoration: none; color: #fff;
}
.btn-outline {
  background: #fff; color: var(--theme-primary);
  border-color: var(--theme-primary);
}
.btn-outline:hover { background: rgba(45,106,79,.06); text-decoration: none; }
.btn-accent { background: var(--theme-accent); color: #fff; border-color: var(--theme-accent); }
.btn-accent:hover { background: #d35400; border-color: #d35400; text-decoration: none; color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 17px; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ─── Alert bar ────────────────────────────────────────────── */
.site-alert {
  background: var(--theme-accent); color: #fff;
  padding: 10px 24px; text-align: center; font-size: 14px; font-weight: 600;
}
.site-alert a { color: #fff; text-decoration: underline; }

/* ─── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--theme-footer-bg);
  color: var(--theme-footer-text);
  padding: 48px 0 0;
  margin-top: auto;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  max-width: var(--theme-max-width); margin: 0 auto; padding: 0 24px;
}
.footer-brand .site-title { color: var(--theme-footer-text); margin-bottom: 12px; }
.footer-desc { font-size: 14px; opacity: .8; line-height: 1.6; }
.footer-col h4 {
  color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
  margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.15);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--theme-footer-text); font-size: 14px; opacity: .85; text-decoration: none; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-contact { font-size: 14px; opacity: .85; line-height: 1.8; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1); display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 16px;
  text-decoration: none; transition: background .2s;
}
.footer-social a:hover { background: rgba(255,255,255,.25); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 24px;
  text-align: center; font-size: 13px; opacity: .7;
  margin-top: 40px;
  max-width: var(--theme-max-width); margin-left: auto; margin-right: auto;
}

/* ─── Posts / Blog ─────────────────────────────────────────── */
.post-thumbnail { margin-bottom: 24px; border-radius: var(--theme-radius); overflow: hidden; }
.post-thumbnail img { width: 100%; }
.entry-header { margin-bottom: 24px; }
.entry-title { font-size: 32px; margin: 0 0 8px; }
.entry-meta { font-size: 13px; color: #888; }
.entry-meta a { color: var(--theme-primary); }
.post-navigation { display: flex; justify-content: space-between; border-top: 1px solid var(--theme-border); padding-top: 24px; margin-top: 32px; gap: 20px; }

/* ─── Pagination ───────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pagination a, .pagination span {
  padding: 8px 14px; border-radius: 6px; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--theme-border); text-decoration: none; color: var(--theme-text);
}
.pagination .current { background: var(--theme-primary); color: #fff; border-color: var(--theme-primary); }
.pagination a:hover { border-color: var(--theme-primary); color: var(--theme-primary); }

/* ─── 404 ──────────────────────────────────────────────────── */
.error-404 { text-align: center; padding: 80px 24px; }
.error-404 .error-code { font-size: 120px; font-weight: 900; color: var(--theme-primary); opacity: .2; line-height: 1; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .content-with-sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .menu-toggle { display: block; }
  .main-navigation { display: none; }
  .main-navigation.is-open {
    display: block;
    position: absolute; top: 70px; left: 0; right: 0;
    background: var(--theme-header-bg);
    box-shadow: 0 8px 24px rgba(0,0,0,.2);
    z-index: 200; padding: 8px 0;
  }
  .main-navigation.is-open ul { flex-direction: column; gap: 0; }
  .main-navigation.is-open a { border-radius: 0; padding: 12px 24px; }
  .main-navigation.is-open .sub-menu { position: static; box-shadow: none; display: flex; background: rgba(0,0,0,.2); }
  .quick-links-bar .container { gap: 6px; }
  .quick-link-card { min-width: 100px; padding: 12px 8px; font-size: 12px; }
  .footer-grid { grid-template-columns: 1fr; }
}
