header {
  background: #e4d7c5;
  display: grid;
  width: 100%;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 75px 1fr;
  column-gap: 10px;
  position: sticky;
  z-index: 999;
}

#flag{
  max-width: 40px;
  margin-right: 20px;
}

.hamburger_icon {
  font-size: 32px;
  cursor: pointer;
  align-self: center;
  justify-self: start;
  margin-left: 20px;
}

header a{
  align-self: center;
  justify-self: start;
  text-decoration: none;
  color: #3b3b3b;
}

.language{
  justify-self: end;
  align-self: center;
}

.menu {
  transition: 0.8s;
  display: grid;
  align-items: center;
  overflow: hidden;
  grid-column: 1/-1;
}

.menu a{
    width: 100%;
    height: 30px;
    padding-left: 30px;
    text-decoration: none;
    color: #3b3b3b;
}

.menu a:hover{
  color: white;
}

.menu i{
  padding-right: 10px;
}

.toggle{
  height: 0;
}

.contact{
  min-height: calc(100vh - 220px);
}

body {
  margin: 0;
  font-family: "Georgia", serif;
  background-color: #f2e9d8;
  color: #3b3b3b;
}

body h2{
  margin-top: 10px;
  margin-left: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

body p{
  padding: 10px;
}

.home_images {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.beige h2{
  margin-top: 0;
  padding-top: 10px;
}

#gyms{
    margin-bottom: 20px;
}

.green{
  background-color: #7EAF8A;
  color: #f2e9d8;
  width: 100%;
}

.green h2{
  margin-top: 0;
  padding-top: 10px;
  text-shadow: 1px 1px 2px rgb(255, 255, 255,0.5);
}

#background { 
  background-image: url("media/background_section.jpg"); 
  background-size: cover; 
  background-position: center; 
  background-attachment: fixed;
  background-repeat: no-repeat; 
  background-color: rgba(242, 233, 216, 0.8);
  background-blend-mode: lighten;
  height: auto;
  padding-bottom: 10px;
}

#background h2{
  color: #3b3b3b;
  text-align: center;
  padding-top: 10px;
}

video{
  height: 100%;
  width: 100%;
  object-fit: cover;
}
img{
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.openImage img{
  max-width: 95%;
  max-height: 75%;
}
.openImage video{
  max-width: 95%;
  max-height: 75%;
}
.openImage{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

#grades{
  background-color: #e4d7c5;
  width: 80%;
  margin: 0 auto;
  border-radius: 10px;
}

#grades table{
  width: 100%
}

#grades p{
  color: #3b3b3b;
  padding: 10px;
}

#grades_text{
  margin-left: 5%;
  margin-right: 5%;
}

.gallery{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 5px;
  height: 1600px;
  margin: 5px;
}

.gallery figcaption{
  display: none;
}

.openImage figcaption{
  display: block;
  width: 95%;
  text-align: left;
}

.gallery > *{
  border: 1px solid #3b3b3b;
  min-width: 0;
  min-height: 0;
}

.border{
  border-top: #13EC5B 2px solid;
  width: 30px;
}

.gallery_location{
  position: relative;
  top: -10px;
  font-weight: bold;
  padding: 0;
}

.gallery_grade, .gallery_year{
  position: relative;
  top: -10px;
  padding: 0;
  font-size: 0.9rem;
  font-style: italic;
}

.gallery_year{
  font-weight: bold;
  color: #6e6e6e;
}

#media1{
  grid-column: span 2;
}
#media4{
  grid-column: span 2;
  grid-row: span 2;
}
#media5{
  grid-row-start: 3;
}
#media6{
  grid-column: span 2;
  grid-row: span 2;
}
#media10{
  grid-column: span 2;
}
#media11{
  grid-column: span 2;
}

#equipment figure{
  display: grid;
  grid-template-columns: 20% 70% 1fr;
  grid-template-rows: 1fr auto 20px;
  margin: 10px;
}
#equipment picture{
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
#equipment figcaption{
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  background-color: #79c48c;
  color: rgb(39, 41, 38);
  font-size: 14px;
}

form{
  display: grid;
  grid-template-columns: 1fr 2fr;
  align-items: center;
}

form input{
  padding-left: 10px;
  width: 95%;
  margin-right: 10px;
  margin-top: 5px;
  border: 2px solid #3b3b3b;
  border-radius: 10px;
}

form label{
  margin-left: 10px;
  margin-top: 5px;
}

form .gender{
  grid-column: 2fr 3fr;
  display: flex;
  justify-content: start;
  align-items: center;
  justify-self: start;
}

form .gender label{
  display: flex;
  align-items: center;
}

form .message{
  grid-column: 1 / 3;
  margin-left: 10px;
  width: 95%;
  border: 2px solid #3b3b3b;
  resize: none;
}

.message_wrapper{
  grid-column: 1 / 3;
  position: relative;
  margin-left: 10px;
  width: 95%;
}

.message_wrapper img{
  width: 100%;
  display: block;
}

.message_wrapper textarea{
  position: absolute;
  top: 10px;
  left: 10px;
  height: 45%;
  width: 95%;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font-size: 14px;
}

.overlay-actions{
  position: absolute;
  margin-top: 15%;
  top: 40%;
}

.overlay-actions button{
  color: #3b3b3b;
  background-color: #e4d7c5;
  border: 2px solid #3b3b3b;
  border-radius: 10px;
  cursor: pointer;
  height: auto;
}

.overlay-actions button:hover{
  color: white;
  border: 2px solid white;
}



figcaption{
  padding: 10px;
  font-size: 0.8rem;
}

iframe{
  display: block;
  width: 100%;
}

#video{
  max-width: 100%;
  height: 240px;
}

#map{
  width: 100%;
  height: 400px;
  border: 0;
}



footer {
  background: #e4d7c5;
  display: flex;
  width: 100%;
  height: auto;
  flex-direction: row;
  justify-content: space-around;
  align-items: end;
  font-family: "Montserrat", sans-serif;
  flex-wrap: wrap;
}

#footer_bottom {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

#footer_bottom a{
  text-decoration: none;
  color: #3b3b3b;
}

#footer_bottom a:hover{
  color: white;
  cursor: pointer;
}

footer p{
  width: 33%;
  font-style: italic;
  align-self: end;
  font-size: 0.9rem;
}

#footer_name{
  padding-left: 10px;
}

#footer_date{
  text-align: right;
  padding-right: 10px;
}

#footer_contact{
  text-align: center;
}



.socials{
  display: flex;
  flex-direction: row;
  align-self: start;
  justify-content: center;
  gap: 30px;
  width: 100%;
}
.socials a {
  font-size: 3rem;
  color: #241c17;
  transition: 0.3s;
}

.socials a:hover {
  color: #ffffff;
}



@media (min-width: 640px){
body{
  display: flex;
  align-items: center;
  flex-direction: column;

}

body > section{
  max-width: 1080px;
}

#background{
  max-width: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
}

#background > section{
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

#grades table{
  width: 100%
}
#grades{
  width: auto;
  grid-row: span 2;
  margin: 20px;
}

#equipment figcaption{
  min-height: 100px;

}

#equipment{
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: auto 1fr;
}

#equipment article{
  grid-column: span 4;
}

#equipment figure{
  grid-row-start: 2;
}

#map{
  width: 75%;
}

.contact{
  min-width: 30%;
  border: 3px solid #3b3b3b;
  border-radius: 10px;
  padding: 10px;
  margin: 10px;
}

#gyms{
  display: grid;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
}
#gyms h2{
  grid-column: 1 / -1;
}

.gallery{
  width: 50%;
  cursor: pointer;
}

.openImage video, .openImage img{
  height: 100%;
  width: auto;
}
}