/*
Theme Name: Video Gallery
Theme URI: https://example.com/video-gallery
Author: Video Gallery Team
Author URI: https://example.com
Description: A modern WordPress block theme featuring a YouTube video hero and a 4-column gallery with linkable items.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: video-gallery
Tags: video, gallery, youtube, blocks, full-site-editing
*/

/* Base styles */
:root {
  --vg-black: #000000;
  --vg-gray-950: #0a0a0a;
  --vg-gray-900: #171717;
  --vg-gray-800: #262626;
  --vg-gray-600: #525252;
  --vg-gray-400: #a3a3a3;
  --vg-gray-300: #d4d4d4;
  --vg-white: #ffffff;
  --vg-blue-500: #3b82f6;
  --vg-blue-400: #60a5fa;
}

/* YouTube Hero Block Styles */
.vg-youtube-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: var(--vg-black);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
}

.vg-youtube-hero__container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}

.vg-youtube-hero__video-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background-color: var(--vg-gray-900);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.vg-youtube-hero__video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.vg-youtube-hero__content {
  text-align: center;
  margin-top: 2rem;
}

.vg-youtube-hero__title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--vg-white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.vg-youtube-hero__description {
  font-size: 1.125rem;
  color: var(--vg-gray-400);
  max-width: 42rem;
  margin: 0 auto;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .vg-youtube-hero__title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .vg-youtube-hero__title {
    font-size: 3.75rem;
  }
}

/* Gallery Block Styles */
.vg-gallery {
  width: 100%;
  background-color: var(--vg-gray-950);
  padding: 5rem 1rem;
}

.vg-gallery__container {
  max-width: 80rem;
  margin: 0 auto;
}

.vg-gallery__header {
  text-align: center;
  margin-bottom: 3rem;
}

.vg-gallery__title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--vg-white);
  margin-bottom: 1rem;
}

.vg-gallery__description {
  color: var(--vg-gray-400);
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.6;
}

.vg-gallery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .vg-gallery__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .vg-gallery__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Gallery Item - Populated */
.vg-gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.75rem;
  background-color: var(--vg-gray-900);
  aspect-ratio: 4 / 5;
  text-decoration: none;
  transition: box-shadow 0.3s ease;
}

.vg-gallery-item:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.vg-gallery-item__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.vg-gallery-item:hover .vg-gallery-item__image {
  transform: scale(1.1);
}

.vg-gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2), transparent);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.vg-gallery-item:hover .vg-gallery-item__overlay {
  opacity: 0.8;
}

.vg-gallery-item__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
}

.vg-gallery-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.vg-gallery-item__text {
  flex: 1;
}

.vg-gallery-item__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--vg-white);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.vg-gallery-item:hover .vg-gallery-item__title {
  color: var(--vg-blue-400);
}

.vg-gallery-item__description {
  font-size: 0.875rem;
  color: var(--vg-gray-300);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.vg-gallery-item__icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.vg-gallery-item:hover .vg-gallery-item__icon {
  opacity: 1;
  transform: translateY(0);
}

.vg-gallery-item__icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--vg-white);
}

.vg-gallery-item__border {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  transition: border-color 0.3s ease;
  pointer-events: none;
}

.vg-gallery-item:hover .vg-gallery-item__border {
  border-color: rgba(59, 130, 246, 0.5);
}

/* Gallery Item - Placeholder */
.vg-gallery-item--placeholder {
  border: 2px dashed var(--vg-gray-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}

.vg-gallery-item__placeholder-icon {
  width: 4rem;
  height: 4rem;
  background-color: var(--vg-gray-800);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.vg-gallery-item__placeholder-icon span {
  font-size: 1.5rem;
  color: var(--vg-gray-600);
}

.vg-gallery-item__placeholder-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--vg-gray-500);
  margin-bottom: 0.25rem;
}

.vg-gallery-item__placeholder-description {
  font-size: 0.875rem;
  color: var(--vg-gray-600);
}

/* View All Link */
.vg-gallery__footer {
  text-align: center;
  margin-top: 3rem;
}

.vg-gallery__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--vg-blue-400);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

.vg-gallery__link:hover {
  color: var(--vg-blue-500);
}

.vg-gallery__link svg {
  width: 1rem;
  height: 1rem;
}
