:root{
  --bg: #027B61;
  --title-color: #121212;
  --cat-text: #121212;
  --label-bg: #fff9f9;
  --card-w: 424px;
  --card-h: 467px;
  --gap: 22px;
  --row-gap: 52px;
  --label-h: 65px;
  --radius: 8px;
}

/* Heading */
.heading {
  font-family: 'Domine', serif;
  font-weight: 700;
  font-size: 40px;
  color: var(--title-color);
  text-align: center;
  padding: 20px;
}

body {
  background-color: #027B61;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, var(--card-w));
  gap: var(--gap);
  justify-content: center;
  margin-bottom: var(--row-gap);
  width: calc(3 * var(--card-w) + 2 * var(--gap));
  max-width: 100%;
}

.grid.two-items {
  display: flex;
  justify-content: center;
  gap: var(--gap);
}

/* Card */
.card {
  width: var(--card-w);
  height: var(--card-h);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: #000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

/* Video container */
.video-container {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Category label */
.category-label {
  width: 100%;
  height: var(--label-h);
  background: var(--label-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  flex-shrink: 0;
}

.category-text {
  font-family: 'Domine', serif;
  font-weight: 700;
  font-size: 24px;
  color: var(--cat-text);
  text-align: center;
  padding: 20px;
}

/* Tablet */
@media(max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    width: 100%;
    padding: 0 20px;
  }
  .card {
    width: 100%;
    height: auto;
  }
  .video-container {
    aspect-ratio: 16 / 9;
  }
}

/* Mobile */
@media(max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 0 20px;
    margin-left: auto;
    margin-right: auto;
  }
  .card {
    width: 100%;
    height: auto;
  }
  .video-container {
    aspect-ratio: 16 / 9;
  }
  .category-text {
    font-size: 20px;
  }
  .heading {
    font-size: 32px;
  }
}

/* Mobile */
@media(max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    width: 100%;
    padding: 0 16px;
    margin-left: auto;
    margin-right: auto;
    gap: 16px;           /* reduced from 22px */
    margin-bottom: 24px; /* reduced from 52px */
  }
  .card {
    width: 100%;
    height: auto;
  }
  .video-container {
    aspect-ratio: 16 / 9;
  }
  .category-text {
    font-size: 20px;
    padding: 12px;
  }
  .heading {
    font-size: 32px;
    padding: 12px;
  }
}