/**
 * Dermis 365 Pure - Treatment Categories Grid Component Stylesheet
 * Award-Winning Paru UI Concept: Luxury Image-Overlay Cards with Gold Accents (#CDAD7B)
 */

.cat-grid-section {
  position: relative;
  padding: 95px 0;
  background-color: var(--color-cream-bg, #FAF8F5);
  color: var(--color-text-dark, #1C1D1F);
}

.cat-grid-section .sec-head .sup {
  color: var(--color-gold-primary, #CDAD7B);
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-size: 0.825rem;
}

.cat-grid-section .sec-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  color: var(--color-text-dark, #1C1D1F);
}

.cat-grid-section .sec-head h2 em {
  color: var(--color-gold-primary, #CDAD7B);
  font-style: italic;
}

.cat-grid-desc {
  max-width: 680px;
  margin: 16px auto 0;
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  color: var(--color-text-muted, #4A4E57);
}

.cat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 45px;
}

.cat-overlay-card {
  position: relative;
  height: 380px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-overlay-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.16);
}

.cat-card-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.cat-card-bg-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cat-overlay-card:hover .cat-card-bg-wrap img {
  transform: scale(1.06);
}

.cat-card-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(28, 29, 31, 0.35) 0%, 
    rgba(28, 29, 31, 0.75) 60%, 
    rgba(28, 29, 31, 0.92) 100%
  );
  z-index: 2;
  transition: background 0.35s ease;
}

.cat-overlay-card:hover .cat-card-gradient-overlay {
  background: linear-gradient(180deg, 
    rgba(28, 29, 31, 0.25) 0%, 
    rgba(28, 29, 31, 0.7) 50%, 
    rgba(28, 29, 31, 0.95) 100%
  );
}

.cat-card-inner {
  position: relative;
  z-index: 3;
  padding: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #FFFFFF;
}

.cat-card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-count-pill {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(205, 173, 123, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 99px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cat-arrow-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.3s ease, background 0.3s ease;
}

.cat-overlay-card:hover .cat-arrow-badge {
  background: var(--color-gold-primary, #CDAD7B);
  transform: translateX(4px);
}

.cat-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
  line-height: 1.25;
}

.cat-card-desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 768px) {
  .cat-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cat-overlay-card {
    height: 320px;
  }
}
