/* 
  Google Fonts
   "Sofia Sans Condensed" Black 900
  "Sofia Sans Condensed" SemiBold 600

  font-family: 'Sofia Sans Condensed', sans-serif;

*/

@import url('https://fonts.googleapis.com/css2?family=Sofia+Sans+Condensed:wght@600;900&display=swap');


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;   /* includes padding and border in elements width and height */
}

html {
  font-size: 100%;     /* = 16px */
  max-width: 100%;
  max-width: 100%;
  background-image: url("/image/bg800bulbs.jpg");
  background-size: auto;
}

/* 
  Set view height to 100%, which is necessary for the device to know in order to vertically centre the flexbox image if necessary.
*/

body {
  width: 50vw;
  height: 100%;
  margin: 0 25%;

  background-color: white;

  font-family: 'Sofia Sans Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1rem;
  color: black;
  text-align: left;
}

main, section, footer, p {
  margin: 1rem 0;
}

main, section {
  margin-left: 4%;
  margin-right: 4%;
}

footer {
  background-color:  chocolate;
  color: ghostwhite;
  padding: 1%;
}

footer p {
  margin: 0.25rem 0;
}

h3 {
  font-weight: 900;
  font-size: 1.05rem;
  line-height: 1.2rem;
  text-align: left;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgb(169, 169, 169);
}

.banner {
  margin-left: -4.25%;
}

.banner img {
  width: 50vw;
  height: auto;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem 0;
  
}

.header-bar .logo {
  width: 4%;
  height: auto;
  margin-right: auto;   /* give the right side a share of the remaining space */
}

.nav-item {
  font-size: 0.95rem;
  line-height: 1.1rem;
}

.nav-item ul {
  list-style: none;
}

.nav-item li {
  display: inline-block;
  padding: 0 0.5rem;
}

.nav-item a {
  text-decoration: none;
  color: black;
}

.nav-item a:hover {
  color: darkgrey;
}

.but-goto {
  min-width: 8rem;
  padding: 1%;
  margin: 1.5rem 0;
  border: 1px solid darkgrey;
  border-radius: 2rem;
  background-color: lightgrey;
  color: black;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.7rem;
  line-height: 0.8rem;
}

.but-goto:hover {
  background-color: whitesmoke;
}

.but-container {
  text-align: center;   /* to centre button */
}

.solution {
  margin-bottom: 1.5rem;
  overflow: visible;  /* content renders outside the element box */
}

.solution img {
  float: right;
  width: 32%;
  height: auto;
  margin-left: 1rem;
  border-radius: 0.5rem;
}

.solution p {
  overflow: auto;
}

.solution::after {
  display: block;
  content: "";
  clear: both;  /* clear anything below that is floated to the left and right */
} 

.card {
  display: flex;
  width: 100%;
  margin: 2rem 0;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.15rem;
  background-color: azure;
  border-color: rgb(200, 220, 220);
  border-style: solid;
  border-width: 1px 1px 1px 4px;
}

.card img {
  width: 27%;
  height: min-content;
  margin-right: 1rem;
  order: 1;
}

.card p {
  margin: 0;
  order: 2;
}

.form {
  display: block;
  margin: auto;   /* to centre the form */
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.15rem;
  width: 80%;
  padding: 1rem 2rem;
  background-color: rgb(170, 210, 210);
}

label {
  display: block;
  padding: 0.5rem 0;
  margin-top: 1rem;
}

input, textarea {
  width: 95%;
  padding: 0.5rem 0.25rem;
  border-color: rgb(153, 153, 153);
  border-style: solid;
  border-width: 0 1px 1px 1px;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1rem;
}

textarea {
  height: 10rem;
  resize: vertical;
}

input::placeholder, textarea::placeholder {
  font-size: 0.75rem;
  line-height: 0.95rem;
  color: gray;
  opacity: 0.6;   /* [0-1] opacity is 40% */
}

input[type=submit] {
  display: block;
  margin: auto;
  width: 60%;
  cursor: pointer;
}

input[type=submit]:hover {
  color: darkgrey;
}

.query-type {
  display: flex;
  justify-content: space-around;
  font-size: 0.85rem;
  line-height: 1rem;
  margin: 1rem 0;
}

.query-type .option {
  display: flex;
  white-space: nowrap;
  align-items: center;
  column-gap: 0.5rem;
}

.query-type .option label {
  margin: 0;
  padding: 0;
}



@media (max-width: 712px) {   /* Galaxy Tab S4 and smaller screen */  
  .header-bar .logo {
    width: 15%;
  }

  .nav-item, .card p, .form, input, textarea, .query-type {
    font-size: 0.7rem;
    line-height: 0.8rem;
  }

  input::placeholder, textarea::placeholder {
    font-size: 0.5rem;
    line-height: 0.6rem;
  }

  .form {
    padding: 1rem 1.5rem;
  }

  .nav-item li {
    display: block;
  }

  .solution img {
    display: block;
    float: none;
    margin: auto;
    width: 90%;
  }

  .card {
    display: block;
  }

  .card img {
    display: block;
    float: none;
    margin: auto;
    width: 90%;
    height: auto;
  }

  .card p {
    margin-top: 1rem;
  }

  input, textarea {
    padding: 0.25rem 0.1rem;
  }

  label {
    padding: 0.25rem 0;
    margin-top: 0.5rem;
  }

  .query-type {
    display: block;
    width: 50%;
    margin: auto;
  }

  .query-type :nth-child(1) {
    padding-top: 0.5rem;
  }

  .query-type .option {
    padding-bottom: 0.5rem;
  }

  .query-type .option input {
    width: 2rem;
  }
}

@media (max-width: 320px) { /* Nokia Lumins 520 and smaller screen */
  .header-bar .logo {
    width: 20%;
  }

  .body {
    font-size: 62.5%;   /* 1rem = 10px */
  }
  .nav-item, .card p, .form, input, textarea, .query-type {
    font-size: 0.5rem;
    line-height: 0.6rem;
  }

  input::placeholder, textarea::placeholder {
    font-size: 0.4rem;
    line-height: 0.45rem;
  }

  .nav-item li {
    display: block;
  }

  .form {
    padding: 1rem 1rem;
  }

  .solution img {
    display: block;
    float: none;
    margin: auto;
    width: 90%;
  }

  h3 {
    font-size: 0.8rem;
    line-height: 0.9rem;
  }

  .card {
    display: block;
  }

  .card img {
    display: block;
    float: none;
    margin: auto;
    width: 90%;
    height: auto;
  }

  .card p {
    margin-top: 1rem;
  }

  .but-goto {
    min-width: 5rem;
    font-size: 0.5rem;
    line-height: 0.6rem;
  }

  input, textarea {
    padding: 0.1rem 0.05rem;
  }

  label {
    padding: 0.1rem 0;
    margin-top: 0.25rem;
  }

  .query-type {
    display: block;
    width: 90%;
    margin: auto;
  }

  .query-type :nth-child(1) {
    padding-top: 0.25rem;
  }

  query-type .option {
    padding-bottom: 0.25rem;
  }

  .query-type .option input {
    width: 1rem;
  }
}