/* =============================================
   Petsure Section Title Widget
   Subheading + animated heading + description
   Inspired by Petona section-title pattern
   ============================================= */

.petsure-section-title-wrapper {
    max-width: 100%;
}

/* === Subheading === */
.petsure-section-subheading-wrap {
    margin-bottom: 10px;
    text-align: center;
}

.petsure-section-subheading {
    display: inline-flex;
    gap: 8px;
    font-size: 14px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--petsure-secondary) !important;
    margin: 0 !important;
    line-height: 1.4;
}

.petsure-section-subheading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    fill: currentColor;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.petsure-section-subheading-icon i {
    font-size: 14px;
}

.petsure-section-subheading-icon svg {
    width: 16px;
    height: 16px;
}

/* === Heading === */
.petsure-section-heading {
    font-size: 42px !important;
    font-weight: 700;
    color: var(--petsure-primary) !important;
    margin: 0 0 16px 0 !important;
    line-height: 1.2;
    text-align: center;
}

/* Split-letter animation: each letter wrapped in <span> by JS */
.petsure-section-heading.petsure-heading-animate .petsure-char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.petsure-section-heading.petsure-heading-animate.petsure-heading-fade-up .petsure-char {
    transform: translateY(30px);
}

.petsure-section-heading.petsure-heading-animate.petsure-heading-slide-up .petsure-char {
    opacity: 1;
    transform: translateY(80px);
}

/* When visible via IntersectionObserver, animate in */
.petsure-section-heading.petsure-heading-animate.petsure-heading-visible .petsure-char {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay for each character */
.petsure-section-heading.petsure-heading-animate.petsure-heading-visible .petsure-char {
    transition-delay: calc(var(--char-index, 0) * 0.04s);
}

/* Word-level spacing preserved */
.petsure-section-heading .petsure-word {
    display: inline-block;
    white-space: nowrap;
}

/* === Description === */
.petsure-section-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--petsure-text);
    margin: 0 !important;
    text-align: center;
}

/* Fade in animation on scroll */
.petsure-section-description.petsure-desc-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease 0.3s, transform 0.7s ease 0.3s;
}

.petsure-section-description.petsure-desc-fade-in.petsure-desc-visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Responsive === */
@media (max-width: 1024px) {
    .petsure-section-heading {
        font-size: 34px !important;
    }
}

@media (max-width: 767px) {
    .petsure-section-heading {
        font-size: 26px !important;
    }

    .petsure-section-subheading {
        font-size: 12px;
        letter-spacing: 3px;
    }
}

/* Spacing utility classes (replaces inline wrapper_style) */
.petsure-section-title-wrapper.petsure-section-title-mb-sm {
    margin-bottom: 32px;
}

.petsure-section-title-wrapper.petsure-section-title-mb-md {
    margin-bottom: 40px;
}

@media (prefers-reduced-motion: reduce) {

    .petsure-section-heading.petsure-heading-animate .petsure-char,
    .petsure-section-description.petsure-desc-fade-in {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}