/*
--------------------------------------
Custom Title Widget - Section Header - BEM Methodology
--------------------------------------
*/

/* Block: custom-title */
.custom-title {
    --custom-title-padding-top: 20px;
    --custom-title-padding-bottom: 200px;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: var(--custom-title-padding-top) var(--spacing-xl) var(--custom-title-padding-bottom);
}

.custom-title.custom-title--without-bottom-line {
    --custom-title-padding-bottom: 0px;
}

/* Element: custom-title__header */
.custom-title .custom-title__header {
    text-align: center;
}

/* Element: custom-title__line */
.custom-title .custom-title__line {
    width: 1px;
    height: 190px;
    margin: 0 auto 40px;
    position: relative;
}

/* Element: custom-title__line-wrapper */
.custom-title .custom-title__line-wrapper {
    width: 100%;
    height: 100%;
    background-color: var(--custom-title-line-color, var(--color-accent));
}

/* Pseudo-elements for decorative effect */
.custom-title .custom-title__line:first-child:before {
    content: '';
    position: absolute;
    top: -6px;
    left: -5px;
    width: 12px;
    height: 12px;
    background-color: var(--custom-title-line-color, var(--color-accent));
    border-radius: 50%;
}

.custom-title .custom-title__line:first-child:after {
    content: '';
    position: absolute;
    top: -8px;
    left: -7px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--custom-title-line-color, var(--color-accent));
    animation: ripple 2s ease-out infinite;
}

.custom-title.custom-title--points-none .custom-title__line:first-child:before,
.custom-title.custom-title--points-none .custom-title__line:first-child:after,
.custom-title.custom-title--points-before .custom-title__line:first-child:after,
.custom-title.custom-title--points-after .custom-title__line:first-child:before {
    content: none;
}

@keyframes ripple {
    0%,100% {
        transform: scale(1);
        opacity: 1;
    }

    55% {
        transform: scale(1.5);
        opacity: 0;
    }
    56% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Modifier: last-child line */
.custom-title .custom-title__line:last-child {
    height: 200px;
    position: absolute;
    left: 50%;
}

.custom-title .custom-title__line:last-child .custom-title__line-wrapper {
    background: linear-gradient(180deg, var(--custom-title-line-color, var(--color-accent)) 0%, rgba(255, 255, 255, 0.00) 75.15%);
}

.custom-title.custom-title--point-position-bottom .custom-title__line:first-child:before,
.custom-title.custom-title--point-position-bottom .custom-title__line:first-child:after {
    top: auto;
    opacity: 0;
    transition: opacity 1s ease;
}

.custom-title.custom-title--point-position-bottom .custom-title__line:first-child {
    height: 360px;
}

.custom-title.custom-title--point-position-bottom .custom-title__line:first-child .custom-title__line-wrapper {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.00) 6.25%, var(--color-primary) 87.98%);
}

.custom-title.custom-title--point-position-bottom .custom-title__line:first-child:before {
    bottom: -6px;
}

.custom-title.custom-title--point-position-bottom .custom-title__line:first-child:after {
    bottom: -8px;
    animation-play-state: paused;
}

.custom-title.custom-title--point-position-bottom.custom-title--point-visible .custom-title__line:first-child:before,
.custom-title.custom-title--point-position-bottom.custom-title--point-visible .custom-title__line:first-child:after {
    opacity: 1;
}

.custom-title.custom-title--point-position-bottom.custom-title--point-visible .custom-title__line:first-child:after {
    animation-play-state: running;
}

/* Element: custom-title__title */
.custom-title .custom-title__header .custom-title__title {
    font-family: var(--font-primary);
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-light);
    line-height: 1.2;
    letter-spacing: 2px;
    white-space: pre-line;
    margin: 0 0 30px;
    color: var(--custom-title-text-color, var(--color-text));
}

.custom-title .custom-title__header .custom-title__title strong {
    font-weight: var(--font-weight-bold);
    display: inline-block;
}

/* Character animation styles with native SplitText mask */
.custom-title .custom-title__title strong .custom-title-word-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.custom-title .custom-title__title strong .char {
    display: inline-block;
    vertical-align: bottom;
}

.custom-title .custom-title__title .custom-title-text-surrounding {
    display: inline-block;
    vertical-align: bottom;
}

/* Element: custom-title__subtitle */
.custom-title .custom-title__subtitle {
    font-family: var(--font-secondary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-light);
    line-height: 1.5;
    color: var(--color-text);
    margin: 0 0 40px;
    opacity: 0;
}

.custom-title .custom-title__cta-wrapper {
    display: flex;
    justify-content: center;
    margin: 0 0 5px;
}

.custom-title .custom-title__cta.custom-btn,
.site-container  .elementor-widget-button.custom-btn--no-width a.elementor-button,
.site-container .custom-btn--no-width a.wp-element-button{
    width: auto;
    max-width: none;
}

.site-container  .elementor-widget-button.custom-btn--full-width a.elementor-button,
.site-container .custom-btn--full-width a.wp-element-button{
    width: 100%;
    max-width: none;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}


.custom-title .custom-title__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.custom-title .custom-title__action.custom-btn {
    width: auto;
    max-width: none;
}

.custom-title .custom-title__action.custom-btn{

}

.custom-title .custom-title__cta-wrapper + .custom-title__line,
.custom-title .custom-title__cta-wrapper + .custom-title__actions {
    margin-top: 40px;
}

.custom-title .custom-title__actions + .custom-title__line {
    margin-top: 40px;
}

.custom-title .custom-title__title + .custom-title__line {
    margin-top: 20px;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .custom-title {
        --custom-title-padding-top: 60px;
        --custom-title-padding-bottom: 150px;
        padding: var(--custom-title-padding-top) 24px var(--custom-title-padding-bottom);
    }

    .custom-title .custom-title__line {
        height: 60px;
        margin-bottom: 30px;
    }

    .custom-title .custom-title__line:last-child {
        height: 60px;
    }

    .custom-title.custom-title--point-position-bottom .custom-title__line:first-child {
        height: 90px;
    }

    .custom-title .custom-title__title {
        font-size: 36px;
    }

    .custom-title .custom-title__subtitle {
        font-size: var(--font-size-base);
        margin-bottom: 30px;
    }

    .custom-title .custom-title__cta-wrapper {
        margin-bottom: 30px;
    }

    .custom-title .custom-title__cta-wrapper + .custom-title__line,
    .custom-title .custom-title__cta-wrapper + .custom-title__actions {
        margin-top: 30px;
    }

    .custom-title .custom-title__actions + .custom-title__line {
        margin-top: 30px;
    }

    .custom-title .custom-title__title + .custom-title__line {
        margin-top: 10px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .custom-title {
        --custom-title-padding-top: 40px;
        --custom-title-padding-bottom: 150px;
        padding: var(--custom-title-padding-top) 16px var(--custom-title-padding-bottom);
    }

    .custom-title .custom-title__line {
        height: 60px;
        margin-bottom: var(--spacing-lg);
    }

    .custom-title .custom-title__line:last-child {
        height: 60px;
    }

    .custom-title.custom-title--point-position-bottom .custom-title__line:first-child {
        height: 90px;
    }

    .custom-title .custom-title__title {
        font-size: 28px;
        letter-spacing: 1px;
    }

    .custom-title .custom-title__subtitle {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-lg);
    }

    .custom-title .custom-title__cta-wrapper {
        margin-bottom: var(--spacing-lg);
    }

    .custom-title .custom-title__cta-wrapper + .custom-title__line,
    .custom-title .custom-title__cta-wrapper + .custom-title__actions {
        margin-top: var(--spacing-lg);
    }

    .custom-title .custom-title__actions + .custom-title__line {
        margin-top: var(--spacing-lg);
    }
}
