/**
 * Global Heading Block Widget Styles - Professional Redesign
 *
 * @package PWZ_Theme
 * @since 1.0.0
 */

/* ============================================
   ELEMENTOR COMPATIBILITY & OVERFLOW FIX
   ============================================ */

.elementor-widget-pwz-heading-block {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.elementor-widget-pwz-heading-block .elementor-widget-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
    overflow: hidden;
}

/* ============================================
   MAIN CONTAINER
   ============================================ */

.pwz-heading-block {
    margin-bottom: 50px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.pwz-heading-wrapper {
    position: relative;
    padding: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    box-sizing: border-box;
}

.pwz-heading-wrapper:hover {
    transform: translateY(-3px);
}

/* ============================================
   SUBTITLE
   ============================================ */

.pwz-heading-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--pwz-font-heading);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--pwz-accent);
    margin-bottom: 20px;
    padding: 10px 24px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    width: auto;
}

.pwz-heading-subtitle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3), transparent);
    transition: left 0.8s ease;
}

.pwz-heading-wrapper:hover .pwz-heading-subtitle {
    background: rgba(0, 255, 136, 0.12);
    border-color: var(--pwz-accent);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.3);
    transform: translateY(-2px);
}

.pwz-heading-wrapper:hover .pwz-heading-subtitle::before {
    left: 100%;
}

.pwz-subtitle-line {
    width: 30px;
    height: 1px;
    background: var(--pwz-accent);
    display: inline-block;
    position: relative;
    transition: all 0.5s ease;
}

.pwz-subtitle-line::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 4px;
    height: 4px;
    background: var(--pwz-accent);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
}

.pwz-line-left::before {
    left: 0;
}

.pwz-line-right::before {
    right: 0;
}

.pwz-heading-wrapper:hover .pwz-subtitle-line {
    width: 45px;
}

.pwz-heading-wrapper:hover .pwz-subtitle-line::before {
    box-shadow: 0 0 15px rgba(0, 255, 136, 1);
    animation: pulse-line 1.5s ease-in-out infinite;
}

@keyframes pulse-line {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.5);
    }
}

.pwz-subtitle-text {
    position: relative;
    z-index: 1;
    padding: 0 8px;
}

/* ============================================
   TITLE
   ============================================ */

.pwz-heading-title {
    font-family: var(--pwz-font-heading);
    font-size: 42px;
    font-weight: 700;
    color: var(--pwz-primary-text);
    line-height: 1.25;
    margin-bottom: 20px;
    position: relative;
    display: block;
    transition: all 0.4s ease;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pwz-title-text {
    position: relative;
    z-index: 2;
    display: inline-block;
    background: linear-gradient(135deg, #FFFFFF 0%, #E0E0E0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.5s ease;
    max-width: 100%;
    word-wrap: break-word;
}

.pwz-heading-wrapper:hover .pwz-title-text {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--pwz-accent) 50%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.pwz-title-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
    pointer-events: none;
    filter: blur(20px);
}

.pwz-heading-wrapper:hover .pwz-title-glow {
    opacity: 1;
}


/* ============================================
   DIVIDER
   ============================================ */

.pwz-heading-divider-wrapper {
    margin: 30px 0;
}

.pwz-heading-divider {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.pwz-divider-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--pwz-accent), transparent);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.pwz-divider-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #FFFFFF, transparent);
    transition: left 0.8s ease;
}

.pwz-heading-wrapper:hover .pwz-divider-line {
    width: 60px;
}

.pwz-heading-wrapper:hover .pwz-divider-line::before {
    left: 100%;
}

.pwz-divider-dot {
    width: 8px;
    height: 8px;
    background: var(--pwz-accent);
    border-radius: 50%;
    position: relative;
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.pwz-divider-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--pwz-accent);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.4s ease;
}

.pwz-heading-wrapper:hover .pwz-divider-dot {
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
}

.pwz-heading-wrapper:hover .pwz-divider-dot::before {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.5);
}

.pwz-heading-wrapper:hover .pwz-dot-left {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.pwz-heading-wrapper:hover .pwz-dot-center {
    animation: pulse-dot 1.5s ease-in-out 0.2s infinite;
}

.pwz-heading-wrapper:hover .pwz-dot-right {
    animation: pulse-dot 1.5s ease-in-out 0.4s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1.6);
    }
}

/* ============================================
   DESCRIPTION
   ============================================ */

.pwz-heading-description {
    font-family: var(--pwz-font-body);
    font-size: 16px;
    color: var(--pwz-secondary-text);
    line-height: 1.8;
    max-width: 800px;
    position: relative;
    transition: all 0.4s ease;
}

.pwz-heading-description p {
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.pwz-heading-wrapper:hover .pwz-heading-description {
    color: #FFFFFF;
}

.pwz-heading-wrapper:hover .pwz-heading-description p {
    transform: translateX(5px);
}

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */

.pwz-heading-decoration {
    position: absolute;
    width: 40px;
    height: 40px;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pwz-decoration-tl {
    top: 0;
    left: 0;
    border-top: 2px solid var(--pwz-accent);
    border-left: 2px solid var(--pwz-accent);
    border-top-left-radius: 8px;
}

.pwz-decoration-br {
    bottom: 0;
    right: 0;
    border-bottom: 2px solid var(--pwz-accent);
    border-right: 2px solid var(--pwz-accent);
    border-bottom-right-radius: 8px;
}

.pwz-heading-wrapper:hover .pwz-heading-decoration {
    opacity: 1;
}

.pwz-heading-wrapper:hover .pwz-decoration-tl {
    transform: translate(-8px, -8px);
}

.pwz-heading-wrapper:hover .pwz-decoration-br {
    transform: translate(8px, 8px);
}

/* ============================================
   ALIGNMENT
   ============================================ */

.pwz-heading-block.pwz-text-left {
    text-align: left;
}

.pwz-heading-block.pwz-text-left .pwz-heading-subtitle,
.pwz-heading-block.pwz-text-left .pwz-heading-title,
.pwz-heading-block.pwz-text-left .pwz-heading-divider-wrapper,
.pwz-heading-block.pwz-text-left .pwz-heading-description {
    margin-left: 0;
    margin-right: auto;
}

.pwz-heading-block.pwz-text-center {
    text-align: center;
}

.pwz-heading-block.pwz-text-center .pwz-heading-subtitle,
.pwz-heading-block.pwz-text-center .pwz-heading-title,
.pwz-heading-block.pwz-text-center .pwz-heading-divider-wrapper,
.pwz-heading-block.pwz-text-center .pwz-heading-description {
    margin-left: auto;
    margin-right: auto;
}

.pwz-heading-block.pwz-text-right {
    text-align: right;
}

.pwz-heading-block.pwz-text-right .pwz-heading-subtitle,
.pwz-heading-block.pwz-text-right .pwz-heading-title,
.pwz-heading-block.pwz-text-right .pwz-heading-divider-wrapper,
.pwz-heading-block.pwz-text-right .pwz-heading-description {
    margin-left: auto;
    margin-right: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .pwz-heading-wrapper {
        padding: 18px;
    }

    .pwz-heading-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .pwz-heading-block {
        margin-bottom: 35px;
        max-width: 100%;
    }

    .pwz-heading-wrapper {
        padding: 16px;
        max-width: 100%;
    }

    .pwz-heading-subtitle {
        font-size: 11px;
        letter-spacing: 2px;
        padding: 8px 16px;
        gap: 10px;
        margin-bottom: 16px;
        max-width: 100%;
    }

    .pwz-subtitle-line {
        width: 20px;
    }

    .pwz-heading-wrapper:hover .pwz-subtitle-line {
        width: 30px;
    }

    .pwz-heading-title {
        font-size: 28px;
        margin-bottom: 16px;
        max-width: 100%;
    }

    .pwz-divider-line {
        width: 30px;
    }

    .pwz-heading-wrapper:hover .pwz-divider-line {
        width: 40px;
    }

    .pwz-heading-description {
        font-size: 14px;
        max-width: 100%;
    }

    .pwz-heading-decoration {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .pwz-heading-block {
        margin-bottom: 25px;
        max-width: 100%;
    }

    .pwz-heading-wrapper {
        padding: 12px;
        max-width: 100%;
    }

    .pwz-heading-subtitle {
        font-size: 10px;
        letter-spacing: 1.5px;
        padding: 6px 12px;
        gap: 8px;
        margin-bottom: 12px;
        max-width: 100%;
    }

    .pwz-subtitle-line {
        width: 15px;
    }

    .pwz-heading-wrapper:hover .pwz-subtitle-line {
        width: 25px;
    }

    .pwz-heading-title {
        font-size: 24px;
        margin-bottom: 14px;
        max-width: 100%;
    }

    .pwz-divider-line {
        width: 25px;
        gap: 10px;
    }

    .pwz-divider-dot {
        width: 6px;
        height: 6px;
    }

    .pwz-heading-description {
        font-size: 13px;
        max-width: 100%;
    }

    .pwz-heading-decoration {
        width: 24px;
        height: 24px;
    }
}


