/**
 * Split Headline Widget Styles
 */

.split-headline-wrapper {
    display: block;
}

.split-headline {
    margin: 0;
    padding: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    width: auto;
}

/* Line wrappers */
.split-headline-line-1,
.split-headline-line-2,
.split-headline-line-3 {
    display: inline-block;
}

/* Animated line wrapper */
.split-headline-animated {
    display: inline-flex !important;
    align-items: center;
    position: relative;
}

/* Text elements */
.split-headline-first,
.split-headline-second-text,
.split-headline-third-text {
    display: inline-block;
}

/* Hide animated text until JS wraps it - prevents flash */
.split-headline-animated .split-headline-first,
.split-headline-animated .split-headline-second-text,
.split-headline-animated .split-headline-third-text {
    visibility: hidden;
}

/* Show text once it's been wrapped by JS */
.split-headline-animated .split-headline-first.js-wrapped,
.split-headline-animated .split-headline-second-text.js-wrapped,
.split-headline-animated .split-headline-third-text.js-wrapped {
    visibility: visible;
}

/* Masked slide-up animation - each line is a mask */
.split-line {
    position: relative;
    overflow: hidden;
    display: block;
}

.split-line-inner {
    display: inline-block;
}

.split-word {
    display: inline-block;
}

.split-headline-line {
    display: inline-block;
    will-change: transform;
}

/* Remove transition - GSAP will handle all animations */
.split-headline-line,
.split-headline-first,
.split-headline-second-text,
.split-headline-third-text,
.split-line,
.split-line-inner {
    transition: none;
}

/* Line breaks - force flex items to wrap to new line */
.split-headline-break {
    flex-basis: 100%;
    width: 100%;
    height: 0;
    display: block;
}

/* Alignment support - wrapper respects text-align for inline-flex child */
.split-headline-wrapper[style*="text-align: left"] {
    text-align: left;
}

.split-headline-wrapper[style*="text-align: center"] {
    text-align: center;
}

.split-headline-wrapper[style*="text-align: right"] {
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .split-headline {
        flex-direction: column;
        align-items: flex-start;
    }

    .split-headline-wrapper[style*="text-align: center"] .split-headline {
        align-items: center;
    }

    .split-headline-wrapper[style*="text-align: right"] .split-headline {
        align-items: flex-end;
    }
}
