:root {
  --ink: #172033;
  --muted: #5f6f86;
  --paper: #ffffff;
  --paper-soft: #f6f8fc;
  --line: #dfe7f1;
  --brand: #ff4d5e;
  --brand-dark: #bd2337;
  --accent: #00b8a9;
  --violet: #6658f5;
  --gold: #ffb703;
  --night: #101828;
  --navy: #071225;
  --shadow: 0 22px 60px rgba(7, 18, 37, 0.18);
  --shadow-soft: 0 12px 30px rgba(7, 18, 37, 0.1);
  --radius: 8px;
  --nav-height-mobile: 64px;
  --nav-height-desktop: 82px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  margin: 0;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  background:
    linear-gradient(135deg, rgba(0, 184, 169, 0.1), transparent 28rem),
    linear-gradient(160deg, #fff8ea 0%, #f7fbff 34%, #eef4ff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(7, 18, 37, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 18, 37, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.52), transparent 78%);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  font-family: "Roboto", Arial, sans-serif;
}

a {
  color: var(--brand-dark);
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea {
  font: inherit;
}

#container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
}

nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 18, 37, 0.92);
  box-shadow: 0 10px 28px rgba(7, 18, 37, 0.16);
  backdrop-filter: blur(18px);
}

#mobile-nav {
  display: flex;
  height: var(--nav-height-mobile);
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

#mobile-nav h1,
#desktop-nav h1 {
  color: #ffffff;
  font-family: "Roboto Slab", Georgia, serif;
  letter-spacing: 0;
}

#mobile-nav h1 {
  font-size: 1.3rem;
}

#desktop-nav {
  display: none;
}

#menu-icon,
#mobile-search,
#search-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#menu-icon:hover,
#mobile-search:hover,
#search-expand:hover,
.menu-hover:hover {
  color: var(--brand);
}

#menu-icon:hover,
#mobile-search:hover,
#search-expand:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

#menu-icon i {
  font-size: 1.55rem;
}

#mobile-search {
  margin-left: auto;
  font-size: 1.1rem;
}

#mobile-menu {
  position: fixed;
  z-index: 99;
  top: var(--nav-height-mobile);
  left: 0;
  width: 100%;
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  transition: opacity 0.25s ease;
}

#mobile-menu ul {
  display: grid;
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

#mobile-menu a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius);
  color: #f8fafc;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

#mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.09);
}

#search-div {
  position: fixed;
  z-index: 50;
  top: var(--nav-height-mobile);
  left: 0;
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
  transition: opacity 0.25s ease;
}

#search-div form {
  display: flex;
  width: min(100%, 520px);
  gap: 8px;
}

#search-div .search-box,
#search-div input[type="search"],
#search-div input[type="text"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
}

#search-div input[type="submit"],
#search-div button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: #ffffff;
  padding: 0 14px;
  cursor: pointer;
}

#top-space {
  width: 100%;
  height: var(--nav-height-mobile);
}

#logo-div {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 390px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 76px 18px 62px;
  border-bottom: 1px solid rgba(7, 18, 37, 0.08);
  background:
    linear-gradient(135deg, rgba(7, 18, 37, 0.98), rgba(16, 24, 40, 0.92) 58%, rgba(102, 88, 245, 0.82)),
    linear-gradient(45deg, rgba(255, 77, 94, 0.95) 0 18%, transparent 18% 100%),
    linear-gradient(135deg, transparent 0 58%, rgba(0, 184, 169, 0.72) 58% 75%, rgba(255, 183, 3, 0.78) 75% 100%);
  box-shadow: inset 0 -100px 130px rgba(7, 18, 37, 0.22);
  text-align: center;
}

#logo-div::after {
  content: "";
  position: absolute;
  right: max(-80px, -6vw);
  bottom: -70px;
  width: min(52vw, 620px);
  aspect-ratio: 1;
  border: 28px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

#logo-div::before {
  content: "workouts for first responders";
  position: absolute;
  bottom: 42px;
  left: 50%;
  z-index: 2;
  width: max-content;
  max-width: calc(100% - 36px);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 7px 14px;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

#logo-div img {
  position: relative;
  z-index: 1;
  width: min(78%, 660px);
  padding: 14px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

main {
  z-index: 1;
  display: flex;
  width: min(100% - 24px, 1120px);
  flex: 1;
  flex-direction: column;
  align-items: center;
  padding-bottom: 48px;
}

.section-divider {
  padding-bottom: 22px;
}

.summary-section {
  display: grid;
  width: 100%;
  gap: 18px;
}

.wods,
.article-div,
.search-display,
#full-form,
#error-404 {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(95, 111, 134, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.wods {
  margin-top: 20px;
}

.todays-workout {
  border-top: 6px solid var(--brand);
}

.title-division {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.26);
  background:
    linear-gradient(90deg, var(--navy), var(--night) 52%, rgba(102, 88, 245, 0.94));
  padding: 12px 14px;
}

.title-division h3 {
  color: #f8fafc;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
}

.title-division h3:first-child {
  border-radius: 999px;
  background: rgba(0, 184, 169, 0.18);
  color: #9ff8ee;
  padding: 4px 9px;
}

#workout,
.summary-content,
.article-div,
.search-result,
#contact-text {
  color: var(--ink);
}

#workout {
  padding: 20px clamp(16px, 4vw, 38px);
}

#workout p,
.summary-content p,
.article-div p {
  margin-top: 0;
}

.todays-workout #workout {
  font-size: 1.1rem;
}

.summary {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.summary img,
.todays-workout > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e2e8f0;
}

.summary-content {
  flex: 1;
  padding: 16px 16px 4px;
}

#wod-links,
.summary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 14px 16px 18px;
}

.no-link a,
#wod-links a,
.summary-links a,
.pagination a,
.pagination span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 77, 94, 0.24);
  border-radius: 999px;
  background: rgba(255, 77, 94, 0.08);
  color: var(--brand-dark);
  padding: 8px 14px;
  font-family: "Roboto", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.no-link a:hover,
#wod-links a:hover,
.summary-links a:hover,
.pagination a:hover {
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-1px);
}

#article-title {
  width: 100%;
  margin: 28px 0 4px;
  text-align: left;
}

#article-title h2 {
  color: var(--night);
  font-size: clamp(1.8rem, 6vw, 3rem);
}

#article-title a {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.page-heading {
  width: 100%;
  margin: 18px 0 0;
  border-left: 6px solid var(--violet);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  color: var(--navy);
  padding: 16px 18px;
  font-size: clamp(1.5rem, 5vw, 2.8rem);
}

.article-div {
  margin: 18px 0;
  padding: clamp(18px, 4vw, 34px);
  line-height: 1.75;
}

.article-div h1,
.article-div h2,
.article-div h3 {
  color: var(--night);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 22px 0;
}

.pagination .current {
  background:
    linear-gradient(135deg, var(--navy), var(--night) 58%, #241b5f);
  color: #ffffff;
}

footer {
  display: grid;
  width: 100%;
  margin-top: 28px;
  background: var(--night);
  color: #f8fafc;
}

#footer-links,
#footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
}

#footer-links {
  padding: 28px 18px;
}

#footer-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

#footer-links a {
  display: inline-flex;
  border-radius: 999px;
  color: #f8fafc;
  padding: 8px 12px;
  text-decoration: none;
}

#footer-links a:hover,
.footer-ispage a {
  background: rgba(255, 255, 255, 0.1);
}

#footer-social {
  gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px;
  font-size: 2rem;
}

#footer-social a {
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #f8fafc;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

#footer-social a:hover {
  background: rgba(20, 184, 166, 0.16);
  color: #99f6e4;
}

.comments {
  margin-top: 18px;
  padding: 0 16px 18px;
}

.all-comments {
  margin: 0;
  padding-left: 0;
}

.all-comments li {
  list-style: none;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.all-comments .comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: var(--radius);
  background: var(--paper-soft);
  padding: 8px 10px;
}

.all-comments .comment-meta a {
  color: var(--muted);
}

.all-comments .vcard {
  display: flex;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.all-comments .photo,
.all-comments .says {
  display: none;
}

.all-comments .reply a {
  color: var(--brand-dark);
  font-weight: 800;
}

.all-comments .children {
  margin-top: 14px;
  border-left: 3px solid var(--line);
  padding-left: 14px;
}

.comment-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 20px 16px;
}

.comment-form textarea,
.comment-form input,
#full-form input,
#full-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 12px 13px;
}

.comment-form textarea:focus,
.comment-form input:focus,
#full-form input:focus,
#full-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
  outline: none;
}

.comment-login {
  width: 100%;
}

.form-submit {
  display: flex;
  justify-content: center;
  margin: 0;
}

#submit,
#contact-submit button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  padding: 10px 22px;
  font-family: "Roboto", Arial, sans-serif;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

#submit:hover,
#contact-submit button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

#error-404 {
  min-height: 420px;
  justify-content: center;
  align-items: center;
  margin: 24px 0;
  padding: 28px;
  text-align: center;
}

.search-display {
  margin: 20px 0;
  padding: 18px;
}

.search-display a {
  text-decoration: none;
}

.search-result {
  margin: 0 0 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

#full-form {
  display: grid;
  gap: 20px;
  margin: 22px 0;
  padding: 20px;
}

#contact-text {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

#contact-text :first-child,
#contact-text :last-child {
  text-align: center;
}

#contact-submit {
  display: flex;
  justify-content: center;
}

.custom-banner {
  width: 100%;
}

.custom-banner-contact {
  display: grid;
  min-height: 260px;
  place-items: center;
  overflow: hidden;
  padding: 96px 18px 48px;
  background:
    linear-gradient(135deg, rgba(7, 18, 37, 0.98), rgba(102, 88, 245, 0.78)),
    linear-gradient(45deg, rgba(0, 184, 169, 0.7) 0 28%, transparent 28% 100%),
    linear-gradient(145deg, transparent 0 64%, rgba(255, 183, 3, 0.78) 64% 100%);
  color: #ffffff;
}

.custom-banner-contact h1 {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  padding: 12px 18px;
  font-size: clamp(2rem, 7vw, 4.2rem);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.custom-banner img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

@media (min-width: 700px) {
  .summary-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .todays-workout {
    width: 100%;
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }

  #footer-social {
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  #full-form {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }

  #contact-text {
    border-right: 1px solid var(--line);
    border-bottom: 0;
    padding-right: 20px;
    padding-bottom: 0;
  }
}

@media (min-width: 950px) {
  #mobile-nav {
    display: none;
  }

  #desktop-nav {
    display: flex;
    height: var(--nav-height-desktop);
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 clamp(22px, 5vw, 72px);
  }

  #desktop-nav h1 a {
    color: #ffffff;
    font-family: "Roboto Slab", Georgia, serif;
    font-size: clamp(1.55rem, 2vw, 2.3rem);
    text-decoration: none;
  }

  #desktop-nav h1 a:hover {
    color: var(--gold);
  }

  #nav-center {
    text-align: center;
  }

  #nav-center h2,
  #nav-right h2 {
    font-size: 1rem;
  }

  #nav-center h2 a,
  #nav-right a {
    border-radius: 999px;
    color: #f8fafc;
    padding: 8px 12px;
    text-decoration: none;
  }

  #nav-center h2 a:hover,
  #nav-right a:hover,
  #nav-right i:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold);
  }

  #nav-right ul {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  #nav-right ul div {
    display: flex;
    align-items: center;
  }

  .page-selected {
    border: 1px solid rgba(255, 183, 3, 0.42);
    border-radius: 999px;
    background: rgba(255, 183, 3, 0.12);
  }

  #search-div {
    top: var(--nav-height-desktop);
    justify-content: flex-end;
    padding-right: clamp(22px, 5vw, 72px);
  }

  #top-space {
    height: var(--nav-height-desktop);
  }

  #logo-div {
    min-height: 480px;
    padding-top: 104px;
    padding-bottom: 86px;
  }

  #logo-div img {
    width: min(44%, 700px);
  }

  main {
    width: min(100% - 48px, 1120px);
  }

  .title-division {
    padding: 14px 18px;
  }

  .title-division h3 {
    font-size: 1rem;
  }

  .todays-workout #workout {
    font-size: 1.22rem;
  }
}
