.cctg-categories-grid-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: var(--edubin-elementor-container-width, 1200px);
  margin: 0 auto;
}
.cctg-category-card-wrapper {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}
.cctg-category-card {
  position: relative;
  background: var(--edubin-color-white, #fff);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: all var(--edubin-transition, 0.3s) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--edubin-shadow-01, 0 4px 16px rgba(0, 0, 0, 0.1));
  display: flex;
  flex-direction: column;
  height: 320px;
  min-height: 320px;
  max-height: 320px;
  padding: 0.5rem 0 1.2rem 0;
}
.cctg-category-card:hover {
  transform: scale(1.03);
  box-shadow: var(--edubin-shadow-dark, 0 12px 32px rgba(0, 0, 0, 0.14));
}
.cctg-category-card-header {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  justify-content: flex-start;
  margin-bottom: 1.2rem;
  display: flex;
  min-height: 0;
  max-height: none;
  height: 100%;
}
.cctg-category-card-image {
  width: 100%;
  aspect-ratio: 3/1;
  border-radius: 12px;
  object-fit: cover;
  background: var(--edubin-color-shade, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: auto;
}
.cctg-category-card-image svg {
  width: 72px;
  height: 72px;
  display: block;
  margin: auto;
  padding: 0;
}
/* Banner style for categories with images */
.cctg-category-card-header .cctg-has-image {
  width: 100%;
  aspect-ratio: 3/1;
  border-radius: 12px;
  padding: 0;
  background: none;
  margin-bottom: 0.5rem;
  display: block;
  height: auto;
}
.cctg-category-card-header .cctg-has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
/* When image is present, stack image above title */
.cctg-category-card-header .cctg-has-image + .cctg-category-card-title {
  margin-left: 0;
  margin-top: 0.5rem;
  flex: 1;
  text-align: center;
}
/* When image is present, make header column layout */
.cctg-category-card-header {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.cctg-category-card-title {
  font-size: var(--edubin-h4, 20px);
  color: var(--edubin-heading-color, #021e40);
  font-weight: var(--edubin-p-extra-bold, 800);
  margin: 0;
  flex: 1;
  text-align: center;
}
.cctg-category-card-desc {
  margin: 1.25rem 0 0;
  color: var(--edubin-color-body, #696868);
  font-size: var(--edubin-font-size-b1, 16px);
  text-align: center;
  line-height: var(--edubin-line-height-b1, 1.73);
  font-weight: var(--edubin-p-medium, 500);
}
.cctg-category-card .cctg-cat-btn {
  display: inline-block;
  color: var(--edubin-primary-color, #09523b);
  font-weight: var(--edubin-p-bold, 700);
  font-size: var(--edubin-font-size-b1, 16px);
  border-bottom: 2px solid var(--edubin-primary-color-alt, #ff4830);
  padding-bottom: 4px;
  margin-top: 1.5rem;
  transition: all var(--edubin-transition, 0.3s) ease;
  letter-spacing: 0.5px;
}
.cctg-category-card-media-area {
  width: 100%;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--edubin-color-shade, #f5f5f5);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  min-height: 0;
}
.cctg-category-card-media-area .cctg-category-card-image,
.cctg-category-card-media-area .cctg-has-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border-radius: 0;
  padding: 0;
}
.cctg-category-card-media-area .cctg-has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  display: block;
}
.cctg-category-card-media-area .cctg-category-card-image svg {
  width: 72px;
  height: 72px;
  display: block;
  margin: auto;
}
@media (max-width: 900px) {
  .cctg-categories-grid-cards {
    gap: 1.2rem;
  }
  .cctg-category-card-wrapper {
    max-width: 98vw;
    min-width: 220px;
  }
  .cctg-category-card {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
  }
  .cctg-category-card-title {
    font-size: 1.1rem;
  }
  .cctg-category-card-desc {
    font-size: 1rem;
  }
  .cctg-category-card .cctg-cat-btn {
    font-size: 1rem;
  }
}
@media (max-width: 600px) {
  .cctg-categories-grid-cards {
    gap: 0.7rem;
  }
  .cctg-category-card-wrapper {
    max-width: 99vw;
    min-width: 160px;
  }
  .cctg-category-card {
    height: 180px;
    min-height: 180px;
    max-height: 180px;
  }
  .cctg-category-card-title {
    font-size: 1rem;
  }
  .cctg-category-card-desc {
    font-size: 0.95rem;
  }
  .cctg-category-card .cctg-cat-btn {
    font-size: 0.95rem;
  }
}
