.frame {
    width: 100%;
    overflow: hidden;
    margin: 0;
}

.hero {
    position: relative;
    background-image: url("../images/header-image.webp");
    background-size: cover;
    background-position: center;
    aspect-ratio: 16/9;
}

.title {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
}

.text-stroke {
    text-shadow:
    -2px -2px 0 black,
     2px -2px 0 black,
    -2px  2px 0 black,
     2px  2px 0 black,
    -2px  0   0 black,
     2px  0   0 black,
     0   -2px 0 black,
     0    2px 0 black;
}

.gallery {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 0;
}

.gallery .card {
  position: relative;
  flex: 1 1 100%;
  overflow: hidden;
  height: 300px;     
  max-width: 600px;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.gallery .card:hover img, 
.exhibition-card:hover {
  transform: scale(1.05);
}

.gallery .overlay  {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  text-align: center;
  pointer-events: none;
}

@media (min-width: 768px) {
  .gallery .card {
    flex: 1 1 50%;
  }
}

.exhibition-header {
  width: 100%;
  height: 250px;
  overflow: hidden;
  margin-bottom: 2rem;

}

.exhibition-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.exhibition-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: center;
}

.exhibition-wrapper .card {
  margin: 0;
  flex: 0 1 calc(50% - 11px);
  max-width: calc(50% - 11px);
}

.exhibition-wrapper .card.ecology {
  flex-basis: calc(50% - 11px);
  max-width: calc(50% - 11px);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767px) {
  .exhibition-wrapper .card,
  .exhibition-wrapper .card.ecology {
    flex-basis: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

.exhibition-wrapper .card > div {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.exhibition-wrapper .card h2 {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 12px 14px;
  text-align: center;
  color: #fff;
  font-size: 1.1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
}

.cosmology > div{ 
  background-image:url('../images/cosmology.webp'); 
}
.evolution  > div{ 
  background-image:url('../images/evolution.webp'); 
}
.biology    > div{ 
  background-image:url('../images/biology-and-medicine.webp'); 
}
.robotics   > div{ 
  background-image:url('../images/robotics-and-ai.webp'); 
}
.ecology    > div{ 
  background-image:url('../images/ecology.webp'); 
}

.exhibition-img-wrapper {
  width: 100%;
  height: 550px;
  overflow: hidden;
}

.exhibition-img-wrapper img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.info-sections {
  display: grid;
  gap: 1.5rem
}

.info-card {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  margin: 2rem 0;
  padding: 1.25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.info-card p:last-child {
  margin-bottom: 0;
}

.info-sections{
  display: grid;
  gap: 1.25rem;
  margin: 2rem auto;
}

@media (min-width:900px){
  .info-sections{ grid-template-columns: 1fr 1fr; }
}

.visit-bottom{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:1.5rem;
  margin: 2rem auto 2.5rem;
  align-items: stretch;
}

.visit-card{
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:10px;
  padding:1rem;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
}

.visit-card h2{
  margin:0 0 .75rem;
  font-size:1.25rem;
  font-weight:700;
}
.visit-card.visit-hours{
  display:grid;
  grid-template-rows:auto 1fr;
}
.visit-card.visit-location{
  display:grid;
  grid-template-rows:auto auto 1fr;
}
.visit-location p{ margin:0 0 .75rem; color:#333; }

.map-embed{
  height:100%;
  min-height:300px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid #e5e5e5;
}
.map-embed iframe{
  width:100%;
  height:100%;
  border:0;
}

.hours-grid{ 
  display:grid; 
  gap:.75rem; 
}

.hours-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#fff;
  border:1px solid #e5e5e5;
  border-radius:10px;
  padding:.65rem .9rem;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
}
.hours-row span{ 
  font-weight:600; 
  color:#222; 
}
.hours-row strong{ 
  font-weight:500;
  color:#111; 
}

@media (max-width:768px){
  .visit-bottom{ 
    grid-template-columns: 1fr; 
  }
  .visit-hours{ 
    order:1; 
  }
  .visit-location{ 
    order:2; 
  }
  .map-embed{ 
    min-height:360px; 
  }
}

.events {
  display: grid;
  gap: 1.5rem;
  margin: 2rem auto;
  max-width: 900px;
}

.event-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
  text-align: center;
}

.event-card h3 { 
  margin-bottom: .5rem; 
}

.event-card img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: .75rem;
}

.read-more {
  display: inline-block;
  margin-top: .5rem;
  padding: .5rem 1rem;
  background: #0c0f14;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: .9rem;
}

.read-more:hover { 
  background: #333; 
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal:target {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
  text-align: left;
  position: relative;
}
.modal-content h3 { margin-top: 0; }

.close {
  display: inline-block;
  margin-top: 1rem;
  padding: .4rem .8rem;
  background: #0c0f14;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: .85rem;
}
.close:hover { background: #333; }
