/* Virtual Museum Team - hand-written stylesheet (no framework) */

:root {
  --purple: #8C239F;          /* accent: icon circles, buttons */
  --orange: #FF9800;          /* nav active underline */
  --heading: #3C424F;
  --body-text: #6B7C93;
  --section-bg: #f5fafd;      /* pale blue section background */
  --border: #e8e8e8;
  --footer-text: #989898;
  --wave-accent: #A600FF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 400 14px/1.5 "Open Sans", Helvetica, Arial, sans-serif;
  color: var(--body-text);
  background: #fff;
}

h1, h2, h3 { font-family: Muli, Helvetica, Arial, sans-serif; color: var(--heading); }
a { color: inherit; }
img { max-width: 100%; }

.container { max-width: 1170px; margin: 0 auto; padding: 0 15px; }

/* ---------- grids ---------- */
.grid { display: grid; gap: 30px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 991px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 706px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(135deg, rgba(102,126,234,.8) 0%, rgba(118,75,162,.8) 100%),
    url("media/hero-background.jpg") top center / cover no-repeat;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  max-width: 1170px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 15px 0;
}

.logo {
  font-family: Muli, Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  line-height: 1.25;
  max-width: 240px;
}
.logo span { font-weight: 300; }

.topbar nav a {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  padding-bottom: 4px;
}
.topbar nav a.active, .topbar nav a:hover { border-bottom: 3px solid var(--orange); }

.hero-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 15px 210px;   /* bottom padding keeps the title above the wave */
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: 46px;
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: .9px;
  text-align: center;
  color: #fff;
}

.wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 178px;
}
.wave-fill { fill: #fff; }
.wave-accent { stroke: var(--wave-accent); }

/* ---------- museums ---------- */
.museums { background: var(--section-bg); padding-bottom: 80px; }

/* first row of cards is pulled up so the icons overlap the hero wave */
.overlap { position: relative; z-index: 1; margin-top: -145px; }

.museum-card { text-align: center; }

.icon-circle {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(49,52,57,.3), 0 10px 30px rgba(0,0,0,.08);
}
.icon-circle svg { width: 49px; height: 49px; fill: #fff; }

.museum-card h3 {
  margin: 40px 0 16px;
  font-size: 12.25px;
  font-weight: 800;
  letter-spacing: 2px;
}

.visit-links a { display: block; margin: 2px 0; }
.museum-card p { margin: 21px 0 0; }

/* ---------- videos ---------- */
.videos { background: var(--section-bg); padding: 48px 0; }

.videos h2, .team h2 {
  margin: 0 0 40px;
  font-size: 30.6px;
  font-weight: 600;
  text-align: center;
}

.video-card { background: #fff; border: 1px solid var(--border); }

.thumb { position: relative; display: block; }
.thumb img { display: block; width: 100%; height: auto; aspect-ratio: 500 / 333; object-fit: cover; }

.thumb .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(52,58,64,.7);
  opacity: 0;
  transition: opacity .4s ease;
}
.thumb:hover .overlay, .thumb:focus-visible .overlay { opacity: 1; }

.btn {
  display: inline-block;
  padding: 5px 19px;
  background: var(--purple);
  border: 2px solid var(--purple);
  border-radius: 5px;
  color: #fff;
  font-size: 10.4px;
  letter-spacing: 1px;
}

.video-card h3 {
  margin: 0;
  padding: 24px 15px;
  font-size: 12.25px;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
}

/* ---------- team ---------- */
.team { background: #fff; padding: 48px 0 40px; }

.team .intro { max-width: 760px; margin: -20px auto 48px; text-align: center; }

.member { text-align: center; }
.member img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }
.member h3 { margin: 20px 0 4px; font-size: 15px; font-weight: 600; }
.member .role { margin: 0 auto 14px; font-style: italic; }
.member p { max-width: 480px; margin-left: auto; margin-right: auto; }

/* a lone member left over on the last row would otherwise sit off to the left;
   the leftover count depends on how many columns the grid is showing */
@media (min-width: 992px) {
  .team .grid-3 > .member:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .team .grid-3 > .member:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.profile-link { display: inline-block; margin-top: 12px; }
.profile-link svg { width: 22px; height: 22px; fill: var(--body-text); }
.profile-link:hover svg { fill: var(--purple); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 24px 15px;
  text-align: center;
  color: var(--footer-text);
}
footer p { max-width: 900px; margin: 0 auto; }

/* ---------- small screens ---------- */
@media (max-width: 767px) {
  .hero { min-height: 560px; }
  .topbar { padding-top: 28px; }
  .hero-content { padding-bottom: 150px; }
  .hero h1 { font-size: 30px; }
  .wave { height: 110px; }
  .overlap { margin-top: -110px; }
}
