@charset "utf-8";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: rgb(238, 242, 245);
}

body {
  font-family: Verdana, Geneva, sans-serif;
  background-color: ivory;
  color: rgb(91, 91, 91);
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

header img {
  width: 100%;
  display: block;
}

header h1 {
  text-align: center;
  padding: 20px;
}

h1, h2, h3 {
  text-shadow: 4px 6px 5px gray;
}

nav {
  clear: both;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  display: block;
  width: 33.333%;
  float: left;
}

nav a {
  display: block;
  background-color: #444;
  color: white;
  text-align: center;
  line-height: 2.8em;
  text-decoration: none;
  transition:
    background-color 0.5s ease-in 0.2s,
    color 0.5s ease-in 0.2s,
    font-size 1s ease;
}

nav a:hover {
  background-color: #ccc;
  color: black;
  font-size: 1.2em;
}

nav a.active {
  background-color: #222;
}

main {
  padding: 20px;
  margin-top: 70px;
}

main > img {
  width: 25%;
  float: right;
  margin: 10px;
}

.clear {
  clear: both;
}

.small {
  font-size: 0.95em;
  line-height: 1.5em;
}

.two-col {
  margin-top: 15px;
  overflow: hidden;
}

.two-col .card {
  width: 48%;
  float: left;
  margin-bottom: 15px;
}

.two-col .card:first-child {
  margin-right: 4%;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.gallery img {
  width: 23%;
  height: 200px;
  object-fit: cover;
}

.video-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin-top: 10px;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Table */
.pricing {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.pricing th, .pricing td {
  border: 1px solid #444;
  padding: 10px;
  text-align: left;
}

.pricing thead {
  background-color: #444;
  color: white;
}

.pricing tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

.pricing tfoot {
  background-color: #ddd;
  font-weight: bold;
  text-align: center;
}

/* Form focus + valid/invalid like Assignment 6 */
input:focus, select:focus, textarea:focus {
  background-color: rgb(255, 255, 210);
  outline: 2px solid #444;
}

input:valid, select:valid, textarea:valid {
  border: 2px solid green;
}

input:invalid, select:invalid, textarea:invalid {
  border: 2px solid red;
}

form {
  width: 90%;
}

fieldset {
  width: 90%;
  padding: 5px;
  margin-right: 10px;
  margin-bottom: 10px;
  position: relative;
}

input, select, textarea {
  display: block;
  position: relative;
  left: 30%;
  padding: 5px;
  height: auto;
  width: 60%;
  margin-bottom: 10px;
}

label {
  display: block;
  position: absolute;
  padding: 5px;
  width: 30%;
}

input[type="submit"], input[type="reset"] {
  display: block;
  float: left;
  left: 0;
  text-align: center;
  width: 40%;
  padding: 10px;
  margin-left: 5%;
  margin-right: 5%;
  margin-bottom: 10px;
}

footer {
  background-color: #888888;
  color: rgba(80, 80, 80, 0.6);
  font-weight: bold;
  font-size: 0.9em;
  text-align: center;
  line-height: 3em;
  margin-top: 10px;
  padding: 10px;
  clear: both;
}

/* Mobile */
@media screen and (max-width: 768px) {
  body {
    width: 100%;
    margin: 0;
  }

  nav li {
    float: none;
    width: 100%;
    font-size: x-large;
  }

  nav a {
    border-bottom: 1px solid black;
  }

  main > img {
    width: 90%;
    float: none;
    margin: 0 auto;
    display: block;
  }

  .gallery img {
    width: 48%;
    height: 200px;
    object-fit: cover;
  }

  .two-col .card {
    width: 100%;
    float: none;
    margin-right: 0;
  }

  form {
    width: 100%;
    font-size: large;
  }

  fieldset {
    width: 100%;
    padding: 5px;
    margin: 0;
  }

  input, select, textarea {
    position: inherit;
    display: block;
    height: 50px;
    padding: 5px;
    width: 90%;
    margin-bottom: 10px;
    left: 0;
  }

  label {
    position: inherit;
    display: block;
    height: 50px;
    width: 90%;
    padding: 5px;
  }

  input[type="submit"], input[type="reset"] {
    float: none;
    width: 90%;
    margin: 10px;
    font-size: 1.2em;
  }
}

@media screen and (max-width: 480px) {
  .gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
}