/* ---------------- FRONTEND MENTOR PRE-INCLUDED CSS ---------------- */
.attribution { font-size: 11px; text-align: center; color: var(--Primary);}
.attribution a { color: hsl(228, 45%, 44%); margin: 0 !important;}


/* --------------------------------------- */
/* ---------------- FONTS ---------------- */
/* --------------------------------------- */

body {
  overflow-x: hidden;

  font-family: Rubik;
}

h1, h2, h3 {
  font-weight: 600;
}


/* ---------------------------------------- */
/* ---------------- COLORS ---------------- */
/* ---------------------------------------- */
:root {
  --BgShapeOffset: 30%;

  --Secondary: hsl(0, 94%, 66%);
  --Primary: hsl(231, 69%, 60%);
  --PrimaryGrayed: hsl(229, 45%, 60%);
  --Light: hsl(229, 8%, 60%);
  --Dark: hsl(229, 31%, 21%);
}


h1 + p,
h2 + p,
h3 + p,
.card-body,
.tabTitle {
  color: Gray;
}

/* links */
.navLight a {
  color: black;
}

.navDark a,
.modal a {
  color: white;
}

a:hover,
a:focus {
  color: var(--Secondary);
}


/* buttons */
.buttonRed,
.buttonBlue,
.buttonDark {
  color: white !important;
}

.buttonRed {
  background-color: var(--Secondary);
  border-color: var(--Secondary);
}

.buttonBlue {
  background-color: var(--Primary);
  border-color: var(--Primary);
}

.buttonDark {
  border-width: 2px;
  background-color: transparent;
  border-color: white;
}

.buttonWhite {
  color: var(--PrimaryGrayed);
  box-shadow: 0px 2px 5px var(--Light);
}

.buttonRed:hover,
.buttonBlue:hover,
.buttonWhite:hover,
.buttonRed:focus,
.buttonBlue:focus,
.buttonWhite:focus
{
  background-color: white;
}

.buttonRed:hover,
.buttonRed:focus {
  color: var(--Secondary) !important;
}

.buttonBlue:hover,
.buttonBlue:focus {
  color: var(--Primary) !important;
}

.buttonWhite:hover,
.buttonWhite:focus {
  border-color: black;
  color: black;
}

.buttonDark:hover,
.buttonDark:focus {
  color: var(--Secondary) !important;
  border-color: var(--Secondary);
}

/* modal */
.modal div {
  border: transparent;
}

.modal-body > div {
  border-top: 1px solid gray;
}

.modal-footer {
  justify-content: center;
}

/* features */
.tabTitle.active {
  /* override default Bootstrap behaviour */
  border-top: none;
  border-left: none;
  border-right: none;
  border-bottom: 5px solid var(--Secondary) !important;
}

/* faq */
.faqCard {
  border: none;
  border-bottom: 1px solid lightgray;
  border-top: 1px solid lightgray;
}

.faqAnswer {
  background: white;
}

.faqQuestion {
  border: none;
  background: white;
}

.faqQuestion:hover,
.faqQuestion:focus {
  color: var(--Secondary);
}

/* download */
.downloadCard {
  border-radius: 1em;
  border: none;
  box-shadow: 0px 2px 5px lightgray;
}

/* footer */
footer {
  color: white;
}

.footerTop {
  background: var(--Primary);
}

#emailInput {
  border: 3px solid transparent;
  border-radius: 5px;

  transition: 0.2s;
}

.was-validated #emailInput:invalid {
  border-color: var(--Secondary) !important;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: none;

  background-image: url("../images/icon-error.svg") !important;
}

.errorMessage {
  background-color: var(--Secondary);
  border: 1px solid var(--Secondary);

  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;

  color: white;
}

#emailInput:hover,
#emailInput:focus {
  border-color: var(--Dark);
}

.navDark {
  background: var(--Dark);
  color: white;
}



/* ---------------------------------------- */
/* ---------------- IMAGES ---------------- */
/* ---------------------------------------- */
.illustration {
  max-width: 100%;
}

.logo {
  width: 5em;
}

/* svg */
.fillWhite {
  fill: white;
}

.fillPrimary {
  fill: var(--Primary);
}

.fillDark {
  fill: var(--Dark);
}


/* FAQ interactive buttons */
.faqQuestion img {
  transition: 0.5s;
}

.faqQuestion[aria-expanded="true"] img {
  filter: hue-rotate(-231deg);
  transform: rotate(180deg);
}

button:hover path,
a:hover path,
button:focus path,
a:focus path {
  fill: var(--Secondary);
}

/* background shapes */

.containsBg {
  /* so we can pick the position of its children relative to it */
  position: relative;
}

.containsBg::after {
  content: "";

  width: 200%;
  height: 80%;
  border-radius: 250px 250px 250px 250px;
  background: var(--Primary);

  z-index: -99; /* so it's in the back */
  position: absolute;
  bottom: 0;
}

.bgRight::after {
  left: var(--BgShapeOffset);
}

.bgLeft::after {
  right: var(--BgShapeOffset);
}

/* --------------------------------------------- */
/* ---------------- POSITIONING ---------------- */
/* --------------------------------------------- */

@media (max-width:768px) { /* <=> md breakpoint */
  body {
    text-align: center;
  }
}

a:hover {
  text-decoration: none;
}

a {
  margin: 1em !important;
}

/* Navbar */
nav a {
  text-transform: uppercase;
}

/* Modal nav */
.modal {
  text-align: center;
  text-transform: uppercase;
}

.modal-content {
  background: transparent;
}

.modal-body > div {
  padding: 1em;
}

/* Section titles */
.sectionTitle {
  width: 50%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 5em;
  margin-top: 5em;
  text-align: center;
}

/* Feature tabs */
.tabPanel {
  padding: 3em;
}

@media (max-width:768px) { /* <=> md breakpoint */
  #tabFeaturesContent .btn {
    display: none;
  }
}

/* Download cards */
.downloadCard {
  text-align: center;

  padding-bottom: 2em;
  padding-left: 0;
  padding-right: 0;
  margin: 1em;
}

.logo {
  margin-top: 2em;
  margin-bottom: 2em;
}

.dottedLine {
  height: 1em;
  width: 100%;
  background: url("../images/bg-dots.svg") no-repeat center/contain;
  margin-bottom: 1em;
}

#card2 {
  position: relative;
  top: 3em;
}

#card3 {
  position: relative;
  top: 6em;
}


/* FAQ */

#faqTitle::before {
  /* to correct position after relative displacement */
  content: "";
  display: block;
  height: 6em;
}

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

.faqCard {
  width: 50%;
}

@media (max-width:768px) { /* <=> md breakpoint */
  .faqCard {
    width: 90%;
  }
}

.faqQuestion {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faqAnswer {
  text-align: left;
}



/* Footer */
footer {
  margin: 0;
  padding: 0;
}

.footerTop {
  /* TODO: find out why this top padding is necessary to take into account the child's top margin */
  padding-top: 1px;
  padding-bottom: 3em;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Contact us form */
.emailInputContainer {
  /* display: inline-block; */
  position: relative;
  /* z-index: 2; */
}

/* error message when invalid email */
.errorMessage {
  margin-top: 0; /* override Bootstrap */
  padding: 2px;
  padding-left: 1em;

  font-size: 0.5em;
  text-align: start;
  font-style: italic;
  font-weight: bold;
  vertical-align: bottom;
}


.footerBottom {
  padding-left: 5em;
  padding-right: 5em;
}

.socialMediaContainer {
  display: flex;
  justify-content: flex-end;
}

@media (max-width:768px) { /* <=> md breakpoint */
  .footerBottom {
    padding-left: 0;
    padding-right: 0;
    padding-top: 1.5em;
    padding-bottom: 1.5em;
  }

  .footerBottom div {
    display: flex;
    justify-content: center;
  }
}


/* -------------------------------------------- */
/* ---------------- ANIMATIONS ---------------- */
/* -------------------------------------------- */

.downloadCard:hover {
  animation: pulse;
  animation-duration: 1s;
}
