/* Templates Home Page Styles */

.templates-hero {
  padding: 120px 0 100px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.templates-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.1) 50%, transparent 70%);
  border-radius: 50%;
  animation: heroFloat 8s ease-in-out infinite;
  filter: blur(60px);
  z-index: 0;
}

.templates-hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(59, 130, 246, 0.08) 50%, transparent 70%);
  border-radius: 50%;
  animation: heroFloat 10s ease-in-out infinite reverse;
  filter: blur(60px);
  z-index: 0;
}

@keyframes heroFloat {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(20px, -20px);
  }
  50% {
    transform: translate(-20px, 20px);
  }
  75% {
    transform: translate(20px, 10px);
  }
}

/* Hero Content Styles */
.templates-hero .hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  z-index: 2;
  text-align: center;
}

.templates-hero .section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--white);
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  margin-bottom: var(--spacing-lg);
}

.templates-hero .section-badge i {
  color: var(--primary-color);
  font-size: 1.125rem;
}

.templates-hero .section-badge span {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color);
}

.templates-hero .hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--fw-extrabold);
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.templates-hero .gradient-text {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: var(--fw-extrabold);
}

.templates-hero .hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  margin-top: 1.5rem;
  line-height: 1.6;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.templates-hero .hero-features {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 0;
  flex-wrap: wrap;
}

.templates-hero .hero-feature {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--white);
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary-color);
}

.templates-hero .hero-feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
  border-color: var(--primary-color);
}

.templates-hero .hero-feature i {
  color: var(--primary-color);
  font-size: 1.125rem;
  transition: transform 0.3s ease;
}

.templates-hero .hero-feature:hover i {
  transform: scale(1.1);
}

/* ==================== TEMPLATE CATEGORIES SECTION ==================== */
.templates-categories-section {
  padding: 100px 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
  position: relative;
}

.templates-section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.templates-section-header h2 {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.templates-section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.templates-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Template Category Card - Matches Service Card Design */
.template-category-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  gap: 1.5rem;
}

.template-category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99, 102, 241, 0.3);
}

.template-category-card.trending {
  border: 2px solid var(--accent-color);
}

.template-featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-color);
  color: var(--white);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  z-index: 2;
}

.template-category-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}

.template-category-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.template-category-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0;
  line-height: 1.3;
}

.template-category-description {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.template-category-footer {
  padding-top: 1rem;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
}

.template-category-cta {
  color: var(--accent-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
  font-size: 0.9375rem;
}

.template-category-card:hover .template-category-cta {
  gap: 0.75rem;
}

.template-category-cta i {
  transition: transform 0.3s ease;
}

.template-category-card:hover .template-category-cta i {
  transform: translateX(4px);
}

/* Empty State */
.no-templates {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
  font-size: 1.125rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .templates-hero-title {
    font-size: 2rem;
  }

  .templates-hero-subtitle {
    font-size: 1rem;
  }

  .templates-categories-section {
    padding: 80px 0;
  }

  .templates-section-header h2 {
    font-size: 2rem;
  }

  .templates-section-header p {
    font-size: 1rem;
  }

  .templates-categories-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .template-category-card {
    padding: 1.5rem;
  }
}

