/*
Theme Name: American Legion Post 144
Theme URI: https://post144belmont.com/
Author: Codex
Description: Custom WordPress theme for Belmont American Legion Post 144 (Belmont, NC).
Version: 1.11.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: legion-post-144
*/

:root {
  --navy: #0a2240;
  --navy-deep: #071730;
  --red: #b22234;
  --red-deep: #861a27;
  --gold: #b8963e;
  --gold-light: #d9bd7a;
  --white: #ffffff;
  --cream: #f7f5f0;
  --ink: #1b1b1b;
  --gray-700: #3a3a3d;
  --gray-600: #55555a;
  --gray-400: #8a8a8f;
  --gray-300: #d8d5cd;
  --gray-100: #f1efe9;
  --shadow: 0 1px 2px rgba(10, 34, 64, 0.06), 0 10px 24px rgba(10, 34, 64, 0.08);
  --shadow-lift: 0 6px 14px rgba(10, 34, 64, 0.1), 0 22px 44px rgba(10, 34, 64, 0.16);
  --radius: 14px;
  --radius-sm: 8px;
  --section-pad: 2.5rem;
  --section-pad-mobile: 1.75rem;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: var(--red);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

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

.container {
  width: min(var(--max-width), 92%);
  margin: 0 auto;
}

.section {
  padding-block: var(--section-pad);
}

@media (max-width: 782px) {
  .section {
    padding-block: var(--section-pad-mobile);
  }
}

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

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

/* Top contact bar */
.top-bar {
  background: var(--navy-deep);
  color: var(--white);
  font-size: 0.85rem;
}
.top-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0;
}
.top-bar a { color: var(--gold-light); }
.top-bar-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.top-bar-social {
  display: inline-flex;
  align-items: center;
  color: var(--gold-light);
  transition: color 0.15s ease;
}
.top-bar-social:hover { color: var(--white); }
.top-bar-social svg { display: block; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 3px solid var(--red);
  box-shadow: var(--shadow);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
}
.nav-brand {
  display: flex;
  align-items: center;
}
.nav-logo {
  height: 44px;
  width: auto;
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 4px 0;
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a { color: var(--navy); }
.nav-links a:hover { color: var(--red); text-decoration: none; }
.nav-cta {
  background: var(--red);
  color: var(--white) !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--red-deep); text-decoration: none; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
    padding: 1rem 0;
    gap: 0.85rem;
  }
  .nav-links.is-open { display: flex; }
  .nav .container { flex-wrap: wrap; }
  .nav-cta { order: 3; }
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--gray-100);
  font-size: 0.85rem;
  padding: 0.6rem 0;
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--gray-400);
}
.breadcrumbs a { color: var(--gray-600); }
.breadcrumbs li[aria-current] { color: var(--navy); font-weight: 600; }

/* Hero background: American Legion emblem watermark on navy (see
   dev-notes for the earlier building-photo history). Gradient stays as
   the background-color fallback while the image loads/if it 404s. */
.hero {
  position: relative;
  background-color: var(--navy);
  background-image: url('assets/img/hero-background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  overflow: hidden;
}
.hero-photo-zone,
.hero-text-zone {
  position: relative;
  z-index: 1;
}
.hero-photo-zone {
  padding-block: 5rem 0;
}
.hero-text-zone {
  padding-block: 1.5rem 5rem;
}

@media (max-width: 782px) {
  .hero-photo-zone {
    padding-block: 2.5rem 1.5rem;
  }
  .hero-text-zone {
    padding-block: 1rem 3rem;
  }
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.hero h1 {
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  margin-bottom: 0.3rem;
}
.hero-tagline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  margin: 0 0 1rem;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gold-light);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.hero p.lede {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 2px 10px rgba(0, 0, 0, 0.6);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover { background: var(--red-deep); }
.btn-gold {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-gold:hover { background: var(--gold-light); }
.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-navy {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

/* Cards / grids */
.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--red);
}
.card h3 { margin-bottom: 0.5rem; }
.card-gold { border-top-color: var(--gold); }
.card-navy { border-top-color: var(--navy); }

.stat {
  text-align: center;
}
.stat strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 2rem;
  color: var(--red);
}
.stat span {
  color: var(--gray-600);
  font-size: 0.9rem;
}

/* Info strip (address/phone/hours). Flex instead of an equal-fraction
   grid so each item is only as wide as its own content (a short phone
   number doesn't stretch into a wide column with dead space before the
   next item) — items sit close together and wrap naturally instead. */
.info-strip {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.75rem;
}
.info-strip > div {
  flex: 0 1 auto;
  max-width: 260px;
}
.info-strip dt {
  font-weight: 700;
  color: var(--navy);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.info-strip dd { margin: 0.25rem 0 0; }

/* Forms */
.form {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  max-width: 640px;
}
.field {
  margin-bottom: 1rem;
}
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--navy);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--cream);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.form-status-success {
  background: #e6f4ea;
  color: #1e6b3a;
  border: 1px solid #b6e0c2;
}
.form-status-error {
  background: #fbe9e9;
  color: var(--red-deep);
  border: 1px solid #f0bcbc;
}

/* Placeholder / flagged-content notice */
.notice-pending {
  background: #fff6e5;
  border: 1px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--gray-700);
}

/* Table (hall rental specs, etc.) */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.spec-table th, .spec-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.spec-table th { color: var(--navy); width: 40%; }

/* Map embed wrapper */
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; }

/* Footer */
.footer {
  background: var(--navy-deep);
  color: var(--gray-300);
  padding-block: 3rem 1.5rem;
}
.footer h2 {
  color: var(--white);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.footer a { color: var(--gray-300); }
.footer a:hover { color: var(--gold-light); }
.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-social svg { display: block; flex-shrink: 0; }
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}
.footer-brand {
  font-family: Georgia, serif;
  font-weight: 700;
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.footer-bottom {
  padding-top: 1.25rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.eyebrow {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}
.lede {
  font-size: 1.1rem;
  color: var(--gray-700);
}
.divider-stripe {
  height: 6px;
  background: var(--red);
}

/* The Events Calendar plugin — light theme-consistency overrides.
   Targets the plugin's own markup classes; not our own components. */
.tribe-events-view {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tribe-events-c-subscribe-dropdown__container {
  display: inline-block !important;
  width: auto !important;
}
.tribe-events-c-subscribe-dropdown__button {
  padding: 0.6rem 1rem !important;
}
/* TEC sets min-height: 168px directly on the day cells (a separate,
   more specific rule from the plain "height" property) — that's the
   actual floor keeping empty cells tall, not something a "height"
   override alone can shrink. Override min-height itself instead. */
.tribe-events-calendar-month__day {
  min-height: 70px !important;
  border: 1px solid #000 !important;
}
/* TEC's own content container adds a large top/bottom padding plus a
   600-700px min-height on top of that — that's the gap above the
   search bar and a big chunk of the "too tall" page length. */
.tribe-events-l-container {
  min-height: 0 !important;
  padding-top: 1rem !important;
  padding-bottom: 1.5rem !important;
}
