/*
Theme Name: Avenal Museum
Theme URI: https://avenalmuseum.com
Author: Avenal Historical Society
Author URI: https://avenalmuseum.com
Description: Custom theme for the Avenal Historical Society & Museum website. Blue and gold color scheme with Playfair Display and Source Sans 3 typography.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: avenal-museum
*/

/* ═══════════════════════════════════════════════════════════
   AVENAL MUSEUM — CUSTOM WORDPRESS THEME
   Blue & Gold Community Theme
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #FFFFFF;
  --fg: #0A1929;
  --fg-muted: #455A74;
  --accent: #1565C0;
  --accent-hover: #1976D2;
  --accent-bg: #E3F2FD;
  --gold: #F9A825;
  --gold-dark: #E8950A;
  --gold-bg: #FFF8E1;
  --blue: #1565C0;
  --blue-light: #E3F2FD;
  --red: #C62828;
  --red-light: #FFEBEE;
  --green: #2E7D32;
  --green-light: #E8F5E9;
  --surface: #F5F5F7;
  --surface-alt: #EEEFF2;
  --hero-bg: #0A1929;
  --hero-fg: #FFFFFF;
  --border: #DDE0E6;
  --shadow: rgba(10, 25, 41, 0.1);
  --radius: 8px;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
}
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.2;
  text-wrap: balance;
}
img { max-width: 100%; height: auto; }
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--hero-bg);
  color: #fff;
  padding-block: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 62px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}
.nav-brand:hover { text-decoration: none; color: #fff; }
.nav-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
}
.nav-brand-sub {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links li { position: relative; }
.nav-links a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.nav-links a:hover {
  background: rgba(255,255,255,0.15);
  text-decoration: none;
  color: #fff;
}
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a {
  background: rgba(255,255,255,0.2);
}
.nav-links .menu-item-has-children > a::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.7;
}
.nav-links .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--hero-bg);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  min-width: 200px;
  padding: 0.4rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 100;
  list-style: none;
}
.nav-links .sub-menu a { padding: 0.45rem 1rem; font-size: 0.84rem; white-space: nowrap; }
.nav-links .menu-item-has-children:hover > .sub-menu,
.nav-links .menu-item-has-children:focus-within > .sub-menu { display: block; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.3rem;
  line-height: 1;
}
@media (max-width: 700px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--hero-bg);
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 0.5rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 1.2rem; }
  .nav-links .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    background: rgba(0,0,0,0.15);
    display: none;
  }
  .nav-links .menu-item-has-children:hover > .sub-menu { display: none; }
  .nav-links .menu-item-has-children.open > .sub-menu { display: block; }
}

/* ── ANNOUNCEMENT BAR ── */
.announce {
  background: var(--gold);
  color: var(--hero-bg);
  padding-block: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--shadow);
  text-decoration: none;
}
.btn-primary { background: var(--gold); color: #1A1A2E; }
.btn-primary:hover { background: var(--gold-dark); color: #1A1A2E; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, var(--hero-bg) 0%, #0D2137 50%, var(--accent) 100%);
  color: #fff;
  padding-top: 3rem;
  padding-bottom: 3rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(249,168,37,0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(21,101,192,0.25) 0%, transparent 50%);
  pointer-events: none;
}
.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 700px) {
  .hero-layout { grid-template-columns: 1fr; text-align: center; }
}
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  margin: 0 0 0.6rem;
  line-height: 1.1;
  color: #fff;
}
.hero-tagline {
  font-size: 1.05rem;
  font-weight: 300;
  opacity: 0.9;
  margin-bottom: 1.8rem;
  line-height: 1.5;
}
.hero-cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .hero-cta { justify-content: center; }
}
.hero-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.hero-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  border: 2px solid rgba(255,255,255,0.15);
}
.hero-img.tall { grid-row: span 2; }
.hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── PHOTO STRIP ── */
.photo-strip-wrap {
  background: var(--hero-bg);
  padding-block: 0.6rem;
}
.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}
@media (max-width: 600px) {
  .photo-strip { grid-template-columns: 1fr 1fr; }
}
.photo-strip-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255,255,255,0.1);
}
.photo-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── SECTIONS ── */
section { padding-block: 3.5rem; }
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin: 0 0 0.5rem;
}
.section-lead {
  color: var(--fg-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 2rem;
}

/* ── EVENTS ── */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.event-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 2px 8px var(--shadow);
}
.event-date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.event-card h3 { font-size: 1.25rem; margin: 0; }
.event-card p { color: var(--fg-muted); font-size: 0.92rem; margin: 0; flex: 1; }
.event-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: flex-start;
}
.tag-day1 { background: var(--red-light); color: var(--red); }
.tag-day2 { background: var(--blue-light); color: var(--blue); }
.tag-special { background: var(--gold-bg); color: var(--gold-dark); }

/* ── POSTER SECTION ── */
.poster-banner {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 1.5rem;
  border: 1px solid var(--border);
}
.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}
.poster-frame {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 4px 16px var(--shadow);
  position: relative;
  background: var(--surface-alt);
}
.poster-frame img { width: 100%; height: 100%; object-fit: cover; }
.poster-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(10,25,41,0.85));
  color: #fff;
  padding: 1.5rem 0.8rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── REUNION ── */
.reunion-banner {
  background: linear-gradient(135deg, var(--blue), #1A237E);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 4px 20px rgba(21,101,192,0.3);
}
@media (max-width: 700px) {
  .reunion-banner { grid-template-columns: 1fr; padding: 1.5rem; }
}
.reunion-banner h2 { color: #fff; margin-bottom: 0.5rem; }
.reunion-details {
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 1.2rem;
  backdrop-filter: blur(4px);
}
.reunion-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.reunion-row:last-child { border-bottom: none; }
.reunion-row .rl { opacity: 0.7; }
.reunion-row .rv { font-weight: 600; }
.reunion-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.reunion-photo {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.2);
}
.reunion-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── STORE & DONATE ── */
.store-section {
  background: var(--surface);
  border-top: 3px solid var(--gold);
}
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}
.store-item {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.store-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow);
}
.store-img {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--surface-alt);
}
.store-body {
  padding: 1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}
.store-body h4 { font-size: 1rem; margin: 0; }
.store-body .price { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.store-body p { font-size: 0.85rem; color: var(--fg-muted); margin: 0; flex: 1; }
.donate-banner {
  background: linear-gradient(135deg, var(--accent), #0D47A1);
  color: #fff;
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin-top: 2rem;
  box-shadow: 0 4px 20px rgba(21,101,192,0.25);
}
.donate-banner h3 { color: #fff; margin: 0 0 0.5rem; font-size: 1.4rem; }
.donate-banner p { opacity: 0.9; margin-bottom: 1.2rem; max-width: 520px; margin-inline: auto; }
.donate-contact { font-size: 0.85rem; opacity: 0.8; margin: 0; }

/* ── ABOUT ── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 700px) { .about-layout { grid-template-columns: 1fr; } }
.about-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}
.about-photo {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px var(--shadow);
}
.about-photo.wide { grid-column: span 2; aspect-ratio: 16/9; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.fact-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 600px) { .fact-row { grid-template-columns: 1fr 1fr; } }
.fact-box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.2rem;
  text-align: center;
  border: 1px solid var(--border);
}
.fact-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 800;
  display: block;
}
.fact-num.red { color: var(--accent); }
.fact-num.gold { color: var(--gold-dark); }
.fact-num.blue { color: var(--blue); }
.fact-num.green { color: var(--green); }
.fact-label { font-size: 0.75rem; color: var(--fg-muted); margin-top: 0.2rem; font-weight: 500; }
.board-photo {
  margin-top: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px var(--shadow);
}
.board-photo img { width: 100%; display: block; }

/* ── VISIT ── */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) { .visit-grid { grid-template-columns: 1fr; } }
.info-block {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.info-block h3 { font-size: 1.1rem; margin: 0 0 0.8rem; }
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--fg-muted); }
.info-row .value { font-weight: 600; }
.contact-line {
  padding: 0.4rem 0;
  font-size: 0.92rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

/* ── CONTACT FORM ── */
.contact-form-wrap {
  max-width: 500px;
  margin: 1.5rem auto 0;
}
.contact-form-wrap input,
.contact-form-wrap textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.9rem;
}
.contact-form-wrap textarea { resize: vertical; }

/* ── FOOTER ── */
.site-footer {
  background: var(--hero-bg);
  color: #fff;
  padding-block: 2.5rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-about p { font-size: 0.88rem; opacity: 0.7; line-height: 1.6; }
.footer-links h4, .footer-contact h4 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.8rem;
  opacity: 0.45;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
}
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { padding: 0.2rem 0; }
.footer-links a { color: #fff; opacity: 0.7; font-size: 0.88rem; }
.footer-links a:hover { opacity: 1; text-decoration: none; }
.footer-contact p { font-size: 0.85rem; opacity: 0.7; margin: 0.3rem 0; }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  opacity: 0.45;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── GENERIC PAGE ── */
.page-header {
  background: linear-gradient(135deg, var(--hero-bg) 0%, var(--accent) 100%);
  color: #fff;
  padding: 3rem 0 2rem;
}
.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0;
  color: #fff;
}
.page-content {
  padding: 3rem 0;
}
.page-content p {
  max-width: 720px;
  margin-bottom: 1.2rem;
}
.page-content img {
  border-radius: var(--radius);
  margin: 1rem 0;
}
.page-content h2 {
  margin-top: 2rem;
}

/* ── BLOG / POSTS ── */
.post-list {
  display: grid;
  gap: 2rem;
  max-width: 720px;
}
.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.post-card h2 {
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}
.post-card h2 a { color: var(--fg); }
.post-card h2 a:hover { color: var(--accent); text-decoration: none; }
.post-meta {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 0.8rem;
}
.post-excerpt { color: var(--fg-muted); font-size: 0.95rem; }

/* ── 404 ── */
.error-404 {
  text-align: center;
  padding: 4rem 0;
}
.error-404 h1 {
  font-size: 4rem;
  color: var(--accent);
  margin: 0;
}
.error-404 p {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin: 1rem 0 2rem;
}

/* ── ARCHIVE SECTION ── */
.archive-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* ── SCROLL & FOCUS ── */
html { scroll-behavior: smooth; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ── WP Admin Bar Adjustment ── */
body.admin-bar .site-nav {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .site-nav {
    top: 46px;
  }
}
