/*--------------------------------------------------------------
# CHA Brand Overrides — applied after template main.css
--------------------------------------------------------------*/

:root {
  --accent-color: #0a4f3b;
  --heading-color: #1a2e1a;
  --nav-color: #444444;
  --nav-hover-color: #0a4f3b;
  --contrast-color: #ffffff;
}

/* Bootstrap btn-primary — override hardcoded #0d6efd blue */
.btn-primary,
.btn.btn-primary {
  --bs-btn-bg: #0a4f3b;
  --bs-btn-border-color: #0a4f3b;
  --bs-btn-hover-bg: #083d2d;
  --bs-btn-hover-border-color: #083d2d;
  --bs-btn-active-bg: #072e22;
  --bs-btn-active-border-color: #072e22;
  --bs-btn-focus-shadow-rgb: 10, 79, 59;
  background-color: #0a4f3b;
  border-color: #0a4f3b;
  color: #ffffff;
}
.btn-primary:hover,
.btn.btn-primary:hover {
  background-color: #083d2d;
  border-color: #083d2d;
  color: #ffffff;
}

/* Announcement Ribbon */
.announcement-ribbon {
  background: linear-gradient(90deg, #1a2e1a 0%, #0a4f3b 100%);
  padding: 34px 0;
  border-bottom: 3px solid #ab9c7f;
}

.announcement-ribbon-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.announcement-ribbon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(171, 156, 127, 0.2);
  border: 1px solid rgba(171, 156, 127, 0.5);
  color: #d4c8b0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 2rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.announcement-ribbon-badge i {
  font-size: 0.8rem;
}

.announcement-ribbon-text {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9375rem;
  margin: 0;
  font-weight: 500;
}

.announcement-ribbon-text a {
  color: #d4c8b0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.announcement-ribbon-text a:hover {
  color: #ffffff;
}

/* Swiper active pagination dot */
.swiper-pagination-bullet-active {
  background: #0a4f3b !important;
}

/* Header logo sitename sizing */
.header .sitename {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

/* Ensure logo image vertical alignment */
.header .logo img {
  height: 55px;
  max-height: 55px;
  width: auto;
}

/* Hero badge — neutral info tone instead of gold */
.hero-badge {
  background: rgba(10, 79, 59, 0.08);
  border-color: rgba(10, 79, 59, 0.25);
  color: #0a4f3b;
}

/* Waitlist alert banner */
.waitlist-alert {
  background: rgba(10, 79, 59, 0.08);
  border: 1px solid rgba(10, 79, 59, 0.25);
  color: #0a4f3b;
  border-radius: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}

/* Facility cards on homepage */
.facility-card {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.facility-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.14);
}
.facility-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.facility-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.facility-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: 2rem;
  background: rgba(10, 79, 59, 0.1);
  color: #0a4f3b;
  margin-bottom: 0.75rem;
}
.facility-badge.coming-soon {
  background: rgba(171,156,127,0.15);
  color: #6e5f44; /* darkened for WCAG AA contrast on the tan badge */
}

/* Facility detail page hero */
.facility-hero {
  position: relative;
  height: 55vh;
  min-height: 360px;
  max-height: 580px;
  overflow: hidden;
  margin-top: 60px;
}
.facility-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center calc(50% + 100px);
}
.facility-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,79,59,0.72) 0%, rgba(10,79,59,0.4) 50%, transparent 100%);
}
.facility-hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  max-width: 80rem;
  margin: 0 auto;
  color: #fff;
}
.facility-hero-content .eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d4c8b0;
  margin-bottom: 0.5rem;
}
.facility-hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  margin-bottom: 0.75rem;
}
.facility-hero-content p {
  font-size: 1.0625rem;
  max-width: 28rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  opacity: 0.9;
}

/* Info cards on facility pages */
.info-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 0.875rem;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  height: 100%;
}
.info-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0a4f3b;
  margin-bottom: 1rem;
}
.info-card .dot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}
.info-card .dot-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.9375rem;
}
.info-card .dot-list li::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #ab9c7f;
  flex-shrink: 0;
  margin-top: 0.4rem;
}
.info-card .waitlist-notice {
  background: rgba(171,156,127,0.1);
  border: 1px solid rgba(171,156,127,0.35);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  margin-top: 1rem;
  font-size: 0.875rem;
}

/* Hero fills viewport so the announcement ribbon lands at the fold */
.hero {
  min-height: calc(100vh - 87px); /* 87px ≈ ribbon height */
  display: flex;
  align-items: center;
  padding: 130px 0 60px;
}

/* Hero swiper (homepage) */
.hero-swiper {
  border-radius: 1rem;
  overflow: hidden;
}
.hero-swiper .swiper-slide img {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
}

/* Update cards (Jack's Farm) */
.update-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 0.875rem;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.update-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #0a4f3b;
  margin-bottom: 0.875rem;
}

/* Jack's Farm site photos */
.site-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.site-photos img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* PDF link box */
.pdf-box {
  background: rgba(10,79,59,0.04);
  border: 1px solid rgba(10,79,59,0.15);
  border-radius: 0.875rem;
  padding: 1.5rem 2rem;
  margin-top: 2rem;
}
.pdf-box .pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #0a4f3b;
  font-weight: 600;
  text-decoration: none;
}
.pdf-box .pdf-link:hover {
  text-decoration: underline;
}
.pdf-box .pdf-link svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
}

/* About page board list */
.board-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.board-list li {
  font-size: 0.9375rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.board-list li::before {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #0a4f3b;
  flex-shrink: 0;
}

/* Responsive hero swiper */
@media (max-width: 991px) {
  .hero-swiper .swiper-slide img {
    height: 300px;
  }
}

@media (max-width: 575px) {
  .site-photos {
    grid-template-columns: 1fr;
  }
}

/*--------------------------------------------------------------
# Accessibility (WCAG 2.1 AA)
--------------------------------------------------------------*/

/* Skip-to-content link — visible only when focused, above the fixed header */
.skip-link.visually-hidden-focusable:focus,
.skip-link.visually-hidden-focusable:focus-within {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1100;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.6rem 1rem;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: #0a4f3b;
  color: #ffffff;
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Visible focus indicator for keyboard users across all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible,
.btn:focus-visible {
  outline: 3px solid #0a4f3b;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Don't show a focus ring when programmatically focusing the main landmark via skip link */
#main:focus,
#main:focus-visible {
  outline: none;
}

/* Mobile nav toggle is now a <button> — strip default button chrome */
.mobile-nav-toggle {
  background: none;
  border: 0;
  padding: 0;
  line-height: 0;
  appearance: none;
}

/* Make the Facilities dropdown reachable by keyboard (template only reveals on :hover) */
@media (min-width: 1200px) {
  .navmenu .dropdown:focus-within > ul {
    opacity: 1;
    top: 100%;
    visibility: visible;
  }
}

/* Hero stat numbers (demoted from <h3> to <div> for correct heading order) */
.hero .hero-stats .stat-item .stat-number {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-color);
}
@media (max-width: 1199px) {
  .hero .hero-stats .stat-item .stat-number {
    font-size: 1.5rem;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   Page header with background image + dark brand overlay (About, Reports)
   ========================================================================== */
.page-title--hero {
  position: relative;
  background-color: #0a2e1f;
  overflow: hidden;
}
.page-title--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(10, 46, 31, 0.72), rgba(10, 46, 31, 0.82)),
    url("/public/images/foote-commons-exterior.png") center / cover no-repeat;
  z-index: 0;
}
.page-title--hero .heading,
.page-title--hero nav {
  position: relative;
  z-index: 1;
}
.page-title--hero .heading,
.page-title--hero .heading h1,
.page-title--hero .heading p {
  color: #fff;
}
.page-title--hero .heading p {
  color: rgba(255, 255, 255, 0.9);
}
.page-title--hero nav {
  background-color: rgba(0, 0, 0, 0.25);
}
.page-title--hero nav ol,
.page-title--hero nav ol li,
.page-title--hero nav ol li.current {
  color: rgba(255, 255, 255, 0.85);
}
.page-title--hero nav ol li a {
  color: #fff;
}
.page-title--hero nav ol li + li::before {
  color: rgba(255, 255, 255, 0.6);
}

/* Spacing between the stacked sub-sections on the About page */
.about .community-life-section {
  margin-top: 4.5rem;
}

/* About page sub-section titles (restore + enlarge after section rename) */
.about .section-header h3 {
  font-size: clamp(2.1rem, 3.5vw, 2.75rem);
  color: var(--heading-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.about .section-header p {
  font-size: 1.15rem;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  max-width: 600px;
  margin: 0 auto;
}
