/* Hero */
.background-img {
  background: url(../assets/general/brian-mcgowan-MIdLSFHYuMk-unsplash.jpg) center bottom / cover no-repeat;
  width: 100%;
  height: 50vh;
  position: relative;
  top: -100px;
  margin-bottom: 30px;
}
.hero {
  position: absolute;
  bottom: -29%;
  width: 95%;
  max-width: 728px;
  text-align: center;
  padding: 20px 15px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  border-radius: 10px;
}
h1 {
  text-shadow: 0 4px 4px rgba(0, 4, 255, 1);
  margin: 0 0 1rem 0;
}
h2{
font-size: clamp(20px, 7.633vw, 35px);
}
h3{
  font-size: clamp(20px, 6.35vw, 30px);
}
.hero p{
  max-width: 609px;
  place-self: center;
}
.wrapper-home{
  margin: 4rem 0;
}
.exhibitions-section,
.event-section a,
.kids-section,
.visit-section{
  margin-top: 1rem;
}
/* Exhibitions */
.wrapper-home header{
  position: relative;
  text-align: center;
  text-wrap: balance;
}
.exhibitions-section{
  position: relative;
  display: grid;
  row-gap: 40px;
  grid-template-columns: 1fr 1fr;
  justify-content: center;
  padding: 24px 0;
}
.card{
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  width: clamp(100px, 43.25vw, 251px);
  height: auto;
  aspect-ratio: 170 / 245;
  overflow: hidden;
  margin: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card a{
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.card img{
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card h3{
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 10px;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: white;
  line-height: 1;
  text-align: center;
}
.card:focus-within,
.card:hover{
  transform: scale(1.08);
  box-shadow: 0 0 6.77px 0 rgba(0, 4, 255, 1);
}
/* Special events */
.event-section{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4rem;
  justify-content: center;
}
.event-card a{
  position: relative;
  height: 513px;
  overflow: hidden;
  display: grid;
  grid-template-rows: 251px 1fr;
}
.event-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.event-card div {
  width: 90%;
  margin: 0 auto;
  text-wrap: balance;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.event-card:focus-within img,       
.event-card:hover img {
  transform: scale(1.3);
}

/* Kids and visiting section */
.kids-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  justify-items: center;
  margin-bottom: 6rem;
  padding: 2rem 0;
}
.text:first-of-type {
  order: 1;
  padding-top: 2rem;
}
.images {
  width: clamp(190px, 48.35vw, 352px);
  aspect-ratio: 190 / 269;
  height: auto;
  border-radius: 10px;
  order: 2;
}
.text:last-of-type{
  order: 3;
  padding-bottom: 2rem;
}
.text{
  margin: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.button {
  background: #0004FF;
  border-radius: 20px;
  font-family: var(--headings);
  font-size: 20px;
  color: white;
  font-weight: 700;
  padding: 10px;
  position: relative;
  margin: 1rem auto;
  text-align: center;
  line-height: 1;
  transition: background-color 0.3s ease;
}
.button:focus-visible,
.button:hover {
  color: #0004FF;
  background-color: transparent;
}
.visit-section{
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
.visit-section header{
  gap: 4rem;
  display: flex;
  flex-direction: column;
}
.visit-section h2 {
  padding-top: 2rem;
}
.visit-section dl {
  display: grid;
  position: relative;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  margin: 0 auto;
  padding-bottom: 2rem;
}
.visit-section dl dt {
  font-weight: 500;
}

@media (min-width: 650px){
/* Events */
  .event-card a {
    grid-template-columns: 1fr 1.5fr;
    height: 373px;
    grid-template-rows: none;
  }
  .event-card div{
    padding-left: 30%;
  }
  .event-card .change-order {
    grid-template-columns: 1.5fr 1fr;
  }
  .change-order img {
    grid-column: 2;
    grid-row: 1 / 3;
  }
  .event-card .change-order-text{
    padding-left: 0;
    padding-right:10%;
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .event-card img {
    aspect-ratio: 547 / 373;
    max-height: 373px;
  }
 /* Kids */
  .kids-section {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    max-height: 708px;
  }
  .text:first-of-type,
  .text:last-of-type {
    grid-column: 1;
    margin: 0 0 0 80px;
  }
  .images{
    grid-column: 2;
    grid-row: 1 / 3;
  }
  /* Visit */
  .visit-section{
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    gap: 10%;
    padding: 2rem 0 2rem 0;
  }
}
/* Hero */
@media (min-width: 800px){
  .background-img {
    height: 95vh;
    margin-bottom: 0;
  }
  .hero {
    left: 0;
    transform: translate(0);
    bottom: -10%;
  }
  .exhibitions-section{
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}
@media (min-width: 950px){
  /* Opening Hours */
  .opening-hours {
    margin-top: -100px;
  }
}