* {
  margin: 0;
  padding: 0;
}

body {
  background: #fff9f5;
}

.view-desktop {
  display: block;
}

.view-mobile {
  display: none;
}

h2 {
  font-weight: 600;
}

p {
  font-size: 1rem;
  margin: 0;
}

section {
  width: 80%;
  margin: 10em auto 0 auto;
  padding-top: 2em;
}

/* Sidebar links and style */
.sidebar {
  display: flex;
  max-width: 150px;
  height: auto;
  background: white;
  border: 3px solid #0a4fd5;
  position: fixed;
  top: 20%;
  left: 0;
  transition: transform 0.3s ease-in-out;
  font-size: 0.875rem;
  z-index: 10000;
}

/* Sidebar Links */
.sidebar ul {
  list-style: none;
  margin: 0;
}

.sidebar ul li {
  cursor: pointer;
}

.sidebar ul li a {
  color: black;
  text-decoration: none;
  display: block;
  padding: 0.7em;
}

.sidebar ul li:hover, .sidebar ul li.active {
  /* Highlight active section */
  background: #0a4fd5;
  color: white;
}

.sidebar ul li:hover a, .sidebar ul li.active a {
  color: white;
}

.sidebar li {
  border-bottom: 1px solid #0a4fd5;
}

.hide {
  opacity: 0;
  display: none;
}

.show {
  opacity: 1;
}

.cover {
  position: relative;
}

.header {
  margin: 0;
  padding-top: 200px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.title-first span {
  background-color: #0a4fd5;
  color: white;
  font-size: 4rem;
  font-weight: 900;
  padding: 1rem 1.5rem;
}

.yellow {
  background-image: url("../images/yellow-border.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  padding: 1rem;
}

.title-second {
  font-weight: 600;
  font-size: 3rem;
  padding: 1rem;
}

.publish {
  font-size: 0.9em;
  width: 80%;
  padding: 1em 0;
  margin: 1em auto 0 auto;
  border-top: 1px solid rgba(239, 239, 239, 1);
  text-align: center;
}

section.intro {
  width: 100%;
  background-color: antiquewhite;
  margin: 0;
}

.intro {
  display: flex;
  flex-direction: row;
  gap: 3em;
  align-items: center;
  padding: 5em;
}

.description, .respondents {
  width: 50%;
}

.respondents-title {
  padding-bottom: 2em;
}

h4,
.title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 1rem;
}

.blue {
  background-image: url("../images/blue-border.svg");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  padding: 1rem;
}

#profile {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 1em;
  margin: auto;
}

#profile .respondent {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  text-align: left;
}

#profile .profile-container {
  display: flex;
  align-items: start;
  gap: 1em;
}

#profile .respondent img {
  width: 80px;
}

.respondent img {
  width: 50px;
}

.portrait-content .name {
  font-weight: bold;
}

.age, .text-wrap {
  font-size: 0.75rem;
}

.main-content {
  padding: 1em;
  width: 90%;
  margin: auto;
}

.speech-bubble {
  background: white;
  border: 1px solid black;
  border-radius: 15px;
  box-shadow: 5px 5px #fbb03b;
  margin: auto;
  max-width: 700px;
  padding: 1em;
  position: relative;
}

.speech-bubble-arrow {
  border-left: 24px solid transparent;
  border-top: 20px solid #fbb03b;
  bottom: -25px;
  position: absolute;
  left: 35px;

  &::before {
    border-left: 23px solid transparent;
    border-top: 23px solid black;
    bottom: 2px;
    content: "";
    position: absolute;
    right: -4px;
  }
  &::after {
    border-left: 21px solid transparent;
    border-top: 21px solid white;
    bottom: 5px;
    content: "";
    position: absolute;
    right: -3px;
  }
}

.question {
  text-align: center;
}

.qns-content {
  display: flex;
  flex-direction: row;
  margin: 4em auto;
  gap: 4em;
  align-items: flex-start;
}

.qns-description, .scale-content {
  width: 50%;
}

.scale-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.respondents-container {
  max-width: 350px;
  width: 100%;
}

/* Political scale */
.political-scale {
  text-align: center;
  padding-top: 10px;
  width: 100%;
}

.scale-container {
  position: relative;
  margin: auto;
  width: 100%;
  position: relative;
}

.scale {
  width: 100%;
  height: 10px;
  background: linear-gradient(to right, #e90044 0%, #fbb03b 50%, #39b54a 100%);
}

.scale-labels {
  position: absolute;
  font-size: 14px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  bottom: -25px;
}

.political-range, .political-number {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.respondents-container, .range-five, .range-ten {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: center;
  gap: 1em;
}

.respondent, .respondent-five, .respondent-ten {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  position: relative;
}

.respondent img {
  max-width: 80px;
}

.name, .age {
  font-size: 0.875rem;
}

.dot {
  color: white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.red-range {
  background-color: #e90044;
}

.range-class {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
}

.yellow-line {
  border: 1px solid #fbb03b;
  width: 100%;
  position: absolute;
  transform: translateY(-50%);
}

.yellow-range {
  background-color: #fbb03b;
}

.green-rangeOne {
  background-color: #a3b242;
}

.green-rangeTwo {
  background-color: #76b345;
}

.green-rangeThree {
  background-color: #54b448;
}

.green-line {
  border: 1px solid #39b54a;
  width: 100%;
  position: absolute;
  transform: translateY(-50%);
}

.green-rangeFour {
  background-color: #39b54a;
}

.quotes-content {
  position: relative;
}

.quotes {
  display: flex;
  flex-direction: column;
}

.scrollbar {
  width: 7px;
  height: 7vh;
  border-radius: 1rem;
  background-color: #98b2e6;
  animation: scroll 3s infinite;
  position: absolute;
  top: 30%;
  right: 1.5rem;
  display: none;
}

.scrollbar-menu {
  width: 5px;
  height: 5vh;
  border-radius: 1rem;
  background-color: #0a4fd5;
  animation: scroll 3s infinite;
  position: absolute;
  top: 0;
  right: 0;
  display: none;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(2em);
  }
}

/* For scrollable sections */
.quotes.scrollable {
  max-height: 50vh;
  overflow-y: auto;
  background-color: antiquewhite;
  padding: 1em;
  margin: 4em 0;
  gap: 1em;
  border: 1.5em solid antiquewhite;
}

.quotes.scrollable::-webkit-scrollbar {
  -webkit-appearance: none;
}

.quotes.scrollable::-webkit-scrollbar:vertical {
  width: 7px;
}

.quotes.scrollable::-webkit-scrollbar-thumb {
  border-radius: 1rem;
  background: #0a4fd5;
  background-clip: padding-box;
}

.d-flex {
  gap: 1em;
}

.d-flex p {
  width: 90%;
  background: white;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
  padding: 15px;
  position: relative;

  &::after {
    border-left: 12px solid transparent;
    border-top: 12px solid white;
    top: 1em;
    content: "";
    position: absolute;
    left: 2px;
    border-color: transparent transparent white white;
    transform-origin: 0 0;
    transform: rotate(45deg);
    box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.1);
  }
}

.portraits {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 10%;
  font-size: 0.875rem;
  color: #3b3b3b;
  text-align: center;
}

.portraits img {
  width: 40px;
  height: 40px;
}

.quotes button {
  position: sticky;
  top: 0;
  margin: auto;
  padding: 10px 15px;
  background-color: #0a4fd5;
  border: 1px solid #0a4fd5;
  color: white;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  max-width: 500px;
  display: flex;
  align-items: center;
}

.down-arrow {
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  display: inline-block;
  padding: 3px;
  margin-left: 10px;
}

button:hover {
  background-color: black;
  border: 1px solid black;
  color: white;
}

button:disabled {
  background-color: #efefef;
  color: grey;
  border: 1px solid #efefef;
}

button.selected {
  background-color: black;
  color: white;
  border: 1px solid black;
}

/* chart */
.chart {
  position: relative;
  width: 300px;
  height: 400px;
  border-left: 2px solid black;
  position: relative;
  padding-left: 20px;
}
.y-label {
  position: absolute;
  left: 0;
  transform: translateX(-100%);
}
.image-container {
  position: absolute;
}
.image-container img {
  width: 50px;
  height: 50px;
}

/*Scrolly*/
#scrollyFuture, #scrollyInfoSources {
  display: flex;
  gap: 2em;
}

.scrollyText {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 50%;
}

figure {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  max-width: 50%;
  margin: 0;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  z-index: 0;
  text-align: center;
}

.step {
  color: white;
  margin-bottom: 40vh;
  margin-top: 40vh;
  z-index: 50;
}

.step:last-child {
  margin-bottom: 0;
}

.step.is-active p {
  background-color: goldenrod;
  color: #3b3b3b;
}

.step p {
  text-align: center;
  padding: 2rem;
  background-color: white;
  color: black;
  margin: 0;
  width: 100%;
}

.step p span {
  font-size: 1.2rem;
  font-weight: bold;
}

.flourish-credit {
  display: none !important;
}

.emoji {
  font-size: 1.7rem;
  position: absolute;
  filter: invert(15%) sepia(95%) saturate(6250%) hue-rotate(215deg)
    brightness(98%) contrast(88%);
  bottom: 60%;
  left: 75%;
}

.circle {
  position: absolute;
  top: -5px;
  background-color: white;
  border: 1px solid black;
  color: black;
  font-size: 0.875rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.1s ease-in-out;
}

.q3-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.government,
.opposition {
  width: 50%;
}

.govt-title {
  background-color: white;
  border: 1px solid black;
  padding: 10px;
  width: 150px;
  font-size: 1.2rem;
  text-align: center;
  font-weight: bold;
}

.opp-title {
  background-color: #efefef;
  border: 1px solid black;
  padding: 10px;
  width: 150px;
  font-size: 1.2rem;
  text-align: center;
  font-weight: bold;
}

.parties-content {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.party-content {
  display: flex;
  align-items: start;
  gap: 1em;
}

.party-content img {
  width: 1.5em;
}

.d-flex p.white {
  background: white;
  &::after {
    border-right: 12px solid transparent;
    border-left: none;
    right: 13px;
    left: auto;
    transform: rotate(225deg);
    transform-origin: 1em;
    border-color: white white transparent transparent;
  }
}

.d-flex p.grey {
  background: #efefef;
  &::after {
    border-left: 12px solid transparent;
    border-top: 12px solid #efefef;
    border-color: transparent transparent #efefef #efefef;
  }
}

#q4 .qns-content {
  justify-content: center;
}

#q4 .respondents-container {
  max-width: 100%;
}

#q9 .qns-content {
  flex-direction: column;
  gap: 1em;
  align-items: center;
}

#q9 .respondents-container {
  max-width: 100%;
}

.respondents-grouping {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: center;
}

.excellent {
  color: #39b54a;
}

.good {
  color: #a3b242;
}

.neutral {
  color: #fbb03b;
}

.groupOne,
.groupTwo {
  width: 100%;
}

.groupTwo {
  display: flex;
  justify-content: space-around;
}

.q6-content {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

#q7 .word-cloud img {
  width: 100%;
}

#q10 .word-cloud img {
  width: 50%;
  margin: auto;
}

/* poll */
fieldset {
  background: white;
  box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  text-align: center;
  padding: 2em;
}

.readers-poll {
  background: white;
  background-image: linear-gradient(
      rgba(239, 239, 239, 0.5) 0.1em,
      transparent 0.1em
    ),
    linear-gradient(90deg, rgba(239, 239, 239, 0.5) 0.1em, transparent 0.1em);
  background-size: 1em 1em;
}

.quiz-hdline {
  display: flex;
  align-items: start;
  justify-content: center;
  gap: 1em;
  padding-bottom: 1em;
}

.quiz-hdline h5 {
  text-align: left;
}

.quiz-hdline img {
  width: 60px;
}

.poll-message {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding-top: 1em;
}

.poll-message img {
  width: 20px;
}

.poll-message p {
  color: #0a4fd5;
  font-weight: 600;
}

.poll-bar {
  height: 20px;
  width: 0;
  transition: width 2s ease;
  display: flex;
  align-items: center;
  justify-content: end;
  /* padding: 5px; */
  position: relative;
}

.poll-label {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 0.875rem;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
}

.poll-label.outside {
  top: 50%;
  left: 100%;
  transform: translate(10px, -50%);
  color: black;
}

.poll-results {
  text-align: right;
}

.poll-avg {
  padding: 1em;
}

.poll-set {
  display: flex;
  flex-direction: column;
}

.poll-set .d-flex {
  display: grid !important;
  grid-template-columns: 1fr 3fr;
}

.pollOption1Color {
  background: #0a4fd5;
  color: white;
}

.pollOption2Color {
  background: #d33f0b;
  color: white;
}

.pollOption3Color {
  background: #fbb03b;
  color: white;
}

.answer-poll {
  display: flex;
  gap: 5px;
  justify-content: center;
  flex-wrap: wrap;
}

.answer {
  display: flex;
  flex-direction: row;
  width: 100%;
}

.answer__item {
  background: white;
  border: 1px solid black;
  padding: 0.5rem;
  border-radius: 5px;
  margin: 5px;
  cursor: pointer;
  width: 50%;
  font-size: 0.875rem;
}

/* sharing */
.cta-container {
  background-color: #0a4fd5;
  color: white;
  padding: 2em;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-hdline {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
}

.cta-hdline img {
  width: 4vw;
}

.cta-container p {
  padding: 1rem 0;
  text-align: center;
}

.social-buttons {
  display: flex;
  gap: 10px;
}

.social-buttons .facebook, .social-buttons .twitter {
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50px;
}

.social-buttons .facebook {
  background-image: url("/lib/imgs/social/facebook-circle-mono-black.svg");
}

.social-buttons .twitter {
  background-image: url("/lib/imgs/social/twitter-x-circle-mono-black.svg");
}

.conclusion {
  margin: auto;
}

.conclusion-vote {
  padding-top: 5em;
}

@media (max-width: 1200px) {
  .title-first span {
    font-size: 3.5rem;
  }
}

@media (max-width: 995px) {
  .container {
    padding: 0;
  }

  .header {
    padding-top: 120px;
  }

  .title-first span, .title-second {
    font-size: 3rem;
  }

  .intro {
    flex-direction: column;
    width: 100%;
  }

  .qns-content {
    flex-direction: column;
  }

  .government, .opposition {
    width: 100%;
  }

  .qns-description, .scale-content {
    width: 80%;
    margin: auto;
  }

  #scrollyFuture, #scrollyInfoSources {
    flex-direction: column;
    align-items: center;
  }

  figure,
  .scrollyText {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .view-desktop {
    display: none;
  }

  .view-mobile {
    display: block;
  }

  section {
    width: 100%;
    margin: 0;
  }

  .sidebar {
    max-width: 768px;
    width: 100%;
    top: auto;
    bottom: 0;
  }

  .sidebar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    padding: 0.5em;
    text-align: center;
    justify-content: center;
    height: 10vh;
    overflow: scroll;
  }

  .sidebar li {
    border: 1px solid #0a4fd5;
    border-radius: 20px;
  }

  .sidebar ul li a {
    font-size: 0.75rem;
    padding: 0.5em;
  }

  .sidebar ul li:hover {
    background: inherit;
    color: inherit;
  }

  .sidebar ul li:hover a {
    color: inherit;
  }

  .sidebar ul li.active {
    background: #0a4fd5;
    color: white;
  }

  .sidebar ul li.active a {
    color: white;
  }

  .intro {
    padding: 2em;
  }

  .main-content {
    padding: 5em 0;
  }

  .main-content .row {
    width: 90%;
    margin: auto;
  }

  .description {
    width: 100%;
  }

  #profile {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  #profile .respondent {
    width: 300px;
  }

  #profile .respondent img {
    width: 60px;
  }

  .scale-content .respondents-container {
    width: 350px;
  }

  .respondent img {
    width: 50px;
  }

  h2 {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  .step:last-child {
    margin-bottom: 80vh;
  }

  .header {
    width: 90%;
  }

  .title-first span, .title-second {
    font-size: 2.2rem;
  }

  .title-second {
    padding: 1rem 0 0 0;
  }

  .speech-bubbles {
    gap: 20px;
  }

  .speech-bubble {
    margin: 0;
  }

  .qns-description, .scale-content {
    width: 100%;
  }

  .emoji {
    font-size: 1.5rem;
  }

  .respondents-container, .range-five, .range-ten {
    gap: 0.6em;
    margin: auto;
  }

  /* .d-flex {
    gap: 2em;
  } */

  .d-flex p {
    width: 100%;
  }

  .quotes.scrollable {
    padding: 1em;
  }

  .scrollbar, .scrollbar-menu {
    display: block;
  }

  .quotes-twocol {
    flex-direction: column !important;
  }

  .portraits {
    width: 5%;
  }

  .portraits span {
    text-align: center;
    line-height: 1.2em;
    padding-top: 0.5em;
  }

  .scrollyText {
    padding-top: 250px;
  }

  .quotes {
    gap: 20px;
  }

  #q10 .word-cloud img {
    width: 100%;
  }

  fieldset {
    padding: 20px;
  }

  .answer {
    width: 100%;
    gap: 0.5em;
  }

  .answer__item {
    width: 100%;
    margin: 0 0 5px 0;
  }

  .poll-avg {
    padding: 10px 0;
    font-size: 0.875rem;
  }

  .cta-container {
    padding: 1em;
  }

  .cta-hdline {
    flex-direction: column;
    gap: 0;
  }

  .cta-hdline img {
    width: 10vw;
  }

  .cta-hdline h2 {
    line-height: 3rem;
    text-align: center;
  }
}

@media (min-width: 700px) and (max-width: 768px) {
  #profile {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 280px) and (max-width: 385px) {
  .title-first span, .title-second {
    font-size: 1.8rem;
  }

  #q2 .quotes {
    margin-top: 250px;
  }

  #q8 .quotes {
    margin-top: 500px;
  }
}

@media (max-width: 374px) {
  .scale-content .respondents-container {
    width: 290px;
  }

  .respondent img {
    width: 40px;
  }

  .name, .age {
    font-size: 0.75rem;
  }
}
