/* ============================================
   ANIMATION STYLES FOR ADVANCED HEADING
   ============================================ */

/* Advanced Heading Base Styles */
.ate-advanced-heading,
.elementor-widget-ate_advanced_heading .ate-advanced-heading {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
}

.elementor-widget-ate_advanced_heading .ate-heading-line {
    margin: 0 !important;
    padding: 0 !important;
}

.ate-heading-line {
    display: block;
    width: 100%;
}

.ate-line-inner {
    display: block;
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    /* preserve user-intended spaces and line breaks */
}

.ate-segment {
    display: block;
    width: 100%;
}

.ate-segment-inner {
    display: block;
    margin: 0;
    padding: 0;
}

/* Fade In Animation */
.ate-advanced-heading.ate-animation-fade .ate-heading-line {
    opacity: 0;
    animation: ate-fade-in var(--ate-duration, 800ms) var(--ate-easing, ease-out) forwards;
    animation-delay: calc(var(--line-index, 0) * var(--ate-delay, 200ms));
}

/* Slide Up Animation */
.ate-advanced-heading.ate-animation-slide-up .ate-heading-line {
    opacity: 0;
    transform: translateY(30px);
    animation: ate-slide-up var(--ate-duration, 800ms) var(--ate-easing, ease-out) forwards;
    animation-delay: calc(var(--line-index, 0) * var(--ate-delay, 200ms));
}

/* Slide Down Animation */
.ate-advanced-heading.ate-animation-slide-down .ate-heading-line {
    opacity: 0;
    transform: translateY(-30px);
    animation: ate-slide-down var(--ate-duration, 800ms) var(--ate-easing, ease-out) forwards;
    animation-delay: calc(var(--line-index, 0) * var(--ate-delay, 200ms));
}

@keyframes ate-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes ate-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ate-slide-down {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE BREAK CONTROL
   ============================================ */

/* Desktop */
@media (min-width: 1025px) {

    .ate-break-desktop-yes .ate-segment,
    .ate-break-desktop-yes .ate-separator {
        white-space: normal;
    }

    .ate-break-desktop- .ate-segment,
    .ate-break-desktop-no .ate-segment,
    .ate-break-desktop- .ate-separator,
    .ate-break-desktop-no .ate-separator {
        white-space: nowrap;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 768px) {

    .ate-break-tablet-yes .ate-segment,
    .ate-break-tablet-yes .ate-separator {
        white-space: normal;
    }

    .ate-break-tablet- .ate-segment,
    .ate-break-tablet-no .ate-segment,
    .ate-break-tablet- .ate-separator,
    .ate-break-tablet-no .ate-separator {
        white-space: nowrap;
    }
}

/* Mobile */
@media (max-width: 767px) {

    .ate-break-mobile-yes .ate-segment,
    .ate-break-mobile-yes .ate-separator {
        white-space: normal;
    }

    .ate-break-mobile- .ate-segment,
    .ate-break-mobile-no .ate-segment,
    .ate-break-mobile- .ate-separator,
    .ate-break-mobile-no .ate-separator {
        white-space: nowrap;
    }
}

/* ============================================
   RESPONSIVE UTILITIES FOR ADVANCED HEADING
   ============================================ */

@media (max-width: 1024px) {
    .ate-heading-line[data-display-tablet="none"] {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .ate-heading-line[data-display-mobile="none"] {
        display: none !important;
    }
}

/* Responsive visibility helpers */
.ate-hide-on-desktop {
    display: none;
}

@media (max-width: 1024px) {
    .ate-hide-on-tablet {
        display: none !important;
    }

    .ate-show-on-tablet {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .ate-hide-on-mobile {
        display: none !important;
    }

    .ate-show-on-mobile {
        display: block !important;
    }
}

/* ============================================
   EDITOR RESPONSIVE PREVIEW HELPERS
   ============================================ */

.elementor-device-tablet .ate-heading-line[data-display-tablet="none"],
.elementor-device-mobile .ate-heading-line[data-display-mobile="none"] {
    opacity: 0.3;
    position: relative;
}

.elementor-device-tablet .ate-heading-line[data-display-tablet="none"]::after,
.elementor-device-mobile .ate-heading-line[data-display-mobile="none"]::after {
    content: 'HIDDEN';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ff0000;
    color: #fff;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    pointer-events: none;
}