/* =====================================================
   FAQ PAGE
===================================================== */

.faq-hero {
  position: relative;
  margin-top: -3px;
  height: 635px;
  overflow: hidden;
  background: url("../images/faq-hero.png") center center / cover no-repeat;
}

.faq-hero-copy {
  position: absolute;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  width: min(700px, calc(100% - 48px));
  text-align: center;
  color: var(--white);
}

.faq-hero-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
}

.faq-hero-divider,
.faq-intro-divider {
  width: 52px;
  height: 2px;
  background: var(--gold);
}

.faq-hero-divider {
  margin: 16px auto 28px;
}

.faq-hero-copy p {
  max-width: 520px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 400;
}

.faq-main {
  padding: 58px 0 64px;
  background: var(--white);
}

.faq-intro {
  width: min(760px, calc(100% - 48px));
  margin: 0 auto;
  text-align: center;
}

.faq-intro h2 {
  margin: 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 600;
  line-height: 1;
}

.faq-intro-divider {
  margin: 14px auto 20px;
}

.faq-intro p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--blue);
  font-size: 18px;
  line-height: 1.45;
}

.faq-control-shell {
  width: min(1430px, calc(100% - 80px));
  margin: 64px auto 0;
}

.faq-category-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.faq-category-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.faq-category-button {
  position: relative;
  display: block;
  width: 100%;
  cursor: pointer;
}

.faq-category-button img {
  display: block;
  width: 100%;
  height: auto;
}

.faq-button-dark {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

#faq-sell:checked ~ .faq-category-buttons .faq-category-button-sell .faq-button-light,
#faq-buy:checked ~ .faq-category-buttons .faq-category-button-buy .faq-button-light,
#faq-value:checked ~ .faq-category-buttons .faq-category-button-value .faq-button-light,
#faq-dd:checked ~ .faq-category-buttons .faq-category-button-dd .faq-button-light,
#faq-finance:checked ~ .faq-category-buttons .faq-category-button-finance .faq-button-light {
  opacity: 0;
  visibility: hidden;
}

#faq-sell:checked ~ .faq-category-buttons .faq-category-button-sell .faq-button-dark,
#faq-buy:checked ~ .faq-category-buttons .faq-category-button-buy .faq-button-dark,
#faq-value:checked ~ .faq-category-buttons .faq-category-button-value .faq-button-dark,
#faq-dd:checked ~ .faq-category-buttons .faq-category-button-dd .faq-button-dark,
#faq-finance:checked ~ .faq-category-buttons .faq-category-button-finance .faq-button-dark {
  opacity: 1;
  visibility: visible;
}

.faq-groups {
  margin-top: 66px;
}

.faq-group {
  display: none;
  border: 1px solid #e3e3e3;
  background: var(--white);
}

#faq-sell:checked ~ .faq-groups .faq-group-sell,
#faq-buy:checked ~ .faq-groups .faq-group-buy,
#faq-value:checked ~ .faq-groups .faq-group-value,
#faq-dd:checked ~ .faq-groups .faq-group-dd,
#faq-finance:checked ~ .faq-groups .faq-group-finance {
  display: block;
}

.faq-group details {
  margin: 0;
  border-bottom: 1px solid #d9d9d9;
}

.faq-group details:last-child {
  border-bottom: 0;
}

.faq-group summary {
  position: relative;
  display: block;
  padding: 26px 76px 26px 58px;
  color: var(--blue);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.faq-group summary::-webkit-details-marker {
  display: none;
}

.faq-group summary::marker {
  content: "";
}

.faq-group summary::after {
  content: "+";
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blue);
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

.faq-group details[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 76px 28px 58px;
}

.faq-answer p {
  max-width: 1180px;
  margin: 0;
  color: var(--blue);
  font-size: 17px;
  line-height: 1.65;
}

.faq-bottom-image {
  width: 100%;
  aspect-ratio: 5 / 1;
  min-height: 220px;
  background: url("../images/faq-bottom-marina.png") center center / cover no-repeat;
}

/* =====================================================
   FAQ RESPONSIVE RULES
===================================================== */

@media (max-width: 1180px) {
  .faq-hero {
    height: 550px;
  }

  .faq-control-shell {
    width: min(1000px, calc(100% - 48px));
  }

  .faq-category-buttons {
    gap: 14px;
  }

  .faq-groups {
    margin-top: 48px;
  }
}

@media (max-width: 900px) {
  .faq-hero {
    height: 470px;
  }

  .faq-hero-copy {
    top: 44px;
  }

  .faq-hero-copy h1 {
    font-size: 48px;
  }

  .faq-hero-copy p,
  .faq-intro p {
    font-size: 16px;
  }

  .faq-main {
    padding: 48px 0 52px;
  }

  .faq-intro h2 {
    font-size: 42px;
  }

  .faq-control-shell {
    margin-top: 48px;
  }

  .faq-category-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .faq-category-button-finance {
    grid-column: 1 / -1;
    width: calc(50% - 8px);
    justify-self: center;
  }

  .faq-group summary {
    padding: 22px 64px 22px 34px;
    font-size: 18px;
  }

  .faq-group summary::after {
    right: 34px;
  }

  .faq-answer {
    padding: 0 64px 24px 34px;
  }

  .faq-answer p {
    font-size: 16px;
  }

  .faq-bottom-image {
    min-height: 190px;
  }
}

@media (max-width: 720px) {
  .faq-hero {
    height: 430px;
    background-position: center center;
  }

  .faq-hero-copy {
    top: 42px;
    width: calc(100% - 40px);
  }

  .faq-hero-copy h1 {
    font-size: 44px;
  }

  .faq-hero-divider {
    margin: 14px auto 22px;
  }

  .faq-hero-copy p {
    max-width: 520px;
    font-size: 15px;
  }

  .faq-intro,
  .faq-control-shell {
    width: calc(100% - 40px);
  }

  .faq-intro h2 {
    font-size: 38px;
  }

  .faq-intro p {
    font-size: 15px;
  }

  .faq-category-buttons {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .faq-category-button,
  .faq-category-button-finance {
    grid-column: auto;
    width: min(100%, 360px);
    justify-self: center;
  }

  .faq-groups {
    margin-top: 38px;
  }

  .faq-group summary {
    padding: 20px 54px 20px 22px;
    font-size: 16px;
  }

  .faq-group summary::after {
    right: 22px;
    font-size: 28px;
  }

  .faq-answer {
    padding: 0 22px 22px;
  }

  .faq-answer p {
    font-size: 15px;
    line-height: 1.6;
  }

  .faq-bottom-image {
    aspect-ratio: 3 / 1;
    min-height: 170px;
  }
}
