/**
 * Section Heading Component - Shared Styles
 * Standardized heading and divider for all sections
 *
 * @package Flavor_Starter
 */

/* ========================================
   Section Heading - Base
   ======================================== */
.ta-section-heading {
  text-align: center;
  margin-bottom: var(--space-12, 3rem);
}

.ta-section-heading__title {
  margin: 0 0 var(--space-6, 1.5rem) 0;
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: var(--leading-tight, 1.25);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.ta-section-heading__subtitle {
  margin: var(--space-4, 1rem) auto 0;
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: var(--leading-relaxed, 1.75);
  max-width: 600px;
  opacity: 0.9;
}

/* ========================================
   Divider with Star Icon
   ======================================== */
.ta-section-heading__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4, 1rem);
  margin: 0;
}

.ta-section-heading__divider-line {
  flex: 0 0 100px;
  height: 1px;
  position: relative;
}

.ta-section-heading__divider-line--left {
  background: linear-gradient(
    90deg,
    transparent 0%,
    #FFC200 100%
  );
}

.ta-section-heading__divider-line--right {
  background: linear-gradient(
    90deg,
    #FFC200 0%,
    transparent 100%
  );
}

.ta-section-heading__divider-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  animation: ta-star-pulse 2s ease-in-out infinite;
}

@keyframes ta-star-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

/* ========================================
   White Variant (for dark backgrounds)
   ======================================== */
.ta-section-heading--white .ta-section-heading__title {
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ta-section-heading--white .ta-section-heading__subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.ta-section-heading--white .ta-section-heading__divider-icon {
  color: #FFC200;
}

/* ========================================
   Black Variant (for light backgrounds)
   ======================================== */
.ta-section-heading--black .ta-section-heading__title {
  color: var(--gray-900, #111827);
}

.ta-section-heading--black .ta-section-heading__subtitle {
  color: var(--gray-600, #4b5563);
}

.ta-section-heading--black .ta-section-heading__divider-icon {
  color: var(--primary, #1A3A5B);
}

.ta-section-heading--black .ta-section-heading__divider-line--left {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--primary, #1A3A5B) 100%
  );
}

.ta-section-heading--black .ta-section-heading__divider-line--right {
  background: linear-gradient(
    90deg,
    var(--primary, #1A3A5B) 0%,
    transparent 100%
  );
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 640px) {
  .ta-section-heading__divider-line {
    flex: 0 0 60px;
  }

  .ta-section-heading__divider {
    gap: var(--space-3, 0.75rem);
  }

  .ta-section-heading__divider-icon {
    width: 20px;
    height: 20px;
  }
}
