/**
 * Hero Animation Styles
 *
 * Styles for the animated hero section with rotating categories
 *
 * @package Legacy Theme
 */

/* Hero Section */
.hero-animated {
  position: relative;
  background: var(--color-primary, #1a237e);
  color: #fff;
  overflow: hidden;
}

.hero-container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem 3.5rem;
}

@media (min-width: 640px) {
  .hero-container {
    padding-top: 3rem;
    padding-bottom: 5rem;
  }
}

.hero-content {
  max-width: 36rem;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
}

.hero-badge-icon {
  width: 0.875rem;
  height: 0.875rem;
}

/* Title */
.hero-title {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (min-width: 640px) {
  .hero-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3rem;
  }
}

/* Category Rotator */
.hero-category-rotator {
  display: block;
  position: relative;
  height: 2.5rem;
  overflow: hidden;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .hero-category-rotator {
    height: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-category-rotator {
    height: 3.5rem;
  }
}

.hero-category-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  width: fit-content;
}

.hero-category-item.is-active {
  opacity: 1;
  transform: translateY(0);
}

.hero-category-item.is-exiting {
  opacity: 0;
  transform: translateY(-20px);
}

.hero-category-item svg.hero-category-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .hero-category-item svg.hero-category-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
}

.hero-category-name {
  font-weight: 600;
  color: #fff;
}

/* Subtitle */
.hero-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 36rem;
}

@media (min-width: 640px) {
  .hero-subtitle {
    font-size: 1.25rem;
  }
}

/* CTAs */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-1px);
}

.hero-cta:active {
  transform: translateY(0);
}

.hero-cta-primary {
  background: var(--color-cta, #2e7d32);
  color: #fff;
}

.hero-cta-primary:hover {
  background: var(--color-cta-hover, #1b5e20);
  color: #fff;
}

.hero-cta-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.hero-cta-icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.5rem;
}

/* Pause on hover for accessibility */
.hero-category-rotator:hover .hero-category-item.is-active,
.hero-animated:focus-within .hero-category-item.is-active {
  /* Animation will be paused via JavaScript */
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hero-category-item {
    transition: none;
  }

  .hero-cta {
    transition: none;
  }
}

/* No-JS fallback: show first category only */
.no-js .hero-category-item {
  position: relative;
  opacity: 1;
  transform: none;
}

.no-js .hero-category-item:not(:first-child) {
  display: none;
}

/* Hero with Image - Two column layout */
.hero-animated.has-hero-image .hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .hero-animated.has-hero-image .hero-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-animated.has-hero-image .hero-container {
    gap: 4rem;
  }
}

.hero-animated.has-hero-image .hero-content {
  flex: 1;
  max-width: 100%;
}

@media (min-width: 768px) {
  .hero-animated.has-hero-image .hero-content {
    max-width: 50%;
  }
}

/* Hero Image - Hidden on mobile, visible only on desktop */
.hero-image {
  display: none;
}

@media (min-width: 768px) {
  .hero-image {
    display: block;
    flex: 1;
    max-width: 50%;
    width: 100%;
  }
}

.hero-image-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  max-height: 400px;
  border-radius: 0.75rem;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

@media (min-width: 768px) {
  .hero-image-img {
    max-height: 450px;
  }
}

@media (min-width: 1024px) {
  .hero-image-img {
    max-height: 320px;
  }

  .hero-image {
    flex: 0 0 auto;
    max-width: 350px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .hero-animated.has-hero-image .hero-container {
    justify-content: space-between;
    align-items: center;
  }

  .hero-animated.has-hero-image .hero-content {
    flex: 1;
    max-width: 55%;
  }
}
