/* General Page Styles */
body {
  background-color: #efefef;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; 
  height: 1px; 
  padding: 0; 
  margin: -1px; 
  overflow: hidden; 
  clip: rect(0 0 0 0); 
  white-space: nowrap; 
  border: 0;
}


/* Block: Video Gallery */
.videos-gallery {
  margin: 0 auto;
  padding: 40px 0;
}

/* Grid Container */
.videos-gallery__container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Each Video Item */
.videos-gallery__item {
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Embedded Video */
.videos-gallery__item iframe {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: none;
  object-fit: cover;
}

/* Thumbnail Button */
.videos-gallery__thumbnail {
  position: relative;
  cursor: pointer;
  display: block;
  overflow: hidden;
  background: none;
  border: none;
  padding: 0;
}

/* Thumbnail Image */
.videos-gallery__thumbnail-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  object-fit: cover;
}

/* Overlay */
.videos-gallery__thumbnail::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  z-index: 1;
}

/* Play Button */
.videos-gallery__play-button {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10%;
  width: 120px; height: 90px;
  line-height: 90px;
  text-align: center;
  z-index: 2;
  pointer-events: none;
  transition: background-color 0.3s ease;
}

/* Hover & Focus Effect */
.videos-gallery__thumbnail:hover .videos-gallery__play-button,
.videos-gallery__thumbnail:focus .videos-gallery__play-button {
  background: rgba(0, 0, 0, 0.8);
}

/* Thumbnail Focus Outline */
.videos-gallery__thumbnail:focus {
  outline: 3px solid #8eb63e;
  outline-offset: 4px;
}

/* Video Title */
.videos-gallery__title {
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.9em;
  font-weight: 500;
  color: #333;
  text-align: center;
}

/* Responsive Adjustments */

/* Widescreen (75% width) */
@media (min-width: 1921px) {
  .videos-gallery {
    width: 75%;
  }
}

/* Desktop (80% width) */
@media (min-width: 1441px) and (max-width: 1920px) {
  .videos-gallery {
    width: 80%;
  }
}

/* Laptop (85% width) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .videos-gallery {
    width: 85%;
  }
}

/* Tablet (2 columns, 90% width) */
@media (min-width: 769px) and (max-width: 1024px) {
  .videos-gallery {
    width: 90%;
    padding: 30px 0;
  }
  .videos-gallery__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

/* Mobile (1 column, 100% width) */
@media (max-width: 768px) {
  .videos-gallery {
    padding: 20px;
  }
  .videos-gallery__container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
