/*
Theme Name: FCCS Custom v2
Theme URI: https://fccseniors.org
Author: Friends of Calvert County Seniors
Description: Custom lightweight theme for Friends of Calvert County Seniors. No page builder, no premium tier, no framework upsell. Built for readability and WCAG AA contrast, and fully editable through the WordPress admin or directly in code. v2: all CSS lives in this one file (the old Customizer > Additional CSS block is folded in at the bottom), brand palette and fonts are registered for the block editor (theme.json + editor palette), the homepage CTA banner and footer are Customizer-editable, block patterns cover the reusable layouts, and settings (menus, logo, hero text) migrate automatically from FCCS Custom v1 on first activation.
Version: 2.0.7
Requires at least: 6.0
Tested up to: 7.1
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: fccs-custom
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1a2e4a;
  --navy-soft: #2a4a6e;
  --gold: #c8973a;        /* decorative / on dark backgrounds only */
  --gold-light: #e8b85a;  /* on dark backgrounds only */
  --gold-dark: #7f5c1d;   /* text + links on LIGHT backgrounds (WCAG AA) */
  --cream: #faf7f2;
  --warm-gray: #f0ebe2;
  --text: #2c2c2c;
  --text-muted: #5f5f5f;
  --white: #ffffff;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--cream);
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
}

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

/* Visible focus outline for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold-dark);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: -9999px;
  background: var(--white); color: var(--navy);
  padding: 12px 20px; z-index: 999; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ── HEADER / NAV ── */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.site-nav {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-light);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo span { color: var(--white); font-weight: 400; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.main-nav ul li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 9px 11px;
  border-radius: 4px;
  display: inline-block;
  transition: color 0.2s, background 0.2s;
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item > a {
  color: var(--gold-light);
  background: rgba(200,151,58,0.18);
}
.main-nav ul li.menu-item-donate > a {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  padding: 9px 18px;
  margin-left: 6px;
}
.main-nav ul li.menu-item-donate > a:hover { background: var(--gold-light); color: var(--navy); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 8px;
}
.hamburger span { display: block; width: 26px; height: 3px; background: var(--white); border-radius: 2px; }

/* ── HEROES ── */
.hero, .page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 60%, #1a3a5a 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero { padding: 52px 24px 48px; }
.page-hero { padding: 38px 24px 34px; }
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(200,151,58,0.15) 0%, transparent 60%);
}
.hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 22px;
  color: var(--white);
}
.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 10px;
}
.hero-lead { font-size: 1.15rem; color: rgba(255,255,255,0.9); max-width: 600px; margin: 0 auto 26px; }
.page-hero p { color: rgba(255,255,255,0.9); max-width: 600px; margin: 0 auto; }

/* ── BUTTONS ── */
.btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.btn-primary { background: var(--gold); color: var(--navy) !important; }
.btn-primary:hover { background: var(--gold-light); }
.btn-outline { border-color: rgba(255,255,255,0.7); color: var(--white) !important; background: transparent; }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.12); }

/* ── CONTENT ── */
.content-wrap { max-width: 820px; margin: 0 auto; padding: 60px 24px 76px; }
.content-wrap.wide { max-width: 1140px; }

.entry-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  margin: 48px 0 16px;
}
.entry-content > h2:first-child { margin-top: 0; }
.entry-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 30px 0 10px;
}
.entry-content p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol { margin: 0 0 22px 24px; }
.entry-content li { margin-bottom: 12px; }
.entry-content strong { color: var(--navy); }
.entry-content a { color: var(--gold-dark); font-weight: 600; text-decoration: underline; }
.entry-content a:hover { color: var(--navy); }

.entry-content blockquote {
  background: var(--white);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 22px 26px;
  margin: 0 0 18px;
  font-style: italic;
  color: var(--text);
}
.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content iframe { width: 100%; border: none; border-radius: 8px; }

.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 10px;
  display: block;
}

/* ── FACEBOOK EMBED WRAP ── */
.fb-embed-wrap {
  background: var(--white);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  text-align: center;
}

/* ── TEAM GRID ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 28px;
  margin-top: 24px;
}
.member-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.member-photo { width: 100%; height: 240px; object-fit: cover; display: block; }
.member-photo-placeholder {
  width: 100%; height: 240px;
  background: linear-gradient(135deg, var(--warm-gray), #dcd6ca);
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: var(--text-muted);
}
.member-info { padding: 20px 22px 24px; }
.member-name { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.member-role {
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--gold-dark); margin: 5px 0 10px;
}
.member-bio { font-size: 0.96rem; color: var(--text); }
.member-bio p:last-child { margin-bottom: 0; }
.no-members {
  grid-column: 1/-1; text-align: center; padding: 40px 24px;
  color: var(--text-muted); background: var(--white); border-radius: 8px;
}

/* ── NEWS / BLOG LIST ── */
.news-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.news-item {
  background: var(--white);
  border-radius: 6px;
  padding: 22px 26px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  border-left: 4px solid var(--gold);
}
.news-date {
  flex-shrink: 0; text-align: center;
  background: var(--navy); color: var(--white);
  border-radius: 4px; padding: 10px 14px; min-width: 72px;
}
.news-date .nd-month { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-light); font-weight: 700; }
.news-date .nd-day { font-family: 'Playfair Display', serif; font-size: 1.85rem; font-weight: 900; line-height: 1.05; }
.news-date .nd-year { font-size: 0.74rem; color: rgba(255,255,255,0.75); }
.news-body { flex: 1; }
.news-body h2 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin: 0 0 6px; }
.news-body h2 a { color: var(--navy); text-decoration: none; }
.news-body h2 a:hover { color: var(--gold-dark); text-decoration: underline; }
.news-body p { font-size: 0.97rem; color: var(--text-muted); margin: 0; }
.no-news { text-align: center; padding: 40px 0; color: var(--text-muted); }

.pagination { margin-top: 32px; text-align: center; }
.pagination .page-numbers {
  display: inline-block; padding: 8px 14px; margin: 0 3px;
  background: var(--white); border-radius: 4px; color: var(--navy);
  text-decoration: none; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--navy); color: var(--white); }

/* ── CTA BANNER ── */
.cta-banner { background: var(--navy); color: var(--white); text-align: center; padding: 44px 24px; }
.cta-banner h2 { font-family: 'Playfair Display', serif; color: var(--white); margin-bottom: 12px; font-size: 1.8rem; }
.cta-banner p { color: rgba(255,255,255,0.9); margin-bottom: 26px; }

/* ── CONTACT FORM 7 ── */
.wpcf7 label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 16px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"],
.wpcf7 input[type="tel"], .wpcf7 textarea {
  width: 100%;
  border: 1.5px solid #bbb;
  border-radius: 4px;
  padding: 12px 14px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 1rem;
  background: var(--white);
  margin-top: 6px;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { border-color: var(--gold-dark); }
.wpcf7 textarea { min-height: 130px; resize: vertical; }
.wpcf7 input[type="submit"] {
  background: var(--gold); color: var(--navy);
  border: none; padding: 14px 30px; border-radius: 4px;
  font-weight: 700; font-size: 1rem; cursor: pointer;
}
.wpcf7 input[type="submit"]:hover { background: var(--gold-light); }
.wpcf7-response-output { border-radius: 4px !important; margin-top: 16px !important; }

/* ── FOOTER ── */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.85); padding: 24px 24px 16px; text-align: center; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--gold-light); margin-bottom: 8px; }
.site-footer p { font-size: 0.92rem; margin-bottom: 4px; }
.site-footer a { color: var(--gold-light); }
.footer-links { list-style: none; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 10px 0; padding: 0; }
.footer-links li a { font-size: 0.9rem; color: rgba(255,255,255,0.85); text-decoration: none; }
.footer-links li a:hover { color: var(--gold-light); text-decoration: underline; }

/* ── MOBILE ── */
@media (max-width: 900px) {
  .hamburger { display: flex; }
  .main-nav { width: 100%; }
  .main-nav ul { display: none; flex-direction: column; width: 100%; gap: 0; padding: 8px 0 4px; }
  .main-nav ul.open { display: flex; }
  .main-nav ul li { width: 100%; }
  .main-nav ul li a { display: block; padding: 14px 8px; font-size: 1.05rem; }
  .main-nav ul li.menu-item-donate > a { margin: 8px 0 0; text-align: center; }
  .news-item { flex-direction: column; gap: 14px; }
}

/* ── CUSTOM LOGO (Appearance > Customize > Site Identity) ── */
.site-header .custom-logo-link { display: block; line-height: 0; }
.site-header .custom-logo {
  max-height: 56px;
  width: auto;
  display: block;
}
@media (max-width: 900px) {
  .site-header .custom-logo { max-height: 46px; }
}
/* Footer logo image, if one is set */
.site-footer .custom-logo { max-height: 48px; width: auto; margin: 0 auto 10px; }

/* ── v2 additions: search form (search / 404 templates only) ── */
.search-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.search-form label { flex: 1 1 260px; max-width: 420px; }
.search-form .search-field {
  width: 100%; border: 1.5px solid #bbb; border-radius: 4px; padding: 12px 14px;
  font-family: 'Source Sans 3', sans-serif; font-size: 1rem; background: var(--white);
}
.search-form .search-submit {
  background: var(--gold); color: var(--navy); border: none; padding: 12px 26px;
  border-radius: 4px; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.search-form .search-submit:hover { background: var(--gold-light); }


/* ══════════════════════════════════════════════════════════════════
   v2: FORMER CUSTOMIZER > ADDITIONAL CSS, FOLDED INTO THE THEME.
   In v1 these rules lived in the database (Appearance > Customize >
   Additional CSS) and loaded after style.css. They are preserved
   verbatim and in the same cascade position (end of file) so v2
   renders identically. After activating v2 you may delete the old
   Additional CSS block — keeping it is harmless duplication.
   ══════════════════════════════════════════════════════════════════ */
/* Logo scales fluidly */
.site-header .custom-logo {
  height: clamp(28px, 4.5vw, 48px);
  width: auto;
  max-height: none;
}

/* Keep logo and menu on one line — desktop only */
@media (min-width: 901px) {
  .site-nav {
    flex-wrap: nowrap;
  }
  .site-nav .main-nav {
    margin-left: auto;
    min-width: 0;
  }
  .site-nav .main-nav ul {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
}

/* ── DROPDOWN SUBMENUS (desktop) ── */
@media (min-width: 901px) {
  .site-nav .main-nav ul li {
    position: relative;
  }

  .site-nav .main-nav ul .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #1a2e4a;
    border-top: 3px solid #c8973a;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    padding: 6px 0;
    margin: 0;
    flex-direction: column;
    z-index: 200;
  }

  /* Open on hover AND on keyboard focus */
  .site-nav .main-nav ul li:hover > .sub-menu,
  .site-nav .main-nav ul li:focus-within > .sub-menu {
    display: flex;
  }

  .site-nav .main-nav ul .sub-menu li {
    width: 100%;
  }

  .site-nav .main-nav ul .sub-menu li a {
    display: block;
    width: 100%;
    padding: 10px 18px;
    white-space: nowrap;
    border-radius: 0;
    font-size: 0.9rem;
  }

  /* Little caret so people know there's a submenu */
  .site-nav .main-nav ul li.menu-item-has-children > a::after {
    content: "▾";
    margin-left: 5px;
    font-size: 0.8em;
  }

  /* Keep the last dropdown from running off the right edge */
  .site-nav .main-nav ul li:last-child .sub-menu,
  .site-nav .main-nav ul li:nth-last-child(2) .sub-menu {
    left: auto;
    right: 0;
  }
}

/* ── MOBILE: just indent submenu items, no dropdown ── */
@media (max-width: 900px) {
  .site-nav .main-nav ul .sub-menu {
    display: block;
    padding-left: 18px;
    background: rgba(0,0,0,0.2);
  }
}

/* ── v2.0.2: staff-only note block ───────────────────────────────
   Used for the "how to post" note on the Blog (stories) page.
   The block sits in the page content, but on the front end it is
   display:none for everyone except logged-in users (WordPress adds
   .logged-in to <body>). Inside the block editor it always shows,
   so it is easy to find and delete before launch. */
.fccs-admin-note { display: none; }
body.logged-in .fccs-admin-note,
.editor-styles-wrapper .fccs-admin-note {
  display: block;
  background: #fff8e6;
  border: 2px dashed var(--gold);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 28px 0;
}
.fccs-admin-note p:last-child { margin-bottom: 0; }
