/*=============== MEDIA PAGE (Photography + Video, tabbed) ===============*/
/* Built on top of styles.css - reuses the site's CSS variables, fonts, and spacing scale */

.media__description {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
  color: var(--text-color);
  font-size: var(--normal-font-size);
}

/*=============== TABS ===============*/
.media__tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.media__tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  background-color: var(--container-color);
  color: var(--text-color);
  border: 1.5px solid transparent;
  border-radius: 3rem;
  font-family: var(--title-font);
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: background .4s, color .4s, border-color .4s;
}

.media__tab-btn i {
  font-size: 1.15rem;
}

.media__tab-btn:hover {
  border-color: var(--first-color);
}

.media__tab-btn.active-tab {
  background-color: var(--first-color);
  color: hsl(207, 4%, 12%);
  font-weight: var(--font-semi-bold);
}

/*=============== TAB CONTENT ===============*/
.media__tab-content {
  display: none;
}

.media__tab-content.active-tab-content {
  display: block;
  animation: media-fade .4s ease;
}

@keyframes media-fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/*=============== GALLERY GRID ===============*/
.media__gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.media__gallery--video {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.media__item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: .75rem;
  background-color: var(--container-color);
  aspect-ratio: 4 / 3;
  transition: transform .3s, box-shadow .3s;
}

.media__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}

.media__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px hsla(207, 24%, 8%, .25);
}

.media__item:hover img {
  transform: scale(1.06);
}

.media__item--video .media__play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  font-size: 3rem;
  color: hsl(0, 0%, 100%);
  text-shadow: 0 2px 10px hsla(0, 0%, 0%, .5);
  pointer-events: none;
  transition: transform .3s;
}

.media__item--video:hover .media__play-icon {
  transform: scale(1.15);
}

/*=============== YOUTUBE CTA ===============*/
.media__youtube {
  text-align: center;
  margin-top: 3rem;
}

.media__youtube .button {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background-color: var(--first-color);
  color: hsl(207, 4%, 12%);
  padding: 1rem 1.75rem;
  border-radius: .5rem;
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: box-shadow .3s;
}

.media__youtube .button:hover {
  box-shadow: 0 8px 24px hsla(207, 65%, 65%, .35);
}

/*=============== MODAL (shared image + video) ===============*/
.media-modal {
  display: none;
  position: fixed;
  z-index: var(--z-fixed);
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: hsla(0, 0%, 0%, .92);
}

.media-modal__content {
  margin: 5% auto;
  display: block;
  max-width: 85%;
  max-height: 80vh;
  border-radius: .5rem;
}

#video-modal .media-modal__content {
  width: 80%;
  height: 80vh;
  border: none;
}

.media-modal__close {
  color: hsl(0, 0%, 100%);
  position: fixed;
  top: 1.25rem;
  right: 1.75rem;
  font-size: 2.25rem;
  font-weight: var(--font-medium);
  cursor: pointer;
  z-index: calc(var(--z-fixed) + 1);
}

/*=============== DARK THEME ===============*/
.dark-theme .media__item {
  background-color: var(--container-color);
}

.dark-theme .media__tab-btn:not(.active-tab) {
  background-color: var(--container-color);
}

.dark-theme .media__tab-btn.active-tab {
  background-color: var(--first-color);
  color: hsl(207, 4%, 10%);
}

/*=============== BREAKPOINTS ===============*/
@media screen and (max-width: 576px) {
  .media__gallery,
  .media__gallery--video {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .media-modal__content {
    max-width: 95%;
  }

  #video-modal .media-modal__content {
    width: 95%;
    height: 50vh;
  }
}
