@charset "utf-8";

/* 3) background color of the browser window */
html {
  background-image: url("grass.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

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


/* 5) header section */
header {
  text-align: center;
  padding: 20px;
}

/* 6) h2 size */
h2 {
  font-size: 1.3em;
  text-shadow: 4px 6px 5px gray;
  margin-top: 30px;
}

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



/* 7) nav section */
/*
nav {
  background-color: hsl(120, 25%, 28%);
  padding: 15px;
  text-align: center;
}
*/

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

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

nav::after {
  content: "";
  display: block;
  clear: both;
}



/* 8) nav links */
nav a {
  display: block;
  background-color: hsl(120, 25%, 28%);
  line-height: 2.8em;
  text-decoration: none;
  text-align: center;
  color: rgb(240, 240, 240);

  transition:
    background-color 0.5s ease-in 0.2s,
    color 0.5s ease-in 0.2s,
    font-size 1s ease;
}


/* 9) hover effect */
nav a:hover {
  background-color: hsl(120, 30%, 35%);
  color: rgb(255, 255, 255);
  font-size: 1.2em;
}


/* 10) main padding */
main {
  padding: 20px;
  margin-top: 10px;
}


/* 11) images inside main */
main > img {
  width: 25%;
  padding: 25px;
  float: right;
}


/* header image */
header img {
  width: 100%;
  padding: 0;
  display: block;
}


/* 12) footer */
body > footer {
  background-color: hsl(120, 25%, 28%);
  color: rgba(255, 255, 255, 0.85);
  font-weight: bold;
  font-size: 0.9em;
  line-height: 3em;
  text-align: center;
  margin-top: 10px;
  padding: 10px;
  clear: both;
}

/* Gallery layout */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 20px 0;
  padding: 15px;
  margin-bottom: 40px;
}

.gallery img {
  flex: 0 0 calc(25% - 15px);  /* 4 columns */
  max-width: calc(25% - 15px);
  height: 220px;              
  object-fit: cover;           
  display: block;
  border-radius: 10px;
}



@media only 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;
}

  .gallery img {
    flex: 0 0 calc(50% - 15px);   /* 2 columns */
    max-width: calc(50% - 15px);
  }

  .home-columns {
    flex-direction: column;
  }

  /* Step 10b - Mobile form layout */
  form {
    width: 100%;
    font-size: large;
  }

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

  input,
  select,
  textarea {
    position: static !important;
    display: block;
    height: 50px;
    padding: 5px;
    width: 90%;
    margin-bottom: 10px;
  }

  label {
    position: static !important;
    display: block;
    height: auto;
    width: 90%;
    margin-bottom: 5px;
  }

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

}


@media only screen and (min-width: 769px) {

}

@media only screen and (max-width: 480px) {
  .gallery img {
    flex: 0 0 100%;     /* 1 column */
    max-width: 100%;
  }
}



/* Family table styling */

.family-table {
  width: 100%;                
  border-collapse: collapse;
  background-color: white;    
}

.family-table th,
.family-table td {
  border: 2px solid #333;      
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.family-table thead th {
  background-color: hsl(210, 30%, 85%);
}

.family-table tfoot td {
  background-color: hsl(210, 30%, 85%);
  text-align: center;
}

.family-table {
  margin-top: 15px;
}

.family-table caption {
  font-weight: bold;
  padding: 8px 0;
}


/* Responsive table */

@media only screen and (max-width: 768px) {

  .family-table,
  .family-table tbody,
  .family-table tr,
  .family-table td,
  .family-table th {
    display: block;
  }

  .family-table thead,
  .family-table tfoot {
    display: none;
  }

  .family-table tbody td {
    position: relative;
    padding-left: 40%;
    border: none;
    border-bottom: 1px solid #333;
  }

  .family-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
    width: 40%;
    font-weight: bold;
  }
}

/* Focus style */
input:focus,
select:focus,
textarea:focus {
  background-color: #ffffcc;
  border: 2px solid #333;
}

/* Valid and Invalid response */

input:valid,
select:valid,
textarea:valid {
  background-color: #e6ffe6;
}

input:invalid,
select:invalid,
textarea:invalid {
  background-color: #ffe6e6;
}

/* Desktop form layout */
form {
  width: 90%;
}

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

/* Input and select styling (desktop) */
input,
select {
  display: block;
  position: relative;
  left: 30%;
  padding: 5px;
  height: auto;
  width: 60%;
}

/* Label styling (desktop) */
label {
  display: block;
  position: absolute;
  padding: 5px;
  width: 30%;
}

/* Radio inputs (desktop) */
input[type="radio"] {
  display: inline;
  position: inherit;
  left: 0;
  width: auto;
}

/* Labels for radio options */
label.radio {
  display: inline;
  position: inherit;
}

/* Submit and Reset buttons (desktop) */
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;
}

/* Make text area align with inputs on desktop */
textarea {
  display: block;
  position: relative;
  left: 30%;
  padding: 5px;
  width: 60%;
  height: auto;
}


input,
select,
textarea {
  margin-bottom: 10px;
}


/* Home page two-column layout */
.home-columns {
  display: flex;
  gap: 40px;
  margin: 30px 0;
}

.home-columns div {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.85);
  padding: 20px;
  border-radius: 8px;
}

/* Center content inside home columns */
.home-columns {
  text-align: center;
}

.home-columns ul {
  list-style-position: inside;
  padding-left: 0;
}

main h3 {
  text-align: center;
}

/* Video wrapper for embedded video */
.video-wrapper {
  max-width: 850px;
  margin: 30px auto;
}

.video-wrapper iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  display: block;
}

/* Center home page heading and text */
main h2 {
  text-align: center;
}

main > p {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto 20px auto;
}

/* Services page content width control */
main ul,
main ol {
  max-width: 800px;
  margin: 0 auto 20px auto;
}

main h3 {
  text-align: center;
}

/* Center Services page lists */
main ul,
main ol {
  list-style-position: inside;
  text-align: center;
  padding-left: 0;
}

/* more spacing on Services page */
main h2 {
  margin-top: 30px;
  margin-bottom: 15px;
}

main h3 {
  margin-top: 40px;
  margin-bottom: 15px;
}

main p {
  margin-bottom: 25px;
}