/**
 * Categories page: hero with "Our Categories" + 3-column grid of image-background cards
 */

.categories-main {
  padding: 0;
  max-width: none;
}

/* Hero section */
.categories-hero {
  position: relative;
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.categories-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.categories-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
}

.categories-hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .categories-hero {
    min-height: 280px;
  }
}

/* Categories section + grid */
.categories-section {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 3rem 20px 4rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 100%;
}

@media (min-width: 600px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 900px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Card: image as background, rounded corners, centered content */
.category-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 240px;
  border: 2px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, border-width 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(12, 164, 140, 0.2);
  border-color: var(--color-teal);
  border-width: 2px;
}

/* Same typewriter cursor style as homepage hero */
.category-card-name-cursor {
  visibility: hidden;
  color: var(--color-teal);
  font-weight: 300;
  animation: category-cursor-blink 0.8s step-end infinite;
}
@keyframes category-cursor-blink {
  50% { opacity: 0; }
}

.category-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.category-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.category-card-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  box-sizing: border-box;
}

.category-card-name {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.3;
}

.category-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  background: var(--gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(12, 164, 140, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover .category-card-btn {
  box-shadow: 0 4px 16px rgba(12, 164, 140, 0.45);
  transform: translateY(-2px);
}

.categories-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 2rem;
  margin: 0;
}
