/* =============================================
   BRAND TOKENS
   ============================================= */
:root {
  --kofc-navy:        #112866;
  --kofc-gold:        #f7b718;
  --kofc-red:         #ef3b39;
  --kofc-white:       #ffffff;
  --kofc-grey-light:  #f5f5f5;
  --kofc-font:        Arial, Helvetica, sans-serif;
  --kofc-logo-space:  1em;
}

/* =============================================
   GLOBAL OVERRIDES
   ============================================= */
body,
p,
h1, h2, h3, h4, h5, h6,
.main-navigation a,
input, button, select, textarea {
  font-family: var(--kofc-font) !important;
}

a {
  color: var(--kofc-navy);
}

a:hover,
a:focus {
  color: var(--kofc-gold);
}

/* =============================================
   BUTTON VARIANTS
   ============================================= */
.btn-primary {
  display: inline-block;
  background: var(--kofc-navy);
  color: var(--kofc-white);
  padding: 0.75em 1.75em;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s ease;
}
.btn-primary:hover,
.btn-primary:focus {
  background: #0a1843;
  color: var(--kofc-white);
}

.btn-secondary {
  display: inline-block;
  background: var(--kofc-gold);
  color: var(--kofc-navy);
  padding: 0.75em 1.75em;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s ease;
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: #d9a010;
  color: var(--kofc-navy);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--kofc-white);
  border: 2px solid var(--kofc-white);
  padding: 0.75em 1.75em;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline:hover,
.btn-outline:focus {
  background: var(--kofc-white);
  color: var(--kofc-navy);
}

/* =============================================
   HEADER
   ============================================= */
#masthead {
  border-bottom: 2px solid var(--kofc-navy);
  background: var(--kofc-white);
}

/* Single-row compact layout: logo left, nav right.
   Use #masthead specificity to override GP's .grid-container padding. */
#masthead .inside-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1.5rem;
  min-height: 65px;
  flex-wrap: nowrap;
  gap: 1rem;
}


/* Hide GP's text site title — logo + .kofc-council-id already brand the page */
.site-branding {
  display: none;
}

.site-branding img {
  max-height: 48px;
  width: auto;
  display: block;
}

/* GP branding container: left flex item inside .inside-header */
.site-branding-container {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-shrink: 0;
  min-width: 0;
}

/* GP floats the nav right in nav-float-right mode — override with flex */
.nav-float-right .main-navigation,
.nav-float-left .main-navigation {
  float: none;
}


/* Override GP's main.min.css (loads after theme.css) — use ID selector for
   higher specificity. GP nav UL classes are "menu sf-menu" (SuperFish). */
#site-navigation ul.menu,
#site-navigation ul.sf-menu {
  flex-wrap: nowrap;
  gap: 0;
}

/* All top-level nav links: even height, centered, equal side padding */
#site-navigation ul.menu > li > a,
#site-navigation ul.sf-menu > li > a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.2em;
  line-height: 1;
  padding: 0.5em 0.7em;
  white-space: nowrap;
}

/* Dropdown caret: keep it inline, same size as text */
#site-navigation .dropdown-menu-toggle {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  padding: 0 !important;
  margin: 0;
}

#site-navigation .dropdown-menu-toggle svg {
  width: 0.6em;
  height: 0.6em;
  vertical-align: middle;
}

/* Primary nav links */
.main-navigation a {
  color: var(--kofc-navy);
  font-weight: 600;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--kofc-gold);
}

/* =============================================
   FORM FIELDS
   ============================================= */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  background-color: #ffffff !important;
  border: 1px solid #c8cdd4 !important;
  border-radius: 3px;
  color: #222 !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  border-color: var(--kofc-navy) !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(17, 40, 102, 0.15);
}

/* Member Login button in nav */
.kofc-login-btn {
  display: inline-block;
  background: var(--kofc-gold);
  color: var(--kofc-navy) !important;
  padding: 0.45em 1.1em;
  border-radius: 3px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.kofc-login-btn:hover {
  background: #d9a010;
  color: var(--kofc-navy) !important;
}

/* =============================================
   FOOTER
   ============================================= */
#colophon,
.site-footer {
  background: var(--kofc-navy);
  color: var(--kofc-white);
  padding: 0;
}

.kofc-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
}

.kofc-footer-brand {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.kofc-footer-logo {
  max-height: 55px;
  width: auto;
}

.kofc-footer-council-id {
  color: var(--kofc-white);
  font-size: 0.85rem;
  font-weight: 600;
}

.kofc-footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.kofc-footer-col h4 {
  color: var(--kofc-gold);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.kofc-footer-col p,
.kofc-footer-col li,
.kofc-footer-col a {
  color: var(--kofc-white);
  font-size: 0.9rem;
}

.kofc-footer-col a:hover {
  color: var(--kofc-gold);
}

.kofc-footer-menu,
.kofc-social-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kofc-footer-menu li,
.kofc-social-links li {
  margin-bottom: 0.4rem;
}

.kofc-footer-bar {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
}

.kofc-footer-bar a {
  color: var(--kofc-gold);
}

.kofc-footer-bar a:hover {
  color: var(--kofc-white);
}

/* =============================================
   INTERIOR PAGES
   ============================================= */

.kofc-page-body {
  padding: 3rem 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.kofc-page-body-inner {
  max-width: 800px;
  margin: 0 auto;
}

/* Inline page title shown on non-PMPro pages */
.kofc-page-title--inline {
  color: var(--kofc-navy);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin: 0 0 1.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--kofc-gold);
  line-height: 1.2;
}

.kofc-page-body-inner h2 {
  color: var(--kofc-navy);
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.kofc-page-body-inner h3 {
  color: var(--kofc-navy);
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
}

.kofc-page-body-inner p {
  color: #333;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.kofc-page-body-inner a:not([class*="btn"]) {
  color: var(--kofc-navy);
  text-decoration: underline;
}

.kofc-page-body-inner a:not([class*="btn"]):hover {
  color: var(--kofc-gold);
}

.kofc-page-body-inner ul,
.kofc-page-body-inner ol {
  margin: 0.75rem 0 1rem 1.5rem;
  color: #333;
  line-height: 1.7;
}

.kofc-page-body-inner img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .kofc-page-body { padding: 2rem 1rem; }
}

/* Interior pages that need more than the default 800px content column */
.kofc-page-body-inner--wide {
  max-width: 1100px;
}

/* Partner-organization logo strip (e.g. Right to Life page). space-evenly
   distributes each row's own logos across the full width — including a
   short last row — instead of the flex-start default, which left-packs
   logos and strands a lone leftover on its own ragged line. */
.kofc-partner-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 1.5rem 2rem;
  margin: 1rem 0 1.5rem;
  padding: 1.5rem 1.25rem;
  background: var(--kofc-grey-light);
  border-radius: 4px;
}

.kofc-partner-logos img {
  max-height: 60px;
  max-width: 160px;
  width: auto;
  height: auto;
  margin: 0;
}

/* =============================================
   RESOURCE GRID (Catholic Resources page)
   ============================================= */
.kofc-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

@media (max-width: 600px) {
  .kofc-resource-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 420px) {
  .kofc-resource-grid {
    grid-template-columns: 1fr;
  }
}

.kofc-resource-card {
  display: block;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none !important;
  color: var(--kofc-navy);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.kofc-resource-card:hover {
  box-shadow: 0 4px 14px rgba(17, 40, 102, 0.15);
  transform: translateY(-2px);
  color: var(--kofc-navy) !important;
}

.kofc-resource-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

.kofc-resource-card span {
  display: block;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

/* =============================================
   EVENT CARDS (Events page)
   ============================================= */
.kofc-event-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.kofc-event-card img {
  flex: 0 0 130px;
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 4px;
  margin: 0;
}

.kofc-event-card-body h3 {
  margin-top: 0;
}

.kofc-event-card-body p {
  margin-bottom: 0.5rem;
}

.kofc-event-date {
  display: inline-block;
  font-weight: 700;
  color: var(--kofc-navy);
  margin-bottom: 0.4rem;
}

.kofc-event-signup {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
}

.kofc-event-rsvp-login-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background-color: var(--kofc-navy);
  color: var(--kofc-white);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 700;
}

.kofc-event-rsvp-login-btn:hover,
.kofc-event-rsvp-login-btn:focus {
  background-color: var(--kofc-gold);
  color: var(--kofc-navy);
}

.kofc-event-rsvp-login-notice {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #555;
}

@media (max-width: 600px) {
  .kofc-event-card {
    flex-direction: column;
  }
  .kofc-event-card img {
    width: 100%;
    height: auto;
    max-width: 220px;
  }
}

/* =============================================
   GRAND KNIGHT WELCOME
   ============================================= */
.kofc-gk-welcome {
  padding: 3rem 1.5rem;
  background: var(--kofc-white);
}

.kofc-gk-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: start;
}

.kofc-gk-photo-wrap {
  text-align: center;
}

.kofc-gk-photo-wrap img.kofc-gk-photo {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

.kofc-gk-photo-placeholder {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1;
  background: var(--kofc-navy);
  border-radius: 4px;
  margin: 0 auto;
}

.kofc-gk-council-id {
  margin-top: 1.5rem;
}

.kofc-gk-council-logo {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto 0.75rem;
  display: block;
}

.kofc-gk-council-text {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--kofc-navy);
  margin: 0;
}

.kofc-gk-message {
  border-left: 4px solid var(--kofc-navy);
  padding-left: 1.5rem;
}

.kofc-gk-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--kofc-navy);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.kofc-gk-message p {
  color: #333;
  line-height: 1.75;
  margin-bottom: 0.9rem;
}

.kofc-gk-signature {
  font-style: italic;
  color: var(--kofc-navy);
  font-weight: 600;
  margin-top: 1.25rem;
}

@media (max-width: 768px) {
  .kofc-gk-inner {
    grid-template-columns: 1fr;
  }

  .kofc-gk-photo-wrap {
    max-width: 200px;
    margin: 0 auto;
  }
}

/* =============================================
   HOMEPAGE — TWO-PATH SPLIT
   ============================================= */
.kofc-two-path {
  background: var(--kofc-white);
  padding: 4rem 1.5rem;
}

.kofc-two-path-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.kofc-path-card {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.kofc-path-card-header {
  background: var(--kofc-navy);
  color: var(--kofc-white);
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.kofc-path-card-body {
  padding: 1.5rem;
}

.kofc-path-card-body p {
  margin-bottom: 1rem;
  color: #444;
}

.kofc-path-card-body ul {
  margin: 0 0 1.5rem 1.2rem;
  padding: 0;
}

.kofc-path-card-body li {
  margin-bottom: 0.4rem;
}

.kofc-path-card-body .btn-primary {
  display: block;
  text-align: center;
}

/* =============================================
   HOMEPAGE — STATS BAR
   ============================================= */
.kofc-stats {
  background: var(--kofc-gold);
  padding: 3rem 1.5rem;
}

.kofc-stats-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.kofc-stat-number {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--kofc-navy);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.kofc-stat-label {
  display: block;
  color: var(--kofc-navy);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.kofc-stat-label small {
  font-weight: 400;
  font-size: 0.8em;
}

.kofc-stat-desc {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--kofc-navy);
  opacity: 0.72;
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* =============================================
   HOMEPAGE — INITIATIVES
   ============================================= */
.kofc-initiatives {
  background: var(--kofc-white);
  padding: 4rem 1.5rem;
}

.kofc-initiatives-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.kofc-section-title {
  text-align: center;
  color: var(--kofc-navy);
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.kofc-initiative-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.kofc-initiative-card {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.kofc-initiative-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.kofc-initiative-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kofc-initiative-title {
  font-size: 1rem;
  color: var(--kofc-navy);
  margin-bottom: 0.5rem;
}

.kofc-initiative-body p {
  color: #555;
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.kofc-initiative-body .btn-primary {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.6em 1em;
}

/* =============================================
   HOMEPAGE — INSURANCE & RESOURCES
   ============================================= */
.kofc-resources {
  background: var(--kofc-grey-light);
  padding: 4rem 1.5rem;
}

.kofc-resources-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.kofc-insurance h2,
.kofc-catholic-resources h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.kofc-insurance p,
.kofc-insurance li {
  font-size: 0.95rem;
  color: #444;
}

.kofc-insurance ul {
  margin: 0.75rem 0 0 1.2rem;
  padding: 0;
}

.kofc-insurance li {
  margin-bottom: 0.35rem;
}

.kofc-catholic-resources p {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1.25rem;
}

/* =============================================
   RESPONSIVE — TABLET (≤ 768px)
   ============================================= */
@media (max-width: 768px) {
  /* Header: allow branding + nav to wrap on narrow screens */
  .inside-header {
    flex-wrap: wrap;
    padding: 0.4rem 1rem;
  }

  .site-branding-container {
    flex-wrap: nowrap;  /* logo + council ID stay on one line */
  }

  /* Two-path split: stack cards */
  .kofc-two-path-inner {
    grid-template-columns: 1fr;
  }

  /* Stats: stack vertically */
  .kofc-stats-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Initiatives: two columns on tablet */
  .kofc-initiative-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Resources: stack */
  .kofc-resources-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Footer columns: stack */
  .kofc-footer-columns {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* =============================================
   RESPONSIVE — MOBILE (≤ 480px)
   ============================================= */
@media (max-width: 480px) {
  /* Initiatives: single column on mobile */
  .kofc-initiative-cards {
    grid-template-columns: 1fr;
  }

  .kofc-two-path,
  .kofc-initiatives,
  .kofc-resources {
    padding: 2.5rem 1rem;
  }
}

/* =============================================
   ANNOUNCEMENTS + NEWSLETTER
   ============================================= */
.kofc-news-row {
  padding: 3rem 1.5rem;
  background: var(--kofc-grey-light);
}

.kofc-news-row-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

/* Shared section heading */
.kofc-announcements h2,
.kofc-newsletter-col h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--kofc-navy);
  border-bottom: 2px solid var(--kofc-navy);
  padding-bottom: 0.4rem;
  margin-bottom: 1.25rem;
}

/* Announcement rows */
.kofc-announcement {
  display: flex;
  gap: 0.85rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #ddd;
  align-items: baseline;
}

.kofc-ann-date {
  background: var(--kofc-navy);
  color: var(--kofc-white);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2em 0.5em;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.kofc-ann-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.kofc-ann-title {
  font-weight: 600;
  color: var(--kofc-navy);
  font-size: 0.93rem;
  text-decoration: none;
}

.kofc-ann-title:hover {
  color: var(--kofc-gold);
}

.kofc-ann-excerpt {
  font-size: 0.8rem;
  color: #555;
}

.kofc-ann-viewall {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--kofc-navy);
  text-decoration: underline;
}

.kofc-no-items {
  color: #555;
  font-style: italic;
  font-size: 0.9rem;
}

/* Newsletter featured box */
.kofc-newsletter-featured {
  background: var(--kofc-white);
  border: 2px solid var(--kofc-navy);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.kofc-newsletter-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--kofc-navy);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.kofc-newsletter-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--kofc-navy);
  margin-bottom: 0.2rem;
}

.kofc-newsletter-date {
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.kofc-newsletter-btn {
  font-size: 0.85rem;
  padding: 0.4em 1em;
}

/* Past issues list */
.kofc-newsletter-archive {
  list-style: none;
  padding: 0;
  margin: 0;
}

.kofc-newsletter-archive li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid #ddd;
  font-size: 0.88rem;
  gap: 0.5rem;
}

.kofc-newsletter-archive a {
  color: var(--kofc-navy);
  font-weight: 600;
  text-decoration: none;
  flex: 1;
}

.kofc-newsletter-archive a:hover {
  color: var(--kofc-gold);
  text-decoration: underline;
}

.kofc-newsletter-archive span {
  color: #777;
  flex-shrink: 0;
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .kofc-news-row-inner {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   PMPRO MEMBER PORTAL
   ============================================= */

/* Constrain PMPro content to interior page width */
.pmpro_content,
.pmpro_account,
.pmpro_levels_form,
.pmpro_checkout {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Primary action buttons */
.pmpro_btn,
input[type="submit"].pmpro_btn,
.pmpro_submit,
.pmpro_checkout_submit input[type="submit"],
a.pmpro_btn {
  background: var(--kofc-navy);
  color: var(--kofc-white) !important;
  border: none;
  padding: 0.75em 1.75em;
  font-weight: 700;
  cursor: pointer;
  border-radius: 2px;
  text-decoration: none !important;
  display: inline-block;
  transition: background 0.15s;
}
.pmpro_btn:hover,
.pmpro_submit:hover,
.pmpro_checkout_submit input[type="submit"]:hover,
a.pmpro_btn:hover {
  background: var(--kofc-gold);
  color: var(--kofc-navy) !important;
}

.pmpro_btn-cancel {
  background: transparent !important;
  color: var(--kofc-navy) !important;
  border: 2px solid var(--kofc-navy) !important;
}
.pmpro_btn-cancel:hover {
  background: var(--kofc-navy) !important;
  color: var(--kofc-white) !important;
}

/* PMPro's password-visibility toggle (login form) shares the .pmpro_btn
   class but is a plain icon+text control with no background — it was
   inheriting .pmpro_btn's white text meant for solid navy buttons above,
   so "Show Password" rendered white-on-white and was only readable by
   accident once :hover's navy text color kicked in. Keep it backgroundless
   and navy-on-transparent in both states instead. */
.pmpro_btn-plain,
.pmpro_btn-plain:hover,
.pmpro_btn-plain:focus {
  background: transparent !important;
  color: var(--kofc-navy) !important;
}

/* Membership levels table */
table.pmpro_levels_table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
table.pmpro_levels_table thead th {
  background: var(--kofc-navy) !important;
  color: var(--kofc-white) !important;
  padding: 0.75rem 1rem;
  text-align: left;
}
table.pmpro_levels_table tbody th {
  color: var(--kofc-navy);
  font-weight: 600;
  text-align: left;
}
table.pmpro_levels_table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

/* Account page panels */
.pmpro_account-membership,
.pmpro_account-links,
.pmpro_account-invoices {
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.pmpro_account-membership h2,
.pmpro_account-links h2,
.pmpro_account-invoices h2 {
  color: var(--kofc-navy);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  border-bottom: 2px solid var(--kofc-gold);
  padding-bottom: 0.5rem;
}

/* Form labels */
.pmpro_checkout label,
.pmpro_profile label,
.pmpro_user_fields label {
  font-weight: 600;
  color: #333;
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

/* Form inputs */
.pmpro_checkout input[type="text"],
.pmpro_checkout input[type="email"],
.pmpro_checkout input[type="tel"],
.pmpro_checkout input[type="password"],
.pmpro_checkout select,
.pmpro_profile input[type="text"],
.pmpro_profile input[type="email"],
.pmpro_profile input[type="tel"],
.pmpro_profile select {
  width: 100%;
  padding: 0.6em 0.75em;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 1rem;
  box-sizing: border-box;
  font-family: var(--kofc-font);
}
.pmpro_checkout input:focus,
.pmpro_profile input:focus {
  outline: 2px solid var(--kofc-navy);
  outline-offset: 1px;
  border-color: var(--kofc-navy);
}

/* Invoice / orders table */
table.pmpro_invoices_table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}
table.pmpro_invoices_table th {
  background: var(--kofc-navy);
  color: var(--kofc-white);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
table.pmpro_invoices_table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

/* Success messages */
.pmpro_message,
.pmpro_success,
div.pmpro_message:not(.pmpro_error) {
  background: #d4edda;
  border-left: 4px solid #28a745;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 2px;
}

/* Error messages */
.pmpro_error,
div.pmpro_message.pmpro_error {
  background: #f8d7da;
  border-left: 4px solid var(--kofc-red);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 2px;
}

/* Expiry / notice warnings */
.pmpro_expiry_warning {
  background: #fff3cd;
  border-left: 4px solid var(--kofc-gold);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  color: #6c4600;
  border-radius: 2px;
}

/* "Your membership" section heading on account page */
.pmpro_account-membership strong {
  color: var(--kofc-navy);
}

/* Section headings inside checkout */
.pmpro_checkout h3,
.pmpro_checkout h4 {
  color: var(--kofc-navy);
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.4rem;
}

@media (max-width: 600px) {
  .pmpro_account-membership,
  .pmpro_account-links,
  .pmpro_account-invoices {
    padding: 1rem;
  }
  .pmpro_btn,
  .pmpro_submit,
  .pmpro_checkout_submit input[type="submit"] {
    width: 100%;
    text-align: center;
  }
}

/* =============================================
   PMPRO LOGIN FORM — match Lost Password style
   ============================================= */

/* Cascade navy as the accent inside the login card so PMPro's own rules
   pick it up (button bg, border, hover text all reference this variable). */
.pmpro_login_wrap {
  --pmpro--color--accent: var(--kofc-navy);
}

/* Direct override for the login submit button (belt-and-suspenders) */
.pmpro_section #loginform .login-submit .button,
.pmpro_section #loginform .login-submit input[type="submit"] {
  background-color: var(--kofc-navy);
  border-color: var(--kofc-navy);
  color: var(--kofc-white);
}

.pmpro_section #loginform .login-submit .button:hover,
.pmpro_section #loginform .login-submit .button:focus,
.pmpro_section #loginform .login-submit input[type="submit"]:hover,
.pmpro_section #loginform .login-submit input[type="submit"]:focus {
  background-color: var(--kofc-gold);
  border-color: var(--kofc-gold);
  color: var(--kofc-navy);
}

/* WP's wp_login_form() adds size="20" on inputs — override to fill the card */
.pmpro_section #loginform .input {
  width: 100%;
  box-sizing: border-box;
}

/* Navy focus ring to match the rest of the theme */
.pmpro_section #loginform .input:focus {
  border-color: var(--kofc-navy);
  box-shadow: 0 0 0 2px rgba(17, 40, 102, 0.2);
  outline: none;
}

/* =============================================
   MEMBER PORTAL SIDEBAR NAV
   Appears on account/billing/profile/invoice/cancel pages for logged-in members.
   ============================================= */

/* Widen the inner column and switch to flex row when the nav is present */
.kofc-has-member-nav .kofc-page-body-inner {
  max-width: 1100px;
  display: flex;
  flex-direction: row;
  gap: 2.5rem;
  align-items: flex-start;
}

.kofc-has-member-nav .entry-content {
  flex: 1 1 0;
  min-width: 0;
}

/* Nav sidebar */
.kofc-member-nav {
  flex: 0 0 190px;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: 6px;
  overflow: hidden;
  position: sticky;
  top: 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.kofc-member-nav-heading {
  color: var(--kofc-navy);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  padding: 0.85rem 1rem 0.7rem;
  background: #f7f9fc;
  border-bottom: 2px solid var(--kofc-gold);
}

.kofc-member-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.kofc-member-nav li {
  border-bottom: 1px solid #eef0f3;
}

.kofc-member-nav li:last-child {
  border-bottom: none;
}

.kofc-member-nav li a {
  display: block;
  padding: 0.7rem 1rem;
  color: #334155 !important;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.kofc-member-nav li a:hover,
.kofc-member-nav li a:focus {
  background: #eef2fb;
  color: var(--kofc-navy) !important;
  border-left-color: rgba(17, 40, 102, 0.25);
  outline: none;
}

.kofc-member-nav-current a,
.kofc-member-nav-current a:hover,
.kofc-member-nav-current a:focus {
  background: #eef2fb;
  color: var(--kofc-navy) !important;
  border-left: 3px solid var(--kofc-gold);
  padding-left: calc(1rem - 3px);
  font-weight: 700;
}

.kofc-member-nav-logout {
  border-top: 1px solid #eef0f3 !important;
  margin-top: 0;
}

.kofc-member-nav-logout a {
  color: #94a3b8 !important;
  font-size: 0.8rem;
  font-weight: 400;
}

.kofc-member-nav-logout a:hover,
.kofc-member-nav-logout a:focus {
  color: #64748b !important;
  background: none;
  border-left-color: transparent;
}

@media (max-width: 700px) {
  .kofc-has-member-nav .kofc-page-body-inner {
    flex-direction: column;
    gap: 1.5rem;
  }
  .kofc-member-nav {
    flex: none;
    width: 100%;
    position: static;
  }
  .kofc-member-nav ul {
    display: flex;
    flex-wrap: wrap;
  }
  .kofc-member-nav li {
    border-bottom: none;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
  }
  .kofc-member-nav-logout {
    border-top: none !important;
    border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin-top: 0;
  }
}

/* =============================================
   NEWS / BLOG
   ============================================= */
.byline { display: none !important; }

/* =============================================
   CATHOLIC RESOURCES GRID
   ============================================= */
.kofc-cr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.5rem;
  margin: 2rem 0 0;
}
.kofc-cr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--kofc-navy);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.kofc-cr-card:hover,
.kofc-cr-card:focus {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  color: var(--kofc-navy);
  outline: none;
}
.kofc-cr-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.kofc-cr-label {
  display: block;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.6rem;
  padding: 0 0.25rem;
  line-height: 1.3;
}
@media (max-width: 700px) {
  .kofc-cr-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}
@media (max-width: 420px) {
  .kofc-cr-grid { grid-template-columns: 1fr; }
}

/* =============================================
   THE EVENTS CALENDAR + EVENT TICKETS
   ============================================= */

/* Primary "Find Events" button — filled navy */
.tribe-common-c-btn {
  background-color: var(--kofc-navy) !important;
  color: var(--kofc-white) !important;
  border-color: var(--kofc-navy) !important;
}
.tribe-common-c-btn:hover,
.tribe-common-c-btn:focus {
  background-color: var(--kofc-gold) !important;
  color: var(--kofc-navy) !important;
  border-color: var(--kofc-gold) !important;
}

/* Outlined nav controls: Prev/Next Events, top arrow buttons, Subscribe */
.tribe-events-c-nav__next,
.tribe-events-c-nav__prev,
.tribe-common-c-btn-border,
.tribe-events .tribe-common-c-btn-icon {
  background-color: transparent !important;
  background: transparent !important;
  color: var(--kofc-navy) !important;
  border: 1px solid #c8cdd4 !important;
  box-shadow: none !important;
}
.tribe-events-c-nav__next:hover,
.tribe-events-c-nav__next:focus,
.tribe-events-c-nav__prev:hover,
.tribe-events-c-nav__prev:focus,
.tribe-common-c-btn-border:hover,
.tribe-common-c-btn-border:focus,
.tribe-events .tribe-common-c-btn-icon:hover,
.tribe-events .tribe-common-c-btn-icon:focus {
  background-color: #eef2fb !important;
  color: var(--kofc-navy) !important;
  border-color: var(--kofc-navy) !important;
}

/* SVG icons inside the arrow buttons — inherit navy */
.tribe-events .tribe-common-c-btn-icon svg,
.tribe-events .tribe-common-c-btn-icon__icon-svg {
  fill: currentColor !important;
  color: var(--kofc-navy) !important;
}

/* Today highlight in month grid */
.tribe-events-calendar-month__calendar-event--current .tribe-events-calendar-month__calendar-event-datetime,
.tribe-events-calendar-month__body-cell--current .tribe-events-calendar-month__body-cell-date {
  color: var(--kofc-gold) !important;
  font-weight: 700;
}

/* Event title links */
.tribe-events-calendar-month__calendar-event-title a,
.tribe-event-url,
.tribe-events-c-small-cta__title,
.tribe-events .tribe-events-c-events-bar__search-container a {
  color: var(--kofc-navy) !important;
}
.tribe-events-calendar-month__calendar-event-title a:hover {
  color: var(--kofc-gold) !important;
}

/* Month grid day numbers — current day accent */
.tribe-events-calendar-month__body-cell--current
  .tribe-events-calendar-month__body-cell-date-daynum {
  background-color: var(--kofc-navy) !important;
  color: var(--kofc-white) !important;
  border-radius: 50%;
}

/* "Find Events" / filter bar focus ring */
.tribe-events .tribe-events-c-events-bar input:focus {
  border-color: var(--kofc-navy) !important;
  box-shadow: 0 0 0 2px rgba(17, 40, 102, 0.25) !important;
}

/* Event Tickets / RSVP form */
.tribe-tickets__rsvp-actions-button,
.tribe-tickets__buy-button,
#tribe-tickets .tribe-tickets__buy {
  background-color: var(--kofc-navy) !important;
  color: var(--kofc-white) !important;
  border-color: var(--kofc-navy) !important;
}
.tribe-tickets__rsvp-actions-button:hover,
.tribe-tickets__rsvp-actions-button:focus,
.tribe-tickets__buy-button:hover {
  background-color: var(--kofc-gold) !important;
  color: var(--kofc-navy) !important;
  border-color: var(--kofc-gold) !important;
}

/* Ticket quantity stepper accent */
.tribe-tickets__item__quantity__add,
.tribe-tickets__item__quantity__remove {
  color: var(--kofc-navy) !important;
}
.tribe-tickets__item__quantity__add:hover,
.tribe-tickets__item__quantity__remove:hover {
  color: var(--kofc-gold) !important;
}

/* Header bar inside the ticket block */
.tribe-tickets-loader__dots .tribe-tickets-loader__dot,
.tribe-tickets-rsvp__title,
.tribe-tickets__item__details__name {
  color: var(--kofc-navy) !important;
}

@media (max-width: 600px) {
  .tribe-events-calendar-month__calendar-event-title {
    font-size: 0.75rem;
  }
}

/* ---- Roster import & members list ---- */
.kofc-roster-form .kofc-hint { display:block; font-size:.85em; opacity:.75; margin-top:.25rem; }
.kofc-roster-error { border-left:4px solid #c1272d; background:#fdf3f3; padding:.75rem 1rem; margin-bottom:1rem; }
.kofc-roster-counts { list-style:none; padding:0; display:grid; gap:.35rem; }
.kofc-roster-details { margin:1rem 0; }
.kofc-roster-details summary { cursor:pointer; font-weight:600; }
.kofc-table-scroll { overflow-x:auto; }
.kofc-table-scroll table { width:100%; border-collapse:collapse; font-size:.9em; }
.kofc-table-scroll th, .kofc-table-scroll td { text-align:left; padding:.4rem .6rem; border-bottom:1px solid #e3e3e3; }
.kofc-roster-progress progress { width:100%; }
.kofc-roster-actions { display:flex; gap:1rem; align-items:center; }
.kofc-members-filters { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1rem; }
.kofc-members-summary { display:flex; justify-content:space-between; align-items:center; }
.kofc-flag { font-size:.75em; background:#f4e2b8; padding:.05rem .35rem; border-radius:3px; margin-left:.35rem; }
.kofc-status--expired  { color:#c1272d; font-weight:600; }
.kofc-status--expiring { color:#a56a00; font-weight:600; }
.kofc-status--no-level { opacity:.7; }
.kofc-members-pagination { margin-top:1rem; }
