/**
 * Yiontech Title Heading Widget Styles
 */

.yiontech-title-heading {
    margin: 0;
    padding: 0;
    line-height: 1.2;
    position: relative;
    display: block; /* Changed from inline-block to block */
    font-weight: 700;
    transition: all 0.3s ease;
    width: 100%; /* Ensure full width for proper alignment */
}

/* Gradient Glow Style - Original Implementation */
.yiontech-title-heading span.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 50% 100%;
    transition: background-size 0.3s ease;
    display: inline; /* Keep inline for gradient text */
}

.yiontech-title-heading span.gradient-text:hover {
    background-size: 100% 100%;
}

/* 3D Extrude Style */
.yiontech-title-extrude .extrude-text {
    position: relative;
    display: inline-block;
    color: #fff;
}

.yiontech-title-extrude .extrude-text::before {
    content: attr(data-text);
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: -1;
    color: #3b82f6;
    transition: all 0.3s ease;
}

.yiontech-title-extrude .extrude-text::after {
    content: attr(data-text);
    position: absolute;
    left: 16px;
    top: 16px;
    z-index: -2;
    color: rgba(59, 130, 246, 0.5);
    transition: all 0.3s ease;
}

.yiontech-title-extrude .extrude-text:hover {
    transform: translate(-4px, -4px);
}

.yiontech-title-extrude .extrude-text:hover::before {
    left: 12px;
    top: 12px;
}

.yiontech-title-extrude .extrude-text:hover::after {
    left: 24px;
    top: 24px;
}

/* Glitch Effect Style */
.yiontech-title-glitch .glitch-text {
    position: relative;
    display: inline-block;
    color: #fff;
}

.yiontech-title-glitch .glitch-text::before,
.yiontech-title-glitch .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.yiontech-title-glitch .glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.yiontech-title-glitch .glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00ffff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(65px, 9999px, 119px, 0);
    }
    20% {
        clip: rect(29px, 9999px, 16px, 0);
    }
    40% {
        clip: rect(79px, 9999px, 88px, 0);
    }
    60% {
        clip: rect(53px, 9999px, 29px, 0);
    }
    80% {
        clip: rect(86px, 9999px, 73px, 0);
    }
    100% {
        clip: rect(18px, 9999px, 25px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(32px, 9999px, 88px, 0);
    }
    20% {
        clip: rect(76px, 9999px, 17px, 0);
    }
    40% {
        clip: rect(13px, 9999px, 85px, 0);
    }
    60% {
        clip: rect(51px, 9999px, 73px, 0);
    }
    80% {
        clip: rect(40px, 9999px, 28px, 0);
    }
    100% {
        clip: rect(12px, 9999px, 60px, 0);
    }
}

/* Typewriter Style */
.yiontech-title-typewriter .typewriter-text {
    position: relative;
    display: inline-block;
}

.yiontech-title-typewriter .typewriter-text::after {
    content: '|';
    position: absolute;
    right: -10px;
    top: 0;
    animation: blink 1s infinite;
}

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

/* Neon Pulse Style */
.yiontech-title-neon .neon-text {
    color: #00ffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff,
        0 0 40px #0088ff;
    position: relative;
    display: inline-block;
    animation: neon-pulse 2s infinite alternate;
}

.yiontech-title-neon .neon-text:hover {
    animation: none;
    text-shadow: 
        0 0 15px #00ffff,
        0 0 25px #00ffff,
        0 0 35px #00ffff,
        0 0 45px #0088ff,
        0 0 55px #0088ff;
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow: 
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #00ffff,
            0 0 40px #0088ff;
    }
    50% {
        text-shadow: 
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00ffff,
            0 0 20px #0088ff;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .yiontech-title-heading {
        font-size: 32px !important;
    }
}

@media (max-width: 480px) {
    .yiontech-title-heading {
        font-size: 24px !important;
    }
    
    .yiontech-title-extrude .extrude-text::before {
        left: 4px;
        top: 4px;
    }
    
    .yiontech-title-extrude .extrude-text::after {
        left: 8px;
        top: 8px;
    }
}