/* ==========================================================================
   SITE HEADER & HORIZONTAL NAVIGATION
   ========================================================================== */

/* Full-width dark background banner */
.site-header {
  background-color: #0F172A; /* Deep slate blue background */
  border-bottom: 4px solid #D4AF37; /* Gold accent border */
  padding: 0.75rem 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Container to spread logo left and menu right across the page */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allows wrap on smaller mobile screens */
  gap: 1rem;
}

/* Logo & Branding Area */
.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.header-logo {
  height: 44px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF; /* High contrast white text */
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 0.75rem;
  color: #F1F5F9; /* Light grey/white for readability */
}

/* Horizontal Navigation Bar */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;             /* Forces links into a HORIZONTAL row */
  flex-direction: row;       /* Explicit horizontal alignment */
  align-items: center;
  gap: 1.5rem;               /* Space out links across the page */
}

.main-nav li {
  margin: 0;
  padding: 0;
}

/* Navigation Links - High Contrast Color Override */
.main-nav a {
  color: #FFFFFF !important;  /* Pure white text for crisp readability */
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.25rem;
  transition: color 0.2s ease, border-bottom 0.2s ease;
}

/* Hover effect - Turns gold when hovered */
.main-nav a:hover,
.main-nav a:focus {
  color: #D4AF37 !important; /* Gold on hover */
  border-bottom: 2px solid #D4AF37;
}

/* Distinct Donate Button */
.main-nav a.btn-donate {
  background-color: #D4AF37;
  color: #0F172A !important;  /* Dark text on gold button for high contrast */
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-weight: 700;
}

.main-nav a.btn-donate:hover {
  background-color: #F59E0B;
  color: #0F172A !important;
  border-bottom: none;
}

/* ==========================================================================
   4-BLOCK GRID & 3-COLUMN TOWN DIRECTORY
   ========================================================================== */

.towns-directory {
  background-color: #F8FAFC;
  padding: 3.5rem 1.5rem;
  border-bottom: 1px solid #E2E8F0;
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.towns-directory h2 {
  font-family: 'Merriweather', Georgia, serif;
  color: #0F172A;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: #475569;
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* 4-Block Grid Layout */
.four-block-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
  .four-block-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .four-block-grid {
    grid-template-columns: 1fr;
  }
}

.info-block {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-top: 4px solid #D4AF37;
  border-radius: 6px;
  padding: 1.25rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.block-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: #D4AF37;
  display: block;
  margin-bottom: 0.25rem;
}

.info-block h3 {
  font-family: 'Merriweather', Georgia, serif;
  color: #0F172A;
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.info-block p {
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

/* 3-Column Town Directory */
.town-list-heading {
  font-family: 'Merriweather', Georgia, serif;
  color: #0F172A;
  font-size: 1.3rem;
  border-bottom: 2px solid #CBD5E1;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.town-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Explicit 3 columns */
  gap: 2rem;
}

@media (max-width: 768px) {
  .town-grid-3col {
    grid-template-columns: 1fr; /* Stacks on mobile screens */
  }
}

.town-column {
  list-style: none;
  padding: 0;
  margin: 0;
}

.town-column li {
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed #E2E8F0;
  padding-bottom: 0.4rem;
}

.town-column a {
  color: #1E3A8A;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.town-column a:hover {
  color: #D4AF37;
  text-decoration: underline;
}

.badge {
  font-size: 0.75rem;
  color: #D4AF37;
  font-weight: 700;
}

/* ==========================================================================
   HERITAGE 3-BOX HORIZONTAL GRID
   ========================================================================== */

.county-highlights {
  background-color: #FFFFFF;
  padding: 3rem 1.5rem;
  border-bottom: 1px solid #E2E8F0;
}

.county-highlights h2 {
  font-family: 'Merriweather', Georgia, serif;
  color: #0F172A;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 2rem;
}

.heritage-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 horizontal boxes across the page */
  gap: 1.5rem;
}

@media (max-width: 850px) {
  .heritage-grid-3col {
    grid-template-columns: 1fr; /* Stacks into single column on mobile */
  }
}

.heritage-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-top: 4px solid #D4AF37; /* Gold top border accent */
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.box-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #1E3A8A;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.heritage-box h3 {
  font-family: 'Merriweather', Georgia, serif;
  color: #0F172A;
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.heritage-box p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.events-preview {
  background-color: #F1F5F9;
  padding: 3rem 1.5rem;
  border-bottom: 1px solid #E2E8F0;
}

.events-preview h2 {
  font-family: 'Merriweather', Georgia, serif;
  color: #0F172A;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   CLICKABLE INFO-BLOCK & CANDIDATE PAGE STYLES
   ========================================================================== */

/* Clickable Block 02 on index.html */
a.info-block-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  border: 2px solid #1E3A8A;
  background-color: #F8FAFC;
}

a.info-block-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(30, 58, 138, 0.15);
  border-color: #D4AF37;
  background-color: #FFFFFF;
}

.link-arrow {
  color: #1E3A8A;
  margin-left: 0.25rem;
  transition: margin-left 0.2s ease;
}

a.info-block-link:hover .link-arrow {
  margin-left: 0.5rem;
  color: #D4AF37;
}

/* Candidates Page Grid & Cards */
.candidates-section {
  padding: 3rem 1.5rem;
  background-color: #FFFFFF;
}

.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.candidate-card {
  display: flex;
  flex-direction: column;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.candidate-photo-wrapper {
  width: 100%;
  height: 260px;
  background-color: #E2E8F0;
  overflow: hidden;
}

.candidate-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.candidate-details {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.candidate-district {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #1E3A8A;
  letter-spacing: 0.5px;
}

.candidate-name {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.4rem;
  color: #0F172A;
  margin: 0.25rem 0 0.75rem 0;
}

.candidate-bio {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.candidate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.btn-candidate {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-website {
  background-color: #1E3A8A;
  color: #FFFFFF;
}

.btn-website:hover {
  background-color: #0F172A;
}

.btn-social {
  background-color: #E2E8F0;
  color: #1E3A8A;
}

.btn-social:hover {
  background-color: #CBD5E1;
}
/* ==========================================================================
   BISECTING BANNER BAR WITH SIDE LINKS
   ========================================================================== */

.rooted-banner-bar {
  background-color: #1E3A8A; /* Deep Blue background */
  color: #FFFFFF;
  padding: 1.25rem 1.5rem;
  border-bottom: 3px solid #D4AF37; /* Gold accent rule */
}

.bar-flex-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rooted-headline {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.5rem;
  color: #FFFFFF;
  margin: 0;
  text-align: center;
  flex-grow: 1;
}

.bar-link {
  color: #F8FAFC;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bar-link:hover {
  background-color: #D4AF37;
  color: #0F172A;
  border-color: #D4AF37;
}

/* Adjust layout on smaller mobile screens */
@media (max-width: 768px) {
  .bar-flex-container {
    flex-direction: column;
    text-align: center;
  }
  
  .rooted-headline {
    font-size: 1.25rem;
    order: 1;
  }

  .left-link {
    order: 2;
  }

  .right-link {
    order: 3;
  }
}