@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Oswald:wght@400;500;600&family=Source+Sans+3:wght@400;600&display=swap');

:root {
  --navy: #011534;
  --navy-deep: #000d22;
  --cream: #fbf9f4;
  --gold: #d49632;
  --red: #d40206;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: 'Source Sans 3', Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1.7;
}

header {
  background: var(--navy-deep);
  border-bottom: 3px solid var(--gold);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 0.15em;
  color: var(--gold);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2rem;
}

nav li { display: inline-block; }

nav a {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

nav a:hover { color: var(--gold); border-bottom-color: var(--gold); }

main { max-width: 1000px; margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-weight: 700;
  line-height: 1.25;
}

.hero { text-align: center; padding: 5rem 0 3rem; }
.hero h1 { font-size: 2.8rem; margin: 0 0 1rem; }
.tagline { font-style: italic; font-size: 1.35rem; color: var(--gold); margin: 0 0 1rem; }
.values {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.mission { text-align: center; max-width: 720px; margin: 0 auto; padding: 2rem 0; border-top: 1px solid rgba(212,150,50,0.4); }
.mission h2 { font-size: 1.8rem; color: var(--gold); }

.cta { text-align: center; padding: 2rem 0 4rem; }

.btn {
  display: inline-block;
  margin: 0.4rem;
  padding: 0.85rem 2rem;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  border: 2px solid var(--gold);
  border-radius: 2px;
}
.btn:hover { background: rgba(212,150,50,0.15); }
.btn.primary { background: var(--gold); color: var(--navy-deep); font-weight: 600; }
.btn.primary:hover { background: #e4a940; }

a { color: var(--gold); }

footer {
  background: var(--navy-deep);
  border-top: 2px solid var(--gold);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  color: #b8c1cf;
}
footer p { margin: 0.2rem 0; }

@media (max-width: 700px) {
  nav { justify-content: center; }
  nav ul { justify-content: center; gap: 1.2rem; }
  .hero h1 { font-size: 2rem; }
}
/* Hero with large courthouse image */
main { max-width: 1200px; padding: 0 1.5rem; }
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  text-align: left;
  padding: 3rem 0;
}
.hero-text { flex: 1 1 40%; }
.hero h1 { font-size: 2.6rem; }
.hero-img {
  flex: 0 1 560px;
  width: 560px;
  max-width: 100%;
  height: auto;
  border: 3px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.mission { max-width: 720px; }
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; }
  .hero-img { width: 100%; }
}
.mission-page { border-top: none; padding: 5rem 1.5rem 2rem; text-align: center; }
.mission-page h1 { font-size: 2.6rem; color: var(--gold); margin-top: 0; }
.mission-page p { font-size: 1.35rem; }
.mission .btn { margin-top: 1rem; }

.btn.primary { border-color: var(--gold); }
nav a:hover { color: var(--gold); }
.cta .btn.primary:hover { box-shadow: 0 0 0 2px var(--red); }

.contact-email { font-size: 1.3rem; }
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.leadership h2 { color: var(--gold); }
.leadership .note { font-style: italic; opacity: 0.8; }

/* Home page logo banner */
.logo-banner { text-align: center; padding: 2.5rem 0 0.5rem; }
.logo-banner img {
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: 6px;
  border: 3px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Logo beside courthouse */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero { align-items: center; }
.hero-text { flex: 1 1 50%; }
.hero-logo {
  width: 100%;
  max-width: 572px;
  height: auto;
  border: 3px solid var(--gold);
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
@media (max-width: 900px) { .hero-logo { max-width: 100%; } }

.hero { margin-left: -40px; margin-right: -40px; }
@media (max-width: 1260px) { .hero { margin-left: 0; margin-right: 0; } }

/* Header ECRA mark */
a.logo { display: inline-block; line-height: 0; border: none; padding: 0; }
a.logo img { height: 52px; width: auto; display: block; filter: drop-shadow(0 0 3px rgba(255,255,255,0.35)); }

/* Courthouse popup */
.popup {
  position: fixed;
  z-index: 1000;
  background: var(--cream);
  color: var(--navy);
  border: 2px solid var(--gold);
  border-radius: 4px;
  padding: 0.7rem 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: 'Source Sans 3', Arial, sans-serif;
}
.popup[hidden] { display: none; }
.popup strong { font-family: 'Libre Baskerville', Georgia, serif; font-size: 1rem; }
.popup a { color: #8a5a00; font-weight: 600; text-decoration: none; }
.popup a:hover { text-decoration: underline; }

/* Courthouse page */
.courthouse-page { max-width: 820px; margin: 0 auto; padding: 3rem 0 1rem; }
.courthouse-page h1 { text-align: center; color: var(--gold); margin-bottom: 0.25rem; }
.courthouse-page .tagline { text-align: center; }
.courthouse-page h2 { color: var(--gold); margin-top: 2rem; }
.courthouse-photo { display: block; margin: 1.5rem auto; max-width: 100%; width: 420px; height: auto; border: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.courthouse-page .visit { font-style: italic; margin-top: 2rem; }
.sources li { margin-bottom: 0.4rem; }

/* Hover label on courthouse photo */
.hero-link { display: block; flex: 0 1 560px; max-width: 100%; cursor: pointer; line-height: 0; }
.hero-link .hero-img { width: 100%; }
.hover-tip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  background: var(--cream);
  color: var(--navy);
  border: 2px solid var(--gold);
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
  white-space: nowrap;
}
.hover-tip[hidden] { display: none; }

/* Candidates page */
.candidates-page { max-width: 1000px; margin: 0 auto; padding: 3rem 0 1rem; }
.candidates-page h1 { text-align: center; color: var(--gold); margin-bottom: 0.25rem; }
.candidates-page .tagline { text-align: center; }
.candidate { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; justify-content: center; margin-top: 2.5rem; padding: 2rem; background: rgba(255,255,255,0.05); border: 1px solid var(--gold); border-radius: 6px; }
.candidate-photo { flex: 0 1 240px; width: 240px; max-width: 100%; height: auto; border: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); background: #fff; }
.candidate-info { flex: 1 1 320px; }
.candidate-info .office { text-transform: uppercase; letter-spacing: 0.15em; font-family: 'Oswald', sans-serif; color: var(--gold); margin: 0; }
.candidate-info h2 { font-size: 2.4rem; margin: 0.2rem 0; color: #fff; }
.candidate-info .race { font-size: 1.2rem; margin-top: 0; }
.values-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.values-list li { padding: 0.3rem 0 0.3rem 1.8rem; position: relative; font-family: 'Oswald', sans-serif; letter-spacing: 0.05em; text-transform: uppercase; }
.values-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--red); font-weight: bold; text-shadow: 0 0 2px #fff; }
.candidate-info .choice { border-left: 4px solid var(--gold); padding-left: 1rem; }
.howto { margin-top: 3rem; text-align: center; }
.howto h2 { color: var(--gold); }
.howto p { max-width: 720px; margin-left: auto; margin-right: auto; }
.cards { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }
.cards img { width: 300px; max-width: 100%; height: auto; border: 3px solid var(--gold); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
/* Hover label on candidate links */
.site-link { position: relative; display: inline-block; line-height: 0; text-decoration: none; color: inherit; }
.site-link.name-link { line-height: inherit; }
.site-link.name-link:hover { color: var(--gold); }
.site-link::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: var(--cream); color: var(--navy); border: 2px solid var(--gold); border-radius: 4px; padding: 0.3rem 0.7rem; font-family: 'Libre Baskerville', Georgia, serif; font-size: 0.9rem; line-height: 1.2; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,0.5); opacity: 0; pointer-events: none; transition: opacity 0.15s; z-index: 50; }
.site-link:hover::after { opacity: 1; }
/* Candidate box enlarged 20% */
.candidate { padding: 2.4rem; gap: 2.4rem; }
.candidate-photo { flex: 0 1 288px; width: 288px; }
.candidate-info { flex: 1 1 380px; font-size: 1.2rem; }
.candidate-info .office { font-size: 1.2rem; }
.candidate-info h2 { font-size: 2.88rem; }
.candidate-info .race { font-size: 1.44rem; }
.candidate-info .btn { font-size: 1.2rem; padding: 0.84rem 1.8rem; }
/* White banner with black menu */
header { background: #ffffff; border-bottom: 3px solid var(--gold); }
header nav a, nav a { color: #000000; }
header nav a:hover, nav a:hover { color: var(--navy); border-bottom-color: var(--gold); }
a.logo img { filter: none; }
/* Deeper navy site background */
body { background: var(--navy-deep); }
footer { border-top: 1px solid rgba(212,150,50,0.5); }

/* Banner ribbon and elephant */
header {
  background-color: #ffffff;
  background-image: url('images/elephant-banner.png'), url('images/ribbon.svg');
  background-repeat: no-repeat, no-repeat;
  background-position: right 20px top 12px, bottom left;
  background-size: 90px auto, 100% 70px;
  padding-bottom: 44px;
}
@media (min-width: 1100px) { header { padding-right: 120px; } }
@media (max-width: 1099px) { header { background-image: url('images/ribbon.svg'); background-position: bottom left; background-size: 100% 70px; } }
/* Swirl ribbon behind the ECRA mark (replaces straight ribbon) */
header {
  background-image: url('images/elephant-banner.png'), url('images/ribbon-swirl.svg');
  background-repeat: no-repeat, no-repeat;
  background-position: right 20px top 12px, left bottom;
  background-size: 90px auto, auto 128px;
  min-height: 84px;
}
@media (max-width: 1099px) { header { background-image: url('images/ribbon-swirl.svg'); background-position: left bottom; background-size: auto 128px; } }
a.logo { position: relative; z-index: 1; }
nav { position: relative; z-index: 1; }
/* Swirl v2: starts left, curves behind the ECRA mark, fades under the elephant */
header {
  background-image: url('images/elephant-banner.png'), url('images/swirl-left.svg'), url('images/swirl-right.svg');
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: right 130px top 12px, left bottom, 500px bottom;
  background-size: 90px auto, 560px 128px, calc(100% - 500px) 128px;
}
@media (min-width: 1100px) { header { padding-right: 240px; } }
@media (max-width: 1099px) {
  header {
    background-image: url('images/swirl-left.svg'), url('images/swirl-right.svg');
    background-repeat: no-repeat, no-repeat;
    background-position: left bottom, 500px bottom;
    background-size: 560px 128px, calc(100% - 500px) 128px;
  }
}
/* Ribbon removed; elephant moved left and balanced in the banner */
header {
  background-color: #ffffff;
  background-image: url('images/elephant-banner.png');
  background-repeat: no-repeat;
  background-position: right 110px center;
  background-size: 80px auto;
  padding-bottom: 0;
  padding-right: 0;
  min-height: 0;
}
@media (min-width: 1200px) { header { padding-right: 220px; } }
@media (max-width: 1199px) { header { background-image: none; padding-right: 0; } }
/* Elephant moved right (as far as the banner edge allows) */
header { background-position: right 20px center; }
@media (min-width: 1200px) { header { padding-right: 130px; } }
/* Elephant sits in the menu row, 60px after the last menu item */
header { background-image: none !important; padding-right: 0 !important; }
nav ul { align-items: center; }
nav ul::after {
  content: "";
  display: block;
  width: 70px;
  height: 52px;
  margin-left: 28px; /* plus the 2rem (32px) menu gap = 60px */
  background: url('images/elephant-banner.png') no-repeat center / contain;
}
/* Elephant raised so his feet sit on the menu text baseline */
nav ul::after { transform: translateY(-20px); }
/* Elephant lowered 5px */
nav ul::after { transform: translateY(-15px); }

/* Banner content shifted left 60px */
header nav { position: relative; left: -60px; }
@media (max-width: 1250px) { header nav { left: 0; } }

/* Texas flag photo, faded to ~40%, behind the full-width banner */
header {
  background-color: #ffffff !important;
  background-image: linear-gradient(rgba(255,255,255,0.60), rgba(255,255,255,0.60)), url('images/texas-flag-banner.jpg') !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center 49.5% !important;
}
/* Flag at 45% strength */
header { background-image: linear-gradient(rgba(255,255,255,0.55), rgba(255,255,255,0.55)), url('images/texas-flag-banner.jpg') !important; }
