/* =========================
   Basic reset / sane defaults
   ========================= */

* {
  box-sizing: border-box;
}

html {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
}

/* =========================
   Page base styles
   ========================= */

body {
  margin: 0;
  background: #ffffff;
  color: #36516a;
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #5986b0;
  margin: 2rem 0 1.5rem 0;
  line-height: 1.2;
}

p {
  margin: 0.75rem 0 1.5rem 0;
}

a {
  color: #5986b0;
  text-decoration: none;
}

a:hover {
  opacity: 0.6;
  text-decoration: underline;
}

ul {
  margin: 0.75rem 0 0.75rem 1.25rem;
  padding: 0;
}

li {
  margin: 0.35rem 0 1rem 0;
}

hr {
  margin: 0.75rem 0;
  border: 0;
}

/* =========================
   Main content (shared width)
   ========================= */

main {
  max-width: 70ch;
  margin: 0 auto;
  padding: 0 1rem 1rem 1rem;
}

section {
  margin-bottom: 8rem;
}

/* =========================
   Header
   ========================= */

header {
  max-width: 80ch;
  margin: 0.7rem auto 1rem;
  padding: 0 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.header-inner img {
  height: 50px;
  width: auto;
}

.header-inner a {
  color: #36516a;
}

header nav {
  font-size: 1em;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #5986b0;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* =========================
   Quiz interaction styles
   ========================= */

#quizApp ul {
  padding-left: 1.25rem;
}

#quizApp li {
  cursor: pointer;
  margin: 0.25rem 0;
}

#quizApp li:hover {
  opacity: 0.6;
}

#quizApp .fb {
  margin: 0.25rem 0 1.75rem;
  opacity: 0.85;
}

/* =========================
   Services section
   ========================= */

#services {
  background-color: rgb(244, 250, 255);
  padding: 1rem 2rem 4rem 1rem;
  border-radius: 16px;
}

/* shared “full width” elements inside sections */
#services .services-inner,
#services .services-layout,
#services .services-copy {
  width: 100%;
}

#services .services-media {
  margin-top: 5rem;
  display: flex;
  justify-content: center;
}

#services .services-media img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 16px;
}

/* =========================
   Questions / Quiz section
   ========================= */

#quiz {
  /* inherits main width */
}

#quiz .quiz-inner,
#quiz .quiz-layout {
  width: 100%;
}

#quiz .quiz-media {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 5rem;
}

#quiz .quiz-media img {
  display: block;
  width: 110px;
  height: auto;
  border-radius: 16px;
}

/* =========================
   Footer
   ========================= */

footer {
  padding: 0 0 2rem 0;
}

.footer-inner {
  max-width: 80ch;
  margin: 0 auto;
  padding: 0 1rem;

  display: flex;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-inner img {
  height: 60px;
  width: auto;
}

.footer-text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  align-items: center;
}

.footer-copyright {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.7rem;
  opacity: 0.75;
}

/* =========================
   Desktop-only: true centered header nav
   ========================= */

@media (min-width: 601px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .header-inner img {
    grid-column: 1;
    justify-self: start;
  }

  header nav {
    grid-column: 2;
    justify-self: center;
  }

  .nav-toggle {
    grid-column: 3;
    justify-self: end;
  }
}

/* =========================
   Mobile-only layout fixes
   ========================= */

@media (max-width: 600px) {
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }

  .nav-toggle {
    display: block;
  }

  header nav {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1rem;
  }

  header nav.open {
    display: flex;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .footer-text {
    text-align: center;
  }
}
