/*
Theme Name: CAGOP Look (Twenty Twenty-Five Child)
Template: twentytwentyfive
Description: Navy / rust-red, Oswald + Barlow look modeled on cagop.org, with RNHA San Diego header, footer and homepage styles. Colors, fonts and button styles live in theme.json.
Version: 1.5
*/

/* ================================================================
   0. BASE
   ================================================================ */
html { scroll-behavior: smooth; overflow-x: clip; }
body { overflow-wrap: break-word; overflow-x: clip; }
img { max-width: 100%; height: auto; }
a { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }
:focus-visible { outline: 3px solid #033974; outline-offset: 3px; }

/* No gap between header / main / footer */
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block-start: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ================================================================
   1. HEADER
   ================================================================ */
.cagop-topbar {
  background: #0F2E50; color: #fff;
  padding: 8px clamp(16px, 3vw, 40px);
  font-family: "Oswald", sans-serif; text-transform: uppercase;
  letter-spacing: .08em; font-size: 13px;
}
.cagop-topbar p { margin: 0; line-height: 1.4; }
.cagop-topbar a { color: #fff; text-decoration: none; }
.cagop-topbar a:hover { color: #FFBC7D; }

.cagop-header {
  background: #fff;
  border-bottom: 4px solid #8A1F03;
  padding: 14px clamp(16px, 3vw, 40px);
}
.cagop-header .wp-block-site-title { margin: 0; line-height: 1.1; }
.cagop-header .wp-block-site-title a {
  font-family: "Oswald", sans-serif; font-weight: 700;
  text-transform: uppercase; text-decoration: none; color: #0F2E50;
}
.cagop-header .wp-block-site-title a:hover { color: #8A1F03; }
.cagop-header .wp-block-navigation-item__content {
  padding: 8px 10px; border-bottom: 3px solid transparent; text-decoration: none;
}
.cagop-header .wp-block-navigation-item__content:hover,
.cagop-header .wp-block-navigation-item__content:focus-visible {
  color: #8A1F03; border-bottom-color: #8A1F03;
}
.cagop-header .wp-block-navigation__responsive-container.is-menu-open {
  background: #0F2E50; color: #fff;
}
.cagop-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff; }

@media (max-width: 700px) {
  .cagop-topbar__phone { display: none; }
}

/* ================================================================
   2. HERO + HEADINGS
   ================================================================ */
.cagop-hero-line1,
.cagop-hero-line2 {
  font-family: "Oswald", sans-serif; font-weight: 700;
  text-transform: uppercase; text-align: center; line-height: 1.1;
  font-size: clamp(34px, 6vw, 82px); margin: 0;
}
.cagop-hero-line1 { color: #0F2E50; }
.cagop-hero-line2 { color: #8A1F03; }

.rnha-eyebrow {
  font-family: "Oswald", sans-serif; text-transform: uppercase;
  letter-spacing: .18em; font-size: 15px; font-weight: 600;
  color: #8A1F03; margin: 0 0 12px;
}
.rnha-hero-lede { max-width: 760px; margin-inline: auto; font-size: clamp(18px, 2vw, 22px); }
.rnha-motto {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .12em;
  font-weight: 600; color: #0F2E50; margin: 0;
}
.rnha-motto em { color: #8A1F03; font-style: normal; }

.cagop-big-red  { color: #940C04; font-size: clamp(43px, 8vw, 117px); line-height: 1; margin: 0; }
.cagop-big-blue { color: #0F3B5C; font-size: clamp(23px, 5vw, 72px);  line-height: 1.05; margin: 0; }

/* Section bands */
.rnha-band--gray { background: #EEEEEE; }
.rnha-band--navy { background: #0F2E50; color: #fff; }
.rnha-band--navy h2, .rnha-band--navy h3 { color: #fff; }


/* ================================================================
   2b. FLAG HERO (Cover block with .rnha-hero--flag)
   ================================================================ */
.rnha-hero--flag { padding: clamp(56px, 9vw, 120px) clamp(16px, 4vw, 40px); }
.rnha-hero--flag .wp-block-cover__inner-container { width: 100%; }
.rnha-hero--flag .cagop-hero-line1,
.rnha-hero--flag .rnha-hero-lede,
.rnha-hero--flag .rnha-motto { color: #fff; }
.rnha-hero--flag .cagop-hero-line2,
.rnha-hero--flag .rnha-eyebrow,
.rnha-hero--flag .rnha-motto em { color: #FFBC7D; }
.rnha-hero--flag .cagop-hero-line1,
.rnha-hero--flag .cagop-hero-line2 { text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.rnha-hero--flag .cagop-btn-outline .wp-block-button__link { color: #fff !important; border-color: #fff; }
.rnha-hero--flag .cagop-btn-outline .wp-block-button__link:hover { background: #fff !important; color: #0F2E50 !important; }


/* ================================================================
   2c. PAGE HEADER BAND + EVENTS PAGE
   ================================================================ */
.rnha-pagehead { background: #0F2E50; border-bottom: 5px solid #8A1F03; text-align: center; }
.rnha-pagehead h1 { color: #fff; margin: 0 0 10px; font-size: clamp(40px, 6vw, 72px); line-height: 1.05; }
.rnha-pagehead .rnha-eyebrow { color: #FFBC7D; }
.rnha-pagehead__sub { color: #d7dbe6; font-size: clamp(17px, 2vw, 20px); margin: 0; }

.rnha-next {
  background: #fff; border: 2px solid #0F2E50; border-top: 6px solid #8A1F03;
  padding: 32px clamp(20px, 4vw, 48px); text-align: center;
}
.rnha-next p { margin-block: 0 14px; }

.rnha-event {
  background: #fff; border-top: 4px solid #0F2E50; margin: 0 0 28px;
  box-shadow: 0 1px 0 rgba(15,46,80,.12), 0 6px 18px rgba(15,46,80,.06);
  gap: 0 !important; transition: border-color .2s ease;
}
.rnha-event:hover { border-top-color: #8A1F03; }
.rnha-event.wp-block-columns { align-items: stretch; }
.rnha-event .wp-block-column:last-child, .rnha-event--text { padding: 26px clamp(20px, 3vw, 36px); }
.rnha-event .wp-block-column:first-child { padding: 0; }
.rnha-event figure { margin: 0; }
.rnha-event img { width: 100%; display: block; }
.rnha-event .wp-element-caption { font-size: 12px; padding: 4px 10px; color: #686868; }
.rnha-event h3 { margin: 0 0 6px; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.rnha-event p { margin-block: 0 12px; }
.rnha-event__tag {
  display: inline-block; font-family: "Oswald", sans-serif; text-transform: uppercase;
  letter-spacing: .1em; font-size: 13px; font-weight: 600;
  background: #EEEEEE; color: #0F2E50; padding: 3px 10px; margin-bottom: 10px;
}
.rnha-next .rnha-event__tag { background: #8A1F03; color: #fff; }
.rnha-event__date {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; color: #8A1F03; font-size: 17px; margin-bottom: 4px !important;
}
.rnha-event__meta { color: #555; font-size: 16px; }

.rnha-event .wp-block-details { border-top: 1px solid #d9deea; padding-top: 10px; margin-top: 6px; }
.rnha-event .wp-block-details summary {
  cursor: pointer; font-family: "Oswald", sans-serif; text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; color: #0F2E50;
}
.rnha-event .wp-block-details summary:hover { color: #8A1F03; }
.rnha-event .wp-block-details p { font-size: 16px; line-height: 1.7; margin-top: 10px; }

.rnha-band--navy .cagop-btn-outline .wp-block-button__link { color: #fff !important; border-color: #fff; }
.rnha-band--navy .cagop-btn-outline .wp-block-button__link:hover { background: #fff !important; color: #0F2E50 !important; }
.rnha-band--navy p { color: #fff; }


/* ================================================================
   2d. CANDIDATE CARDS (Endorsements page, text only)
   ================================================================ */
.rnha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.rnha-cand {
  display: flex; flex-direction: column; background: #fff;
  border-top: 4px solid #0F2E50; padding: 22px 24px 24px;
  box-shadow: 0 1px 0 rgba(15,46,80,.12), 0 6px 18px rgba(15,46,80,.06);
  transition: border-color .2s ease;
}
.rnha-cand:hover { border-top-color: #8A1F03; }
.rnha-band--gray .rnha-cand { box-shadow: 0 1px 0 rgba(15,46,80,.12); }
.rnha-cand h3 { margin: 0 0 6px; font-size: 1.5rem; }
.rnha-cand .rnha-event__date { margin: 0 0 6px; }
.rnha-cand .rnha-event__meta { margin: 0 0 16px; }
.rnha-cand .wp-block-buttons { margin-top: auto; }
.rnha-cand .wp-block-button__link { font-size: 1rem; padding: 10px 22px; }


/* ================================================================
   2e. HONOR ROLL (Military page)
   ================================================================ */
.rnha-honorgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.rnha-honor { background: #fff; border-top: 4px solid #8A1F03; text-align: center; padding-bottom: 16px; }
.rnha-honor figure { margin: 0; }
.rnha-honor img { width: 100%; display: block; object-position: center 20%; }
.rnha-band--navy .rnha-honor p { color: #0F2E50; }
.rnha-honor__rank {
  font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .08em;
  font-size: 14px; font-weight: 600; margin: 14px 12px 2px !important; color: #8A1F03 !important;
}
.rnha-honor__name { font-weight: 700; font-size: 18px; line-height: 1.25; margin: 0 12px !important; }

/* ================================================================
   3. BIG TILE LINKS (Cover blocks)
   ================================================================ */
.cagop-tile { position: relative; transition: transform .3s ease; min-height: 260px; }
.cagop-tile:hover { transform: translateY(-3px); }
.cagop-tile .wp-block-cover__background { transition: background-color .3s ease, opacity .3s ease; }
.cagop-tile:hover .wp-block-cover__background { background-color: #033974 !important; opacity: .97 !important; }
.cagop-tile--red:hover .wp-block-cover__background { background-color: #DB512D !important; }
.cagop-tile a, .cagop-tile p {
  font-family: "Oswald", sans-serif; font-weight: 600;
  text-transform: uppercase; color: #fff; text-decoration: none;
  font-size: clamp(22px, 2.4vw, 29px); margin: 0;
}
/* Whole tile is clickable */
.cagop-tile a::after { content: ""; position: absolute; inset: 0; z-index: 2; }

/* ================================================================
   4. PILLARS + NEWS CARDS
   ================================================================ */
.rnha-pillar {
  border-top: 4px solid #8A1F03; background: #fff;
  padding: 20px 22px 24px; height: 100%;
}
.rnha-pillar h3 { margin: 0 0 8px; font-size: 1.25rem; }
.rnha-pillar p { margin: 0; font-size: 16px; line-height: 1.6; }

.rnha-news-card {
  border-top: 4px solid #0F2E50; background: #fff;
  padding: 18px 20px 22px; height: 100%;
  box-shadow: 0 1px 0 rgba(15,46,80,.12), 0 6px 18px rgba(15,46,80,.06);
  transition: border-color .2s ease, transform .2s ease;
}
.rnha-news-card:hover { border-top-color: #8A1F03; transform: translateY(-2px); }
.rnha-news-card .wp-block-post-date { font-size: 14px; color: #686868; margin: 0 0 6px; }
.rnha-news-card .wp-block-post-title { margin: 0 0 8px; font-size: 1.3rem; line-height: 1.2; }
.rnha-news-card .wp-block-post-title a { color: #0F2E50; text-decoration: none; }
.rnha-news-card .wp-block-post-title a:hover { color: #8A1F03; }
.rnha-news-card .wp-block-post-excerpt { margin: 0; font-size: 16px; line-height: 1.6; }

/* ================================================================
   5. BUTTONS
   ================================================================ */
.cagop-btn-outline .wp-block-button__link {
  background: transparent !important; color: #0F3B5C !important; border: 1px solid #0F3B5C;
}
.cagop-btn-outline .wp-block-button__link:hover { background: #0F2E50 !important; color: #fff !important; }

/* ================================================================
   6. FOOTER
   ================================================================ */
.cagop-footer { background: #0F2E50; color: #fff; border-top: 5px solid #8A1F03; }
.cagop-footer a { color: #fff; text-decoration: none; }
.cagop-footer a:hover { color: #FFBC7D; }
.cagop-footer h3 { color: #fff; font-size: 20px; }
.cagop-footer p { margin: 0 0 6px; }
.cagop-footer .wp-block-site-title { margin: 0 0 8px; }
.cagop-footer .wp-block-site-title a { font-family: "Oswald", sans-serif; text-transform: uppercase; }
.cagop-footer .cagop-legal { font-size: 13px; opacity: .85; line-height: 1.6; }

/* ================================================================
   7. FORMS (Contact, Mailchimp subscribe)
   ================================================================ */
.wp-site-blocks label { font-family: "Oswald", sans-serif; text-transform: uppercase; font-size: 16px; }
.wp-site-blocks input[type="text"], .wp-site-blocks input[type="email"],
.wp-site-blocks input[type="tel"], .wp-site-blocks select { min-height: 49px; border-radius: 0; }

/* ================================================================
   8. EXISTING PAGES: map the old inline colors to this palette
   (About, Events, Military, posts and the old templates set colors
   directly on blocks.)
   ================================================================ */
[style*="background-color:#0e2b54"], [style*="background-color: #0e2b54"] {
  background-color: #0F2E50 !important; color: #fff;
}
[style*="background-color:#001a4b"], [style*="background-color:#001A4B"] {
  background-color: #07263F !important;
}
[style*="background-color:#670404"], [style*="background-color:#630505"], [style*="background-color:#6d1313"] {
  background-color: #8A1F03 !important; color: #fff !important;
}
[style*="background-color:#670404"] :is(p, h1, h2, h3, h4, li, span, a),
[style*="background-color:#630505"] :is(p, h1, h2, h3, h4, li, span, a),
[style*="background-color:#6d1313"] :is(p, h1, h2, h3, h4, li, span, a) {
  color: #fff !important;
}

/* ================================================================
   9. RESPONSIVE
   ================================================================ */
@media (max-width: 781px) {
  .cagop-tile { min-height: 180px; }
  .rnha-pillar, .rnha-news-card { height: auto; }
}
