/* import google fonts*/
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;1,100;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato&display=swap');

/* resets styling attributes */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* padding and border are included in the width and height*/
}

/* added variable for colours */
:root {
  --color-text: #58595b;
  --color-text-secondary: #fffefc;
  --color-text-button: #000000;
  --color-background-secondary: #ffe9ca;
  --color-background-primary: #4f7987;
  --color-background-button: #697d96;
}

/* Set the main body attributes with colours, font and min height*/
body {
  background-color: var(--color-text-secondary);
  color: var(--color-text);
  font-family: 'Roboto', sans-serif;
  min-height: 100vh;
}

/* image tag is set to 100% of the element*/
img {
  max-width: 100%;
}

/*header styling*/
h1,
h2,
h3,
h4 {
  text-align: center;
  margin: 0;
}

/* Set h1 colour */
h1 {
  color: var(--color-text-secondary);
}

/* general styling*/

/* Styling for links- remove underline */

.background-section {
  font-family: 'lato', sans-serif;
  color: var(--color-text-secondary);
  background-color: var(--color-background-primary);
  font-style: italic;
  padding: 10px 15px;
  text-align: center;
}

/* Styling for sub titles in index, thebarn and the area */
.titles {
  font-family: 'lato', sans-serif;
  color: var(--color-text-secondary);
  padding-bottom: 0.5em;
  padding-top: 0.5em;
}

/*The barn & the area General styling section */

/* sets 75% width, center and some padding to the bottom*/
.intro-text {
  max-width: 75%;
  text-align: justify;
  margin: 0 auto;
  padding-bottom: 2em;
}

/*CALL TO ACTION BUTTON Styling*/

/* centers text in the button*/
.cta-button-wrapper {
  display: block;
  text-align: center;
  margin-top: 1em;
  margin-bottom: 1em;
}

/*Call to action button Styling - positioning, rounded corners, shadow and color styling*/
.cta-button {
  border-radius: 1em;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
  background-color: var(--color-background-secondary);
  color: var(--color-text-button);
  padding: 0.4em;
  text-decoration: none;
}

/* Change the color of links on hover */
.cta-button:hover {
  background-color: var(--color-text-secondary);
  color: var(--color-text-button);
}

/* Styling for sub-header in header  */
.sub-header {
  text-transform: capitalize;
  font-style: italic;
  font-weight: lighter;
  font-family: 'lato', sans-serif;
  color: var(--color-text-secondary);
}

/* Styling for background-header in header */
.background-header {
  background-color: var(--color-background-primary);
  color: var(--color-text-secondary);

  padding: 2em;
  margin-bottom: 1em;
  border-bottom: 4px solid var(--color-background-secondary);
  text-transform: uppercase;
}

.background-header a {
  text-decoration: none;
}

/*Navigation styles*/

/* to keep the navbar at the top when the user scrolls down
i used this tutorial Sticky navbar [Sticky navbar](https://www.w3schools.com/howto/howto_css_sticky_element.asp)*/

.navbar {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 1;
  color: var(--color-background-primary);

}

/* the page on the user is on. name on page pn the navbar is bold */
.selected {
  font-weight: bold;
}

/* change text to ,center, hortizonal and remove bullets*/
.navbar ul {
  display: flex;
  margin: 0;
  justify-content: center;
  text-align: center;
  list-style-type: none;
  padding: 15px 5px;
  margin-bottom: 30px;
  border-top: 1px solid var(--color-background-primary);
  border-bottom: 1px solid var(--color-background-primary);

}

.navbar a {
  /* added space between links, changes text to uppercase and remove underline*/
  display: inline-block;
  padding: 1em 1.5em !important;
  text-decoration: none;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-background-primary);
}

/* Change the color of links on hover */
.navbar a:hover {
  border-top: 2px solid var(--color-background-secondary);
}

.navbar a:active {
  color: var(--color-background-primary);
}

/* Footer */
footer {
  background-color: var(--color-background-primary);
  color: var(--color-text-secondary);
  border-top: 4px solid var(--color-background-secondary);
  margin-top: 1em;
}

/* i used this website as a tutorial for flex https://css-tricks.com/snippets/css/a-guide-to-flexbox/*/
.ft-container {
  flex: 1;
}

.ft-main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 1.2em 0em;
  justify-content: center;
}

/* center icons horziontal */
.ft-social {
  display: flex;
  justify-content: center;
}

/*Centers each element - social icons, address and contact details on footer*/
.ft-content {
  margin: 0 auto;
}

/* removed underline from the link and color attributed*/
.ft-content a {
  color: var(--color-text-secondary);
  text-decoration: none
}

/* removes bullet on list and some styling*/
.ft-social li {
  margin-right: 2rem;
  list-style-type: none;
  color: var(--color-text-secondary);
}

/* removed underline from the link, increase size of font/icon and color attributed*/
.ft-social li a {
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 2em;
}

/* Change the color of links on hover and increase in size */
.ft-main li a i:hover {
  color: var(--color-background-secondary);
  transform: scale(1.5);
}

.ft-main li a i:active {
  color: var(--color-background-secondary);
  transform: scale(2);
}


/*HOME PAGE - styling for hero image  

Fixed image to full frame, 100% width with some padding*/
.hero {
  background-image: url(../images/heroimage1.jpg);
  text-align: center;
  padding: 30vh 0;
  background-attachment: fixed;
  background-size: cover;
  max-width: 100%;
  margin: 2.25rem;
}

/*BARN PAGE STYLING*/
/* hero image only shown once, centered, with some padding to the top and bottom*/
.barn-hero {
  background-image: url(../images/church-barn.JPG);
  background-repeat: no-repeat;
  padding: 30vh 0;
  background-position: center;
}

/* Explore the barn -styling*/
.barn-explore-title {
  text-align: center;
  font-style: italic;
  margin-bottom: 1em;
  color: var(--color-text-secondary);
}

/* i used this website to learn about grid layout ](https://css-tricks.com/snippets/css/complete-guide-grid/)*/
/* 4 columns with a gap in between*/
.grid-wrapper-barnfeatures {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr;
  gap: 2em;
  grid-template-areas:
    "barn-feature1 barn-feature2 barn-feature3 barn-feature4"
}

/* Styyling about header with colour change and padding*/
.background-feature-section {
  background: var(--color-background-primary);
  padding: 1em 1em;
  margin: 2em 20em;
}

/* styling to the barn features -aligns the text left, removes bullets, change background colour and a little padding*/
.barn-feature-list {
  text-align: left;
  list-style-type: none;
  background: var(--color-text-secondary);
  padding: 1em;

}

/* for the barn Main section photos and text using grid -layout - 3 columns with a gap and some padding */
.grid-wrapper-barn {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 2em;
  padding-top: 2em;
  grid-template-areas:
    "lcontent1 rcontent1 lcontent2 "
    "rcontent2 lcontent3 rcontent3 "
}

/* centers in the images in the grid with height and width */
.grid-images {
  text-align: center;
  height: 15em;
  width: 30em;
  margin: 0 auto;
}

.p a {
  text-decoration: none;
  list-style-type: none;
  color: var(--color-background-primary);
}

/*styling for the text below the images of thebarn*/
.grid-text {
  color: var(--color-text-secondary);
  font-style: normal;
}

/*THE AREA PAGE*/

/* You tube Video -i used the code from this you tube video https://www.youtube.com/watch?v=9YffrCViTVk) */

.iframecontainer {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  margin-bottom: 2em;
}

.iframecontainer iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%
}

.videocontainer {
  position: relative;
  padding-bottom: 45%;
  padding-top: 30px;
  height: 0;
  overflow: hidden;
  margin-left: 15%;
  margin-right: 15%;
  margin-bottom: 10%;
}

.videocontainer video,
.videocontainer object,
.videocontainer embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Styling for the 4 places to go on area page using grid system - 4 column and 2 rows
this is to center it. the 1st and 4th column are blank so we use 2 and 3*/
.grid-wrapper-thearea {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-top: 2em;
  gap: 1em;
  grid-template-areas:
    ". lcontent1 rcontent1 ."
    ". lcontent2 rcontent2 ."
}

/* remove underline and change text colour*/
.thearea-links a {
  text-decoration: none;
  color: var(--color-text-secondary);
}

/*remove bullet from list*/
.thearea-links li {
  list-style-type: none;
}

/* changes the size of the icons on the area page and color*/
.thearea-icons {
  font-size: 10rem;
  color: var(--color-text-secondary);
}

/* Change the color of links on hover */
.thearea-links a:hover {
  background-color: var(--color-background-secondary);
  color: var(--color-background-primary);
}

/*Defines the grid template by referencing the names of the grid areas which are specified with the grid-area property above in barn features*/
div.barn-feature1 {
  grid-area: barn-feature1;
}

div.barn-feature2 {
  grid-area: barn-feature2;
}

div.barn-feature3 {
  grid-area: barn-feature3;
}

div.barn-feature4 {
  grid-area: barn-feature4;
}

div.lcontent1 {
  grid-area: lcontent1;
}

div.rcontent1 {
  grid-area: rcontent1;
}

div.lcontent2 {
  grid-area: lcontent2;
}

div.rcontent2 {
  grid-area: rcontent2;
}

div.lcontent3 {
  grid-area: lcontent3;
}

div.rcontent3 {
  grid-area: rcontent3;
}

/* CONTACT US FORM */

.contactus-text {
  padding: 1em;
}

/* Style inputs, select elements and textareas */
input[type=text],
input[type=email],
input[type=tel],
input[type=number],
input[type=date],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  resize: vertical;
  color: var(--color-text);
  margin-bottom: 10px;
}

/* Style the label to display next to the inputs */
label {
  padding: 12px 12px 12px 0;
  display: inline-block;
}

/* Style the submit button */
input[type=submit],
input[type=reset] {
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.2);
  background-color: var(--color-background-button);
  color: var(--color-text-secondary);
  padding: 12px 20px;
  margin-right: 10px;
  margin-bottom: 5px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
}

/* align the buttons within the container */
.btn-group {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Style the container of the enquiry form*/
/* I used the following tutorial for the Responsive Contact us form ( https://www.w3schools.com/howto/howto_css_responsive_form.asp)*/
.contact-wrapper {
  box-shadow: 0 0 20px var(--color-text);
  box-sizing: border-box;
  padding: 20px;
  background-color: var(--color-background-primary);
  color: var(--color-text-secondary);
  border-radius: 5px;
  width: 40%;
  margin: 0 auto;
}

/* column for labels: 25% width */
.col-25 {
  float: left;
  width: 25%;
  margin-top: 6px;
}

/* column for inputs: 75% width */
.col-75 {
  float: left;
  width: 75%;
  margin-top: 6px;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* change colours when user hovers over button*/
input[type=reset]:hover {
  background-color: var(--color-text-secondary);
  color: var(--color-background-button)
}

/* change colours when user hovers over button*/
input[type=submit]:hover {
  background-color: var(--color-text-secondary);
  color: var(--color-background-button)
}

/*SUBMIT FORM*/
/* logo padding for submit form */
.logo {
  display: block;
  margin: 4em auto;
  width: 50%;
}

.submit-form-container {
  position: relative;
  vertical-align: text-top;

}

/* Centered text */
.submit-form-center {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 90%;
  color: black;
}

/*Media Queries */
/* For Large screen sizes with a  1600px wide and down */
@media only screen and (max-width: 1600px) {
  .background-feature-section {
    margin: 2em 6em;
  }
}

/*Media Queries */
/* For large screen sizes from 1300px wide and down */

@media only screen and (max-width: 1300px) {
  .contact-wrapper {
    width: 60%;
  }

  .logo {
    margin: 3em auto;
  }
}

/*Media Queries */
/* For medium screen sizes from 1200px wide and down */
@media only screen and (max-width: 1200px) {
 
  
   .cta-button {
    left: 0em;
    bottom: 0em;
  }

  .background-section-dark {
    margin: 2em 5em;
  }

  /* changes the grid from 4 columns to 2*/
  .grid-wrapper-barnfeatures {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
      "barn-feature1 barn-feature2"
      "barn-feature3 barn-feature4"
  }

  .background-feature-section {
    margin: 2em 1em;
  }

  /* changes the grid from 4 columns to 2*/
  .grid-wrapper-barn {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "lcontent1 rcontent1"
      "lcontent2 rcontent2"
      "lcontent3 rcontent3"
  }

  /* changes the grid from 4 columns to 2*/
  .grid-wrapper-thearea {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "lcontent1 rcontent1"
      "lcontent2 rcontent2"
  }
}

/*Media Queries */
/* For medium screen sizes from 900px wide and down */
@media only screen and (max-width: 900px) {
 
  .ft-main {
    justify-content: space-around;
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  /* reduce font size*/
  .ft-social li a {
    font-size: 1em;
  }

  .ft-content {
    padding-bottom: 15px;
  }

  .navbar a {
    padding: 0px 1em !important;
  }

  /* changes the grid from 2 columns to 1*/
  .grid-wrapper-barn {
    grid-template-columns: repeat(1, 1fr);
    grid-template-areas:
      "lcontent1"
      "rcontent1"
      "lcontent2"
      "rcontent2"
      "lcontent3"
      "rcontent3"
  }

  /* changes the grid from 2 columns to 1*/
  .grid-wrapper-thearea {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "lcontent1 rcontent1"
      "lcontent2 rcontent2"
  }

  /*contact us form change attribute to 100% width*/
  .col-25,
  .col-75,
  input[type=submit] {
    width: 100%;
    margin-top: 0;
  }

  /*width of the contact form on the page set to 90%*/
  .contact-wrapper {
    width: 90%;

  }

  /*styling for the buttons*/
  input[type=submit],
  input[type=reset] {
    width: auto;
    padding: 12px 20px;
    margin-right: 0px;
  }


}

/*Media Queries */
/* For small screen sizes from 640px wide and down */
@media only screen and (max-width: 640px) {
  

  .main-head {
    font-size: 0.75rem;
  }

  .background-section-dark {
    margin: 1em 1em;
  }

  .navbar a {
    padding: 0em 0.5em !important;
  }

  /* Barn features -grid layout from 2 colums to 1*/
  .grid-wrapper-barnfeatures {
    grid-template-columns: repeat(1, 1fr);
    grid-template-areas:
      "barn-feature1"
      "barn-feature2"
      "barn-feature3"
      "barn-feature4"
  }

  /* The area grid layout from 2 colums to 1*/
  .grid-wrapper-thearea {
    grid-template-columns: repeat(1, 1fr);
    grid-template-areas:
      "lcontent1"
      "rcontent1"
      "lcontent2"
      "rcontent2"
  }
}
  /*Media Queries */
  /* For small screen sizes from 400px wide and down */
  @media only screen and (max-width: 400px) {

    /*change width from 30 to 20em */
    .grid-images {
      width: 20em;
    }

    /*reduce font-size of navbar to ensure it shows on small devices*/
    .navbar {
      font-size: 70%;
    }
    
     
  }
 