.courses-section {
  max-width: 1200px;
  margin: 56px auto 0 auto;
  padding: 0 16px;
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.course-box {
  background: linear-gradient(135deg, #ffe0ec 0%, #e0f7fa 100%);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(44,62,80,0.13), 0 1.5px 8px rgba(194,24,91,0.08);
  padding: 38px 40px 40px 42px;
  text-align: center;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
  min-height: 370px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.course-box:hover {
  box-shadow: 0 16px 48px rgba(44,62,80,0.18), 0 2px 12px rgba(194,24,91,0.13);
  transform: translateY(-8px) scale(1.03);
}
.course-box h3 {
  margin-bottom: 24px;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #c2185b;
  letter-spacing: 1px;
  font-weight: 700;
}
.course-box h2 {
  margin-bottom: 1px;
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #c2185b;
  letter-spacing: 1px;
  font-weight: 700;
}
.course-box p {
  margin-bottom: 0px;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #000000;
  letter-spacing: 1px;
  font-weight: 200;
}
.course-box ul {
  text-align: left;
  margin-bottom: 32px;
  padding-left: 22px;
  font-size: 1.15rem;
  color: #333;
  line-height: 1.7;
}
.see-design-btn {
  display: inline-block;
  background: linear-gradient(90deg, #c2185b 0%, #0097a7 100%);
  color: #fff;
  padding: 14px 36px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(44,62,80,0.08);
  transition: background 0.2s, transform 0.2s;
  margin-top: auto;
}
.see-design-btn:hover {
  background: linear-gradient(90deg, #0097a7 0%, #c2185b 100%);
  transform: scale(1.05);
}
/* Ensure course gallery images are sized consistently */
.category-gallery .gallery-img,
#course-gallery .gallery-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #c2185b;
  box-shadow: 0 2px 8px rgba(44,62,80,0.13);
  margin: 0 auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.category-gallery .gallery-img:hover,
#course-gallery .gallery-img:hover {
  transform: scale(1.09) rotate(-2deg);
  box-shadow: 0 8px 32px #c2185b66;
}

/* Fullscreen viewer overlay for course images */
.fullscreen-viewer {
  position: fixed !important;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(34,24,44,0.97);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  flex-direction: column;
}

.fullscreen-viewer[style*="display: flex"] {
  display: flex !important;
}

.fullscreen-viewer img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  margin: 24px 0;
  display: block;
}

/* Fullscreen navigation and close button */
.fullscreen-title {
  color: #fff;
  font-size: 1.1rem;
  margin-top: 8px;
  letter-spacing: 0.04em;
  text-align: center;
  width: 100%;
}

.close-btn, .arrow {
  position: absolute;
  color: #fff;
  cursor: pointer;
  z-index: 3100;
  transition: color 0.2s;
  background: none;
  border: none;
  user-select: none;
}

.close-btn {
  top: 24px;
  right: 32px;
  font-size: 3.2rem; /* Increased from 2.2rem */
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow {
  top: 50%;
  font-size: 2.2rem;
  padding: 0 12px;
  transform: translateY(-50%);
}
.left-arrow { left: 24px; }
.right-arrow { right: 24px; }

.arrow:hover, .close-btn:hover {
  color: #c2185b;
}

/* --- Responsive Course Gallery Grid --- */

/* Desktop: 3 columns, nice gap */
#course-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px 24px;
  justify-items: center;
  align-items: start;
  margin: 32px auto 40px auto;
  width: 100%;
  max-width: 900px;
}

/* Mobile: 2 columns, smaller gap */
@media (max-width: 900px) {
  #course-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 10px;
    max-width: 98vw;
    margin: 16px auto 24px auto;
    padding: 0 2vw;
  }
}
@media (max-width: 600px) {
  #course-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 6px;
    max-width: 100vw;
    margin: 8px auto 12px auto;
    padding: 0 2vw;
  }
  #course-gallery .gallery-img {
    width: 90vw;
    max-width: 120px;
    height: 90vw;
    max-height: 120px;
  }
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .courses-section {
    padding: 0 2vw;
  }
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .course-box {
    padding: 18px 4vw 18px 4vw;
    min-height: 180px;
  }
  .course-box h3, .course-box h2 {
    font-size: 1.1rem;
  }
  .see-design-btn {
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 8px;
  }
  .category-gallery, #course-gallery {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin: 12px auto 18px auto !important;
    padding: 0 2vw !important;
  }
  .category-gallery .gallery-img,
  #course-gallery .gallery-img {
    width: 90vw;
    max-width: 120px;
    height: 90vw;
    max-height: 120px;
  }
  .fullscreen-viewer img {
    max-width: 98vw;
    max-height: 60vh;
    border-radius: 8px;
  }
  .close-btn, .arrow {
    font-size: 1.5rem;
    top: 8px;
    right: 8px;
    left: 8px;
    padding: 2px 6px;
  }
}

.category-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(34,24,44,0.97); /* Same as collections.css */
  padding: 24px 48px 18px 48px;
  border-bottom: 1.5px solid #e0b3ff;
  position: sticky;
  top: 0;
  z-index: 300;
}

.category-heading {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  color: #ffb347;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 12px #3a2c47;
}

.close-category {
  font-size: 2.5rem;
  color: #ffb347;
  cursor: pointer;
  margin-left: 24px;
  text-shadow: 0 2px 12px #3a2c47;
  transition: color 0.2s;
  background: none;
  border: none;
  line-height: 1;
  position: absolute;
  top: 28px;
  right: 48px;
  z-index: 3100;
}
.close-category:hover {
  color: #e0b3ff;
}

@media (max-width: 600px) {
  .category-header-bar {
    flex-direction: column;
    gap: 8px;
    padding: 12px 4vw 10px 4vw;
  }
  .category-heading {
    font-size: 1.2rem;
    text-align: center;
  }
  .close-category {
    top: 12px;
    right: 12px;
    font-size: 2rem;
  }
}