/* ==========================================================================
   BoomDevs Animated Heading Widget Styles (Elementor Pro Style)
   ========================================================================== */

.boomdevs-animated-heading {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.boomdevs-animated-heading .bd-heading-link {
    color: inherit;
    text-decoration: none;
    display: inline;
}

.boomdevs-animated-heading .bd-word-wrapper {
    display: inline-block;
    position: relative;
    vertical-align: baseline;
}

.boomdevs-animated-heading .bd-plain-text {
    display: inline;
}

/* --------------------------------------------------------------------------
   Highlighted Style (SVG Shapes)
   -------------------------------------------------------------------------- */
.boomdevs-animated-heading .bd-highlighted-text {
    position: relative;
    display: inline-block;
    padding: 0.1em 0.25em;
    z-index: 1;
}

.boomdevs-animated-heading .bd-headline-shape {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% + 20px);
    height: calc(100% + 14px);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    overflow: visible;
}

.boomdevs-animated-heading .bd-headline-shape.bd-shape-front {
    z-index: 2;
}

.boomdevs-animated-heading .bd-headline-shape svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.boomdevs-animated-heading .bd-headline-shape svg path {
    fill: none;
    stroke: #ff3366;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}

.boomdevs-animated-heading.bd-animated-active .bd-headline-shape svg path {
    stroke-dashoffset: 0;
}

/* Specific shape adjustments */
.boomdevs-animated-heading .bd-shape-underline,
.boomdevs-animated-heading .bd-shape-curly,
.boomdevs-animated-heading .bd-shape-double_underline,
.boomdevs-animated-heading .bd-shape-underline_zigzag {
    top: auto;
    bottom: -6px;
    height: 24px;
    transform: translateX(-50%);
}

.boomdevs-animated-heading .bd-shape-strikethrough {
    height: 20px;
}

/* --------------------------------------------------------------------------
   Rotating Style
   -------------------------------------------------------------------------- */
.boomdevs-animated-heading .bd-rotating-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: baseline;
    text-align: left;
}

.boomdevs-animated-heading .bd-rotating-words {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    vertical-align: baseline;
}

.boomdevs-animated-heading .bd-rotating-word {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

/* Typing Effect */
.boomdevs-animated-heading .bd-anim-typing .bd-rotating-word {
    display: inline;
}

.boomdevs-animated-heading .bd-typing-cursor {
    display: inline-block;
    margin-left: 2px;
    color: currentColor;
    font-weight: 300;
    animation: bd-blink 0.8s infinite;
}

@keyframes bd-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Clip Effect */
.boomdevs-animated-heading .bd-anim-clip .bd-rotating-words {
    overflow: hidden;
    vertical-align: bottom;
    padding-right: 2px;
    transition: width 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.boomdevs-animated-heading .bd-anim-clip .bd-clip-border {
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 2px;
    background-color: currentColor;
}

/* Flip Effect (3D) */
.boomdevs-animated-heading .bd-anim-flip {
    perspective: 400px;
}

.boomdevs-animated-heading .bd-anim-flip .bd-rotating-word {
    display: inline-block;
    transform-origin: 50% 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.boomdevs-animated-heading .bd-anim-flip .bd-flip-out {
    transform: rotateX(90deg);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.boomdevs-animated-heading .bd-anim-flip .bd-flip-in {
    transform: rotateX(0deg);
    opacity: 1;
}

/* Slide Effect */
.boomdevs-animated-heading .bd-anim-slide .bd-rotating-words {
    overflow: hidden;
    vertical-align: bottom;
    display: inline-block;
}

.boomdevs-animated-heading .bd-anim-slide .bd-rotating-word {
    display: inline-block;
    transition: transform 0.45s cubic-bezier(0.5, 0, 0.2, 1), opacity 0.45s ease;
}

.boomdevs-animated-heading .bd-anim-slide .bd-slide-out {
    transform: translateY(-110%);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.boomdevs-animated-heading .bd-anim-slide .bd-slide-in {
    transform: translateY(0);
    opacity: 1;
}

/* Drop-In Effect */
.boomdevs-animated-heading .bd-anim-drop_in .bd-rotating-word {
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

.boomdevs-animated-heading .bd-anim-drop_in .bd-drop-out {
    transform: translateY(40px) scale(0.9);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.boomdevs-animated-heading .bd-anim-drop_in .bd-drop-in {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Fade Effect */
.boomdevs-animated-heading .bd-anim-fade .bd-rotating-word {
    display: inline-block;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.boomdevs-animated-heading .bd-anim-fade .bd-fade-out {
    opacity: 0;
    transform: translateY(6px);
    position: absolute;
    top: 0;
    left: 0;
}

.boomdevs-animated-heading .bd-anim-fade .bd-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Zoom Effect */
.boomdevs-animated-heading .bd-anim-zoom .bd-rotating-word {
    display: inline-block;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.boomdevs-animated-heading .bd-anim-zoom .bd-zoom-out {
    transform: scale(0.2);
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.boomdevs-animated-heading .bd-anim-zoom .bd-zoom-in {
    transform: scale(1);
    opacity: 1;
}
