/* ================================
   HERO
=================================== */

#hero + #page-wrap {
  padding-top: 1rem;
}

/* Hero variants/utilities */
.in-page-hero.no-overlay .hero-image { background-attachment: fixed !important; }

section#hero:not(.banner-hero) { padding-bottom: 4rem; }

#main-content:has(.hero-video) .page-title { display: none; }

/* Base hero video wrapper */
.hero-video {
  height: 600px;
  margin-bottom: 5rem;
}

/* Video fills viewport width while centered within container */
.hero-video > video {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  object-fit: cover;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}


#hero .hero-video .overlay { width: auto; }

/* Controls (default hidden, fade in when toggled) */
.hero-video .video-controls {
  position: absolute;
  top: 2rem;
  right: 0;
  left: 0;
  z-index: 4;
  width: 100%;
  max-width: 1125px;
  margin: 0 auto;
  padding-right: 1.5rem;
  display: flex;
  justify-content: flex-end;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-video.show-controls .video-controls { 
    opacity: 1; 
}

.hero-video .video-controls .control-button {
  width: 25px;
  height: 25px;
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: 25px;
  -webkit-filter: drop-shadow(0 0 2px black);
  filter: drop-shadow(0 0 2px black);
  opacity: 0.8;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}
.hero-video .video-controls .control-button:hover { opacity: 1; }

/* Toggle play/pause art */
.hero-video .video-controls .start-button,
.hero-video .video-controls .end-button { display: none; }

.hero-video video.stopped ~ .video-controls .start-button {
  display: block;
  background-image: url('https://design.northwestern.edu/images/structure/icons/button-play-no-outer.svg');
}
.hero-video video.started ~ .video-controls .end-button {
  display: block;
  background-image: url('https://design.northwestern.edu/images/structure/icons/button-pause-no-outer.svg');
}


/* ================================
   FEATURED TILES
=================================== */

.featured-tiles { position: relative; }

/* Layering: content above video/overlays */
.featured-tiles .tile-wrap,
.featured-tiles .intro-text {
  position: relative;
  z-index: 1;
}

/* Background video */
.featured-tiles video {
  position: absolute;
  inset: 0 0 auto 0; /* top:0; left:0; */
  width: 100%;
  height: 380px;
  z-index: 0;
  object-fit: cover;
  opacity: .25;
}

/* Default fade at the bottom area (under tiles) */
.featured-tiles::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6rem;
  width: 100%;
  height: 19rem;
  z-index: 0;
  display: block;
  background: linear-gradient(to top, rgba(255,255,255,1) 45%, rgba(255,255,255,0) 100%);
}

/* Video variant */
.featured-tiles.has-video {
  overflow: hidden;
  background-image: none !important;
}
.featured-tiles.has-video::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 20%;
  z-index: 1;
  display: block;
  background: linear-gradient(to top, rgba(255,255,255,0) 0%, rgba(228,224,238,.6) 100%);
}

.featured-tiles.has-video::after {
  top: 21rem;
  height: 4rem;
}


.featured-tiles .tile-wrap-img-wrap {
  display: block;
  margin-bottom: 0.875rem;
  border: none !important;
}
.featured-tiles .tile-wrap-img-wrap h3 { color: #4e2a84; }

.featured-tiles .tile-wrap-img-wrap__img {
  height: 256px;
  margin-bottom: 1.1rem;
  overflow: hidden;
  border: 1px solid transparent !important;
}

.featured-tiles .tile-wrap-img-wrap img { 
    transition: transform .3s ease; 
}

.featured-tiles .tile-wrap-img-wrap:hover img {
  display: block;
  transform: scale(1.1);
}


/* ================================
   GRID LAYOUT (TWO COLUMN)
=================================== */

.grid-layout > .grid-layout-group > .two-column {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px 30px; 
  padding: 20px 0;
}
.grid-layout > .grid-layout-group > .two-column h3 {
  max-width: 410px;
  margin: 0 auto;
  padding-bottom: 1rem;
}

/* ================================
   SECTION TOP
=================================== */

.full-width-page .section-top p {
    font-size: 1.1875rem;
}


/* ================================
   MEDIA QUERIES
=================================== */

/* Featured tiles video variant background on narrower screens */
@media (max-width: 872px) {
  .featured-tiles.has-video { background-color: inherit !important; }
}


@media (max-width: 767px) {
  .hero-video { height: 400px; }
}

@media (max-width: 700px) {
  .grid-layout > .grid-layout-group > .two-column { grid-template-columns: 1fr; }
}
