/* Video Grid Hero Section */
.video-grid-hero {
  overflow: hidden;
}

.video-grid-hero__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media screen and (min-width: 990px) {
  .video-grid-hero__container {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

@media screen and (min-width: 1200px) {
  .video-grid-hero__container {
    gap: 8rem;
  }
}

/* Content Side */
.video-grid-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.video-grid-hero__content--center {
  align-items: center;
  text-align: center;
}

@media screen and (max-width: 749px) {
  .video-grid-hero__content--mobile-center {
    align-items: center;
    text-align: center;
  }
}

/* Badge */
.video-grid-hero__badge {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.2rem;
  text-transform: uppercase;
  border-radius: 0.4rem;
  background-color: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
}

/* Heading */
.video-grid-hero__heading {
  margin: 0;
  line-height: 1.1;
  font-weight: 600;
}

.video-grid-hero__heading.h0 {
  font-size: calc(var(--font-heading-scale) * 3.2rem);
}

@media screen and (min-width: 750px) {
  .video-grid-hero__heading.h0 {
    font-size: calc(var(--font-heading-scale) * 4.2rem);
  }
}

@media screen and (min-width: 990px) {
  .video-grid-hero__heading.h0 {
    font-size: calc(var(--font-heading-scale) * 5rem);
  }
}

/* Text */
.video-grid-hero__text {
  font-size: 1.4rem;
  line-height: 1.6;
  color: rgba(var(--color-foreground), 0.7);
  max-width: 50rem;
  margin: 0;
}

@media screen and (min-width: 750px) {
  .video-grid-hero__text {
    font-size: 1.5rem;
  }
}

/* Buttons */
.video-grid-hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1rem;
}

.video-grid-hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.4rem 2.8rem;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.05rem;
  text-decoration: none;
  border-radius: 0.4rem;
  transition: all var(--duration-short) ease;
  cursor: pointer;
}

.video-grid-hero__button--primary {
  background-color: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  border: 0.2rem solid rgb(var(--color-foreground));
}

.video-grid-hero__button--primary:hover {
  background-color: rgba(var(--color-foreground), 0.85);
  border-color: rgba(var(--color-foreground), 0.85);
}

.video-grid-hero__button--secondary {
  background-color: transparent;
  color: rgb(var(--color-foreground));
  border: 0.2rem solid rgba(var(--color-foreground), 0.2);
}

.video-grid-hero__button--secondary:hover {
  border-color: rgb(var(--color-foreground));
}

.video-grid-hero__button .icon-arrow {
  width: 1.2rem;
  height: 1.2rem;
  transition: transform var(--duration-short) ease;
}

.video-grid-hero__button:hover .icon-arrow {
  transform: translateX(0.3rem);
}

/* Media Grid Side */
.video-grid-hero__media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.2rem;
}

@media screen and (min-width: 750px) {
  .video-grid-hero__media-grid {
    gap: 1.6rem;
  }
}

@media screen and (min-width: 990px) {
  .video-grid-hero__media-grid {
    gap: 2rem;
  }
}

/* Asymmetric Grid Layout */
.video-grid-hero__media-grid--asymmetric {
  grid-template-rows: 1fr 1fr;
}

.video-grid-hero__media-grid--asymmetric .video-grid-hero__media-item:nth-child(1) {
  grid-row: 1 / 2;
}

.video-grid-hero__media-grid--asymmetric .video-grid-hero__media-item:nth-child(2) {
  grid-row: 1 / 2;
}

.video-grid-hero__media-grid--asymmetric .video-grid-hero__media-item:nth-child(3) {
  grid-row: 2 / 3;
}

.video-grid-hero__media-grid--asymmetric .video-grid-hero__media-item:nth-child(4) {
  grid-row: 2 / 3;
}

/* Media Items */
.video-grid-hero__media-item {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  background-color: rgba(var(--color-foreground), 0.05);
}

.video-grid-hero__media-item--video {
  cursor: pointer;
}

.video-grid-hero__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
}

.video-grid-hero__media img,
.video-grid-hero__media video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-medium) ease;
}

.video-grid-hero__media-item:hover img,
.video-grid-hero__media-item:hover video {
  transform: scale(1.03);
}

/* Video Poster & Play Button */
.video-grid-hero__poster {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 100%;
}

.video-grid-hero__play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 5rem;
  height: 5rem;
  background-color: rgba(var(--color-background), 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--duration-short) ease;
  z-index: 1;
}

.video-grid-hero__play-button:hover {
  background-color: rgb(var(--color-background));
  transform: translate(-50%, -50%) scale(1.1);
}

.video-grid-hero__play-button .icon-play {
  width: 1.8rem;
  height: 1.8rem;
  margin-left: 0.3rem;
}

/* Video poster fallback — hidden by default, shown only if autoplay blocked */
.video-grid-hero__video-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

/* Placeholder */
.video-grid-hero__placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(var(--color-foreground), 0.04);
}

.video-grid-hero__placeholder .placeholder-svg {
  width: 60%;
  height: 60%;
  fill: rgba(var(--color-foreground), 0.3);
}

/* Reverse layout */
@media screen and (min-width: 990px) {
  .video-grid-hero__container--reverse {
    direction: rtl;
  }

  .video-grid-hero__container--reverse > * {
    direction: ltr;
  }
}

/* Section Padding */
.video-grid-hero-padding {
  padding-top: var(--section-padding-top);
  padding-bottom: var(--section-padding-bottom);
}

/* Video Modal Styles */
.video-grid-hero__modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.video-grid-hero__modal[open] {
  display: flex;
}

.video-grid-hero__modal-content {
  position: relative;
  width: 100%;
  max-width: 90rem;
  aspect-ratio: 16 / 9;
  background-color: #000;
}

.video-grid-hero__modal-close {
  position: absolute;
  top: -4rem;
  right: 0;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.5rem;
}

.video-grid-hero__modal-close .icon-close {
  width: 2.4rem;
  height: 2.4rem;
}

.video-grid-hero__modal iframe,
.video-grid-hero__modal video {
  width: 100%;
  height: 100%;
  border: none;
}

