/*
Theme Name: NPSF Archive
Theme URI: https://nationalpolicesuicidefoundation.example/
Author: Archived from original Wix site
Author URI: https://nationalpolicesuicidefoundation.example/
Description: A respectful archival WordPress theme preserving the content and structure of the National Police Suicide Foundation website. Includes page templates for Home, About, Contact, Membership, Free Resources, Training Calendar, Books, Recommended Reading, and Blog. Designed with a dignified navy-and-gold palette appropriate to law-enforcement memorial content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: npsf-archive
Tags: one-column, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, blog
*/

/* =========================================================================
   CSS Custom Properties
   ========================================================================= */
:root {
  --color-navy:       #152247;
  --color-navy-dark:  #0d1630;
  --color-navy-soft:  #25366b;
  --color-gold:       #b8894a;
  --color-gold-light: #d4a862;
  --color-ivory:      #faf7f2;
  --color-cream:      #f3ede2;
  --color-text:       #1f2430;
  --color-muted:      #5b6478;
  --color-border:     #dcd6c7;
  --color-white:      #ffffff;

  --font-serif: "Georgia", "Cambria", "Times New Roman", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(21, 34, 71, 0.08);
  --shadow-md: 0 4px 12px rgba(21, 34, 71, 0.10);
  --shadow-lg: 0 12px 32px rgba(21, 34, 71, 0.14);

  --radius-sm: 3px;
  --radius-md: 6px;

  --container: 1140px;
  --container-narrow: 820px;
}

/* =========================================================================
   Reset & base
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--color-navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--color-gold); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-navy);
  line-height: 1.22;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.18rem; }

p { margin: 0 0 1.1em; }
blockquote {
  margin: 1.5em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--color-gold);
  background: var(--color-cream);
  font-style: italic;
  color: var(--color-navy);
}

hr { border: 0; height: 1px; background: var(--color-border); margin: 2.5em 0; }

/* Accessibility: skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px; height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem; top: 1rem;
  width: auto; height: auto;
  padding: 0.75rem 1rem;
  background: var(--color-navy);
  color: var(--color-white);
  z-index: 1000;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

/* Screen-reader only */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal !important;
}

/* =========================================================================
   Layout helpers
   ========================================================================= */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1.25rem; }

/* =========================================================================
   Site header
   ========================================================================= */
.site-header {
  background: var(--color-navy);
  color: var(--color-white);
  border-bottom: 3px solid var(--color-gold);
  position: relative;
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.25rem;
  max-width: var(--container);
  margin: 0 auto;
}

.site-branding { display: flex; align-items: center; gap: 1rem; }

.site-branding__logo {
  width: 64px; height: 64px;
  flex: 0 0 64px;
  background: var(--color-navy-dark);
  border: 2px solid var(--color-gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.site-branding__logo img { width: 80%; height: auto; filter: brightness(0) invert(1); }

.site-branding__text { line-height: 1.15; }
.site-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-white);
  text-transform: uppercase;
}
.site-title a { color: inherit; text-decoration: none; }
.site-description {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--color-gold-light);
  font-style: italic;
  font-family: var(--font-serif);
}

/* =========================================================================
   Primary navigation
   ========================================================================= */
.main-nav {
  background: var(--color-navy-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
}
.main-nav__inner { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }

.main-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.main-nav li { position: relative; }
.main-nav a {
  display: block;
  padding: 0.95rem 1.1rem;
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover,
.main-nav a:focus,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  background: var(--color-navy-soft);
  color: var(--color-gold-light);
}

/* Submenus */
.main-nav ul ul {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--color-navy-dark);
  min-width: 200px;
  box-shadow: var(--shadow-md);
  z-index: 100;
  flex-direction: column;
}
.main-nav li:hover > ul,
.main-nav li:focus-within > ul { display: flex; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-gold);
  padding: 0.5rem 0.9rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .menu-toggle { display: inline-block; }
  .main-nav ul { display: none; flex-direction: column; }
  .main-nav.is-open ul { display: flex; }
  .main-nav ul ul { position: static; box-shadow: none; }
}

/* =========================================================================
   Hero / page header
   ========================================================================= */
.page-hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-soft) 100%);
  color: var(--color-white);
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
  border-bottom: 4px solid var(--color-gold);
}
.page-hero__title {
  color: var(--color-white);
  margin: 0 0 0.6rem;
}
.page-hero__subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-gold-light);
  font-size: 1.15rem;
  margin: 0;
}

/* =========================================================================
   Main content
   ========================================================================= */
.site-main {
  padding: 3rem 0;
  min-height: 50vh;
}

.entry { background: transparent; }
.entry-header { margin-bottom: 1.5rem; }
.entry-title { margin-bottom: 0.4rem; }
.entry-meta {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}
.entry-content { font-size: 1.05rem; }
.entry-content img { border-radius: var(--radius-md); margin: 1.5em auto; box-shadow: var(--shadow-sm); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.entry-content li { margin-bottom: 0.4em; }

/* Card for posts / archive */
.post-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.post-card__title { margin: 0 0 0.5rem; font-size: 1.4rem; }
.post-card__title a { text-decoration: none; }
.post-card__meta { color: var(--color-muted); font-size: 0.88rem; margin-bottom: 0.75rem; }
.post-card__excerpt { margin: 0; }

/* =========================================================================
   Buttons
   ========================================================================= */
.btn, .wp-block-button__link, button[type="submit"], input[type="submit"] {
  display: inline-block;
  background: var(--color-navy);
  color: var(--color-white);
  border: 2px solid var(--color-navy);
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.btn:hover, .wp-block-button__link:hover, button[type="submit"]:hover, input[type="submit"]:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-white);
}
.btn--outline {
  background: transparent;
  color: var(--color-navy);
}
.btn--outline:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

/* =========================================================================
   Forms
   ========================================================================= */
input[type="text"], input[type="email"], input[type="url"], input[type="tel"],
input[type="search"], input[type="password"], textarea, select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 3px rgba(21, 34, 71, 0.1);
}

/* =========================================================================
   Contact / info blocks (for contact page)
   ========================================================================= */
.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-md);
  padding: 1.75rem 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}
.info-card h3 { margin-top: 0; }
.info-card p:last-child { margin-bottom: 0; }

/* =========================================================================
   Book grid (for books / recommended reading pages)
   ========================================================================= */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  margin: 2rem 0;
}
.book-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.book-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.18rem;
}
.book-card p { margin: 0; font-size: 0.97rem; color: var(--color-text); }

/* =========================================================================
   Sidebar
   ========================================================================= */
.has-sidebar .site-main > .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3rem;
}
.widget-area {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: fit-content;
}
.widget { margin-bottom: 2rem; }
.widget:last-child { margin-bottom: 0; }
.widget-title {
  font-size: 1.05rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-gold);
  margin-bottom: 1rem;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 0.35rem 0; border-bottom: 1px dashed var(--color-border); }
.widget li:last-child { border-bottom: 0; }

@media (max-width: 900px) {
  .has-sidebar .site-main > .container { grid-template-columns: 1fr; }
}

/* =========================================================================
   Pagination
   ========================================================================= */
.pagination {
  margin: 2.5rem 0 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--color-navy);
}
.pagination .page-numbers.current {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}
.pagination .page-numbers:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-white);
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  background: var(--color-navy-dark);
  color: var(--color-cream);
  padding: 3rem 1.25rem 1.5rem;
  margin-top: 4rem;
  border-top: 3px solid var(--color-gold);
}
.site-footer a { color: var(--color-gold-light); }
.site-footer a:hover { color: var(--color-white); }

.site-footer__grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.site-footer h4 {
  color: var(--color-gold-light);
  font-size: 1.05rem;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 0.25rem 0; }

.site-info {
  max-width: var(--container);
  margin: 1.5rem auto 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--color-muted);
}

/* =========================================================================
   Comments
   ========================================================================= */
.comments-area { margin-top: 3rem; border-top: 2px solid var(--color-border); padding-top: 2rem; }
.comment-list { list-style: none; padding: 0; }
.comment { margin-bottom: 1.5rem; padding: 1rem 1.25rem; background: var(--color-white); border-radius: var(--radius-md); border: 1px solid var(--color-border); }

/* =========================================================================
   Utility
   ========================================================================= */
.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.88rem; color: var(--color-muted); text-align: center; margin-top: 0.4rem; }

.sticky { border-left: 4px solid var(--color-gold); padding-left: 1rem; }
