html {
  height: 100%;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  color: #333;  
  box-sizing: border-box;
  scroll-behavior: smooth;
  animation: fadeIn 1.3s ease-in-out;

}


@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  background-image: url("images/new-white-bg.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  min-height: 100vh;
}

nav {
    background-color: #2E81DF;
    padding-left: 7px ;
    padding-right: 9px;
    display: flex;
    justify-content: space-between;
    border-radius: 10px;
    margin-top: 20px;
}




nav a {
    text-decoration: none;
    font-size: 20px;
    margin: 0 20px;
    color: white;
    padding: 10px;
}

nav a:hover {
    text-decoration: underline;
    color: black;
}

.news{
  border-left: 2px solid black;
  padding-left: 10px;
  margin-left: 15px;
  margin-top: 20px;
  color: #141313;

}

.message_news h2{
  font-family: cursive;
  font-size: 30px;
  font-weight: 100;
  color: white;
}

.container {
   
    padding: 50px;
    padding-top: 25px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-top: 20px;
    border-bottom: 0px;
  }

  .upper-flex-container{
    padding: 50px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-top: 0px;
    background-color: rgba(255, 255, 255, 0.768);
  }


  .upper-flex{
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}


  
  .sermon{
    border-radius: 5px;
    margin-top: 10px;
    flex: 1 1 48%;
    max-width: 45%;
    height: 470px;
}

  .sermon-image{
    width: 100%;
    height: 350px;
}



  .sermon-image img{
    width: 100%;
    height: 400px;
    border-radius: 10px;
}

  

  .other-posts{
    flex: 1 1 48%;
    max-width: 48%;
}
 

  .other-posts-flex{
    display: grid;
    grid-template-rows: repeat(3, 170px);
    gap: 10px;
}
  

  .first-row, .second-row, .third-row{
    display: flex;
    justify-content: space-between;
}

.details {
  flex: 1;
  padding-right: 10px;
}

.first-row-image img, .second-row-image img, .third-row-image img{
  height: 172px;
  width: 250px;
  border-radius: 5px;
  transition: transform 0.3s ease-in-out;
}

.first-row-image img:hover{
    transform: scale(1.1);
    cursor: pointer;
}


.second-row-image img:hover{
  transition: translateY(-0.4%);
    transform: scale(1.1);
    cursor: pointer;
}

.third-row-image img:hover{
  transition: translateY(-0.4%);
    transform: scale(1.1);
    cursor: pointer;
}


  .lower-container{
    padding: 50px;
    border: 1px solid #ccc;
    border-radius: 20px;
    margin-top: 50px;
    
  }

  .latest-news{
    border-left: 2px solid black;
    padding-left: 5px;
  }

  .lower-flex{
    display: flex;
    flex-direction: column ;
    
  }

  .lower-flex1{
    display: grid;
    flex: 50%;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 15px;
    border-radius: 5px;
    margin-bottom: 50px;
  }

  .lower-flex1-grid1{
    border-radius: 5px;
    margin-bottom: 20px;

  }
  .lower-flex1-grid1 p{
    position: relative;
    top: 8;
  }



  .lower-flex1-img img{
    height: 300px;
    width: 360px;
    border-radius: 5px;
    z-index: -2;
    transition: transform 0.3s ease-in-out;

  }

  .lower-flex1-img img:hover{
    transform: scale(1.1);
    cursor: pointer;
  }

.upcoming-events h2{
    border-left: 2px solid black;
    padding-left: 5px;
    
  }

  .lower-flex2{
    flex: 50%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-gap: 5px;
    border-radius: 5px;
    border-left: 0;
  }

  
  .lower-flex2-grid1{
    border-radius: 5px;
    margin-bottom: 20px;

  }

  .lower-flex2-img img{
    height: 220px;
    width: 300px;
    border-radius: 5px;
  }


.back-to-top{
  float: right;
  padding-right: 10px;
}

.back-to-top p{
  font-size: 14px;
  margin-bottom: 9px;
}

.back-to-top a{
  color: rgb(37, 17, 188);
}

  footer {
    text-align: center;
    margin-top: 20px;
    color: #171414;
    font-size: 13px;
}



 @media (max-width: 480px) {

  .upper-flex-container {
    padding-left: 10px;
    padding-right: 10px;
  }

 
  nav {
      flex-direction: column;
      align-items: center;
  }

  nav a {
      margin: 5px 0;
      font-size: 20px;
  }


  
.message_news h2{
  font-family: cursive;
  font-size: 25px;
  font-weight:bolder;
}

 

  .sermon{
    margin-bottom: 10px;
    max-width: 80%;
    width: 200px;
  }

  .sermon-image{
    width: 100%;
    height: 450px;
}
  .sermon-image img {
      height: auto;
      width: 100%;
  }

  .first-row-image img{
    width: 100%;
    height: 100%;
}

.first-row{
  margin-bottom: 80px;
  flex-direction: column; 

}

.second-row{
  margin-bottom: 80px;
  flex-direction: column;
}

.third-row{
  margin-bottom: 80px;
  flex-direction: column;

}

.second-row-image img{
  width: 100%;
  height: 100%;
}

.third-row-image img {
  width: 100%;
  height: 180px;
}
.upper-flex{
  align-items: center;
  flex-direction: column; 
  gap: 20px;
  width: 250px;
}

.other-posts{
  flex: 1 1 48%;
  max-width: 80%;
}
.other-posts-flex{
  grid-template-rows: none;
  grid-template-columns: 1fr; 
  gap: 10px; 
}

.lower-container{
  padding-left: 10px;
  padding-right: 10px;
}
.lower-flex1-grid1{
  margin-bottom: 60px;
}

.lower-flex1-grid2{
  margin-bottom: 60px;
}


.lower-flex1-img p{
  font-size: 13px;
}

.lower-flex2-grid1{
  margin-bottom: 60px;
}



  .lower-flex1-img img {
    width: 100%;
    height: 180px;
}

.lower-flex2-img p{
  font-size: 13px;
}

.latest-news h2{
  font-size: 16px;
}
.upcoming-events h2{
  font-size: 16px;

}

  .lower-flex2 {
      grid-template-columns: 1fr;
  }

  .lower-flex1 {
      grid-template-columns: 1fr;
  }

  footer p{
    font-size: 13px;
  }
}


@media (max-width: 768px) {

  
  nav {
      flex-direction: column;
      align-items: center;
  }

  nav a {
      margin: 5px 0;
      font-size: 20px;
  }

  .message_news h2{
    font-family: cursive;
    font-size: 25px;
    font-weight: 200;
  }


  .sermon{
    margin-bottom: 50px;
    max-width: 80%;
  }

  .sermon-image{
    width: 100%;
    height: 50%;
}
  .sermon-image img {
    width: 100%;  
    height: 50%;
      
  }

  .first-row-image img{
    width: 100%;
    height: 100%;
}

.first-row{
  margin-bottom: 80px;
  flex-direction: column; 

}

.second-row{
  margin-bottom: 80px;
  flex-direction: column;
}

.third-row{
  margin-bottom: 80px;
  flex-direction: column;

}

.second-row-image img{
  width: 100%;
  height: 100%;
}

.third-row-image img {
  width: 100%;
  height: 100%;
}
.upper-flex{
  align-items: center;
  flex-direction: column; 
  gap: 20px;
}

.other-posts{
  flex: 1 1 48%;
  max-width: 80%;
}
.other-posts-flex{
  grid-template-rows: none;
  grid-template-columns: 1fr; 
  gap: 10px; 
}

.lower-flex1-grid1{
  margin-bottom: 60px;
}

.lower-flex1-grid2{
  margin-bottom: 60px;
}


.lower-flex1-img p{
  font-size: 13px;
}

.lower-flex2-grid1{
  margin-bottom: 60px;
}



  .lower-flex1-img img {
    width: 100%;
    height: 250px;
    /* height: 100%; */
    
}

.lower-flex2-img p{
  font-size: 13px;
}

.lower-flex2-img img {
  width: 100%;
  height: 100%;
}

/* .latest-news h2{
  font-size: 28px;
}
.upcoming-events h2{
  font-size: 28px;

} */

.lower-flex1-img p{
  font-size: 17px;
}

  .lower-flex2 {
      grid-template-columns: 1fr;
  }

  .lower-flex1 {
      grid-template-columns: 1fr;
  }

  footer p{
    font-size: 13px;
  }
}


 

 

@media (min-width: 769px) and (max-width: 1158px){



nav {
  background-color: #2E81DF;
  padding-left: 7px ;
  padding-right: 9px;
  display: flex;
  justify-content: space-between;
  border-radius: 10px;
  margin-top: 20px;
}


nav a {
  margin: 5px 0;
  font-size: 20px;
}
 
  .sermon{
    margin-bottom: 50px;
    max-width: 60%;
  }

  .sermon-image{
    width: 100%;
    height: 50%;
}
  .sermon-image img {
    width: 100%;  
    /* width: rem; */
    /* height: 15%; */
    height: 30rem;

      
  }

  

.first-row{
  margin-bottom: 80px;
  flex-direction: column; 

}

.second-row{
  margin-bottom: 80px;
  flex-direction: column;
}

.third-row{
  margin-bottom: 80px;
  flex-direction: column;

}

.first-row-image img{
  width: 100%;
  height: 25rem;
}

.second-row-image img{
  width: 100%;
  height: 100%;
}

.third-row-image img {
  width: 100%;
  height: 20rem;
}
.upper-flex{
  align-items: center;
  flex-direction: column; 
  gap: 20px;
}

.other-posts{
  flex: 1 1 48%;
  max-width: 80%;
}
.other-posts-flex{
  grid-template-rows: none;
  grid-template-columns: 1fr; 
  gap: 10px; 
}

.lower-flex1-grid1{
  margin-bottom: 60px;
}

.lower-flex1-grid2{
  margin-bottom: 60px;
}


.lower-flex1-img p{
  font-size: 17px;
}

.lower-flex2-grid1{
  margin-bottom: 60px;
}



.lower-flex1-img img {
    width: 80%;
    height: 95%;
    
}

.lower-flex2-img p{
  font-size: 15px;
}

.lower-flex2-img img {
  width: 60%;
  height: 100%;
}

.latest-news h2{
  font-size: 17px;
}
.upcoming-events h2{
  font-size: 17px;

}

  .lower-flex2 {
      grid-template-columns: 1fr ;
  }

  .lower-flex1 {
      /* flex: 50%; */
    grid-template-columns: 1fr 1fr;
    grid-gap: 5px;
  }

  footer p{
    font-size: 13px;
  }
}



 

 
