:root {
  --blue: #002780;
  --red: #b80000;
  --white: #ffffff;
  --light: #f7f8fb;
  --text: #102040;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

.site-header {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 18px 12px;
  text-align: center;
}

.brand-wrap {
  border: 4px solid var(--blue);
  border-radius: 18px;
  padding: 10px;
  background: var(--white);
}

.campaign-sign {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px auto 8px;
}

.btn {
  display: inline-block;
  min-width: 155px;
  padding: 13px 18px;
  border: 3px solid var(--blue);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 8px;
}

.btn-blue { color: var(--blue); background: var(--white); }
.btn-red { color: var(--white); background: var(--red); border-color: var(--red); }

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 18px 34px;
}

section { margin: 28px 0; }

.intro {
  text-align: center;
  border-top: 5px solid var(--blue);
  border-bottom: 5px solid var(--blue);
  padding: 24px 10px;
}

h1, h2, h3 { color: var(--blue); line-height: 1.15; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin: 0 0 12px; }
h2 {
  text-align: center;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
h3 { margin: 0 0 10px; font-size: 1.35rem; }
.intro p { max-width: 800px; margin: 0 auto; font-size: 1.25rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card {
  border: 3px solid var(--blue);
  padding: 20px;
  background: var(--white);
  border-radius: 10px;
}

.about, .get-involved {
  background: var(--light);
  border-left: 8px solid var(--red);
  padding: 24px;
  border-radius: 10px;
}

.about p, .get-involved p { font-size: 1.08rem; }
.get-involved { text-align: center; }
.contact a { color: var(--blue); font-weight: 700; }

.footer {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: 20px 16px;
}

.footer p { margin: 5px 0; }
.footer .small { font-size: 0.9rem; }

@media (max-width: 760px) {
  .cards { grid-template-columns: 1fr; }
  .brand-wrap { border-width: 3px; border-radius: 12px; padding: 6px; }
  .btn { width: 100%; max-width: 340px; }
}

/* Center campaign page content */

.site-header,
.brand-wrap,
.cta-row,
main,
.section,
.site-footer {
  text-align: center;
}

.section {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section p,
.section h1,
.section h2,
.section h3 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section p {
  max-width: 900px;
}

.cta-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.campaign-sign,
.site-photo {
  display: block;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
}

.big-line {
  text-align: center;
}

/* FORCE CENTER CAMPAIGN PAGE CONTENT */

body,
main,
section,
.section,
.site-header,
.brand-wrap,
.cta-row,
.site-footer {
  text-align: center !important;
}

section,
.section {
  max-width: 980px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}

section p,
.section p,
section h1,
.section h1,
section h2,
.section h2,
section h3,
.section h3 {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

section p,
.section p {
  max-width: 900px !important;
}

.cta-row {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.campaign-sign,
.site-photo {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.big-line {
  text-align: center !important;
}

/* Candidate photo polish */

.candidate-photo-wrap {
  text-align: center !important;
  margin: 28px auto 34px auto !important;
}

.candidate-photo {
  display: block !important;
  max-width: 320px !important;
  width: 80% !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-radius: 50% !important;
}

/* Strong mobile centering and sizing */

@media (max-width: 700px) {
  html,
  body {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    text-align: center !important;
  }

  .site-header,
  .brand-wrap,
  main,
  section,
  .section,
  .site-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .site-header {
    padding: 18px 12px 22px 12px !important;
  }

  .campaign-sign {
    display: block !important;
    width: 92vw !important;
    max-width: 340px !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  .cta-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    gap: 10px !important;
    margin: 16px auto 20px auto !important;
  }

  .cta-row .btn,
  .btn {
    display: block !important;
    width: 88vw !important;
    max-width: 300px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .candidate-photo-wrap {
    width: 100% !important;
    text-align: center !important;
    margin: 20px auto 28px auto !important;
  }

  .candidate-photo {
    display: block !important;
    width: 62vw !important;
    max-width: 240px !important;
    height: auto !important;
    margin: 0 auto !important;
    border-radius: 50% !important;
  }

  main {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  section,
  .section {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 32px !important;
  }

  section h1,
  .section h1 {
    font-size: 32px !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }

  section h2,
  .section h2 {
    font-size: 26px !important;
    line-height: 1.15 !important;
    text-align: center !important;
  }

  section h3,
  .section h3,
  section p,
  .section p {
    max-width: 100% !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  section p,
  .section p {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}

/* Remove shadow from top campaign sign */

.campaign-sign {
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
}

@media (max-width: 700px) {
  .campaign-sign {
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
  }
}

/* Remove any visual shadow/card effect from campaign sign */

.brand-wrap,
.campaign-sign {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
}

@media (max-width: 700px) {
  .brand-wrap,
  .campaign-sign {
    background: transparent !important;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
  }
}

/* Campaign sign size polish */

.campaign-sign {
  display: block !important;
  width: 86% !important;
  max-width: 820px !important;
  height: auto !important;
  margin: 0 auto 20px auto !important;
}

@media (max-width: 700px) {
  .campaign-sign {
    width: 86vw !important;
    max-width: 320px !important;
    height: auto !important;
    margin: 0 auto 16px auto !important;
  }
}

/* Fine tune campaign sign vertical alignment */

.brand-wrap {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  line-height: 0 !important;
  margin: 0 auto 18px auto !important;
  padding: 0 !important;
}

.campaign-sign {
  display: block !important;
  vertical-align: middle !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

@media (max-width: 700px) {
  .brand-wrap {
    margin: 0 auto 16px auto !important;
    padding: 0 !important;
    line-height: 0 !important;
  }

  .campaign-sign {
    display: block !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}

/* Remove outer blue rectangle around sign */

.brand-wrap {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 auto 18px auto !important;
}

@media (max-width: 700px) {
  .brand-wrap {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 auto 16px auto !important;
  }
}

/* Maximize campaign sign without breaking page width */

.brand-wrap {
  width: 100% !important;
  max-width: 1180px !important;
  margin: 0 auto 18px auto !important;
  padding: 0 18px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

.campaign-sign {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
  border: none !important;
  box-shadow: none !important;
  filter: none !important;
}

@media (max-width: 700px) {
  .brand-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 14px !important;
    margin: 0 auto 16px auto !important;
  }

  .campaign-sign {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }
}

/* Sherwood Cut Your Taxes wordmark */

.slogan-wordmark-wrap {
  text-align: center !important;
  margin: 26px auto 28px auto !important;
}

.slogan-wordmark {
  display: block !important;
  width: 90% !important;
  max-width: 640px !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 700px) {
  .slogan-wordmark-wrap {
    margin: 22px auto 24px auto !important;
  }

  .slogan-wordmark {
    width: 94% !important;
    max-width: 340px !important;
    height: auto !important;
  }
}

/* Strong mobile fix for Sherwood Cut Your Taxes wordmark */

.slogan-wordmark-wrap {
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  overflow: hidden !important;
  margin: 22px auto 24px auto !important;
  padding: 0 12px !important;
}

.slogan-wordmark,
.slogan-wordmark-wrap img,
img[alt="Sherwood Cut Your Taxes"] {
  display: block !important;
  width: 82% !important;
  max-width: 560px !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  object-fit: contain !important;
}

@media (max-width: 700px) {
  .slogan-wordmark-wrap {
    padding: 0 18px !important;
    margin: 18px auto 22px auto !important;
  }

  .slogan-wordmark,
  .slogan-wordmark-wrap img,
  img[alt="Sherwood Cut Your Taxes"] {
    width: 86vw !important;
    max-width: 300px !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Final mobile centering fix for wordmark */

@media (max-width: 700px) {
  .slogan-wordmark-wrap {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    overflow: hidden !important;
  }

  .slogan-wordmark,
  .slogan-wordmark-wrap img,
  img[alt="Sherwood Cut Your Taxes"] {
    display: block !important;
    width: 86vw !important;
    max-width: 300px !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
}

/* FINAL wordmark mobile center correction */

@media (max-width: 700px) {
  .slogan-wordmark-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    display: block !important;
    text-align: center !important;
    overflow: visible !important;
  }

  .slogan-wordmark,
  .slogan-wordmark-wrap img,
  img[alt="Sherwood Cut Your Taxes"] {
    display: block !important;
    width: 84vw !important;
    max-width: 300px !important;
    height: auto !important;
    margin: 0 auto !important;
    position: relative !important;
    left: -4px !important;
    transform: none !important;
    object-fit: contain !important;
  }
}

/* Meet David life photo gallery */

.life-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
  max-width: 980px !important;
  margin: 28px auto 34px auto !important;
  align-items: start !important;
}

.life-card {
  margin: 0 auto !important;
  text-align: center !important;
}

.life-photo {
  display: block !important;
  width: 100% !important;
  max-width: 420px !important;
  height: auto !important;
  margin: 0 auto 10px auto !important;
  border-radius: 14px !important;
}

.life-card figcaption {
  font-size: 15px !important;
  line-height: 1.4 !important;
  max-width: 420px !important;
  margin: 0 auto !important;
}

/* Rotate football photo if uploaded sideways */

.football-photo {
  transform: rotate(90deg) !important;
  margin-top: 70px !important;
  margin-bottom: 70px !important;
}

@media (max-width: 700px) {
  .life-gallery {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    max-width: 100% !important;
  }

  .life-photo {
    max-width: 300px !important;
  }

  .football-photo {
    transform: rotate(90deg) !important;
    max-width: 260px !important;
    margin-top: 58px !important;
    margin-bottom: 58px !important;
  }
}

/* Page text alignment */
main .section > p,
main .section > ul,
main .section > ol {
  text-align: left !important;
}

main .section h1,
main .section h2,
main .section h3,
main .section .big-line,
.slogan-wordmark-wrap,
.cta-row,
.life-card figcaption {
  text-align: center !important;
}

/* FINAL candidate portrait size and spacing override */
.site-header .candidate-photo-wrap {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 24px auto 0 !important;
  padding: 0 !important;
}

.site-header .candidate-photo {
  display: block !important;
  width: 390px !important;
  max-width: 84vw !important;
  height: auto !important;
  margin: 0 auto !important;
}

/* Bring first title closer to the portrait */
main .section:first-child {
  margin-top: 0 !important;
  padding-top: 18px !important;
}

/* Align captions for unequal-height gallery cards on desktop */
@media (min-width: 769px) {
  .life-gallery .tamu-card,
  .life-gallery .family-card {
    align-self: end;
  }
}