/**
 * Necox Advanced Text (Animasyonlu Metin) — Frontend CSS
 *
 * 11 animasyon tipi (harf bazli), kelime bazli arka plan,
 * text mask (renk/gradient/gorsel/video — slideshow haric),
 * video/slideshow, erisilebilirlik destegi.
 *
 * Orijinal kaynak: Advanced Animated Text Widget for Elementor v1.2.1
 * CSS prefix: necox-atext
 * Varsayilan font degerleri CSS degiskeni ile (fonts.php override eder).
 *
 * @package Necox
 * @since   2.42.0
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   KONTEYNER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: var(--necox-atext-justify, center);
    width: 100%;
    min-height: var(--necox-atext-min-height, 150px);
    overflow: visible;
    text-align: var(--necox-atext-text-align, left);
    padding: var(--necox-atext-padding, 0);
    background: var(--necox-atext-bg, transparent);
    border-width: var(--necox-atext-border-width, 0);
    border-style: solid;
    border-color: var(--necox-atext-border-color, transparent);
    border-radius: var(--necox-atext-border-radius, 0);
    box-shadow: var(--necox-atext-shadow, none);
    backdrop-filter: var(--necox-atext-glass-blur, none);
    -webkit-backdrop-filter: var(--necox-atext-glass-blur, none);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.necox-atext:hover {
    background: var(--necox-atext-hover-bg, var(--necox-atext-bg, transparent));
    border-color: var(--necox-atext-hover-border, var(--necox-atext-border-color, transparent));
    box-shadow: var(--necox-atext-hover-shadow, var(--necox-atext-shadow, none));
    backdrop-filter: var(--necox-atext-glass-hover-blur, var(--necox-atext-glass-blur, none));
    -webkit-backdrop-filter: var(--necox-atext-glass-hover-blur, var(--necox-atext-glass-blur, none));
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   KELIME WRAPPER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__word {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.necox-atext__word.active {
    opacity: 1;
    visibility: visible;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   METIN SPAN
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__text {
    position: relative;
    z-index: 2;
    display: inline-block;
}

/* Font varsayilanlari — fonts.php override eder */
.necox-atext .necox-atext__text {
    font-size: var(--necox-atext-size, 48px);
    font-weight: var(--necox-atext-weight, 700);
    color: var(--necox-atext-color, inherit);
    line-height: 1.2;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HARF ANIMASYONU
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__letter {
    display: inline-block;
    position: relative;
    will-change: transform, opacity;
    transform-origin: center;
}

.necox-atext__word:not(.active) .necox-atext__letter {
    opacity: 0;
}

.necox-atext__word.active .necox-atext__letter {
    opacity: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FALL-RISE (Dusme ve Yukselme)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-letterFallDown {
    0%   { opacity: 0; transform: translateY(-100px) rotateX(-90deg); }
    50%  { opacity: 0.5; }
    100% { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes necox-letterRiseUp {
    0%   { opacity: 0; transform: translateY(100px) rotateX(90deg); }
    50%  { opacity: 0.5; }
    100% { opacity: 1; transform: translateY(0) rotateX(0); }
}
@keyframes necox-letterExitDown {
    0%   { opacity: 1; transform: translateY(0) rotateX(0); }
    50%  { opacity: 0.5; }
    100% { opacity: 0; transform: translateY(100px) rotateX(90deg); }
}
@keyframes necox-letterExitUp {
    0%   { opacity: 1; transform: translateY(0) rotateX(0); }
    50%  { opacity: 0.5; }
    100% { opacity: 0; transform: translateY(-100px) rotateX(-90deg); }
}

.necox-atext__word[data-current-animation="fall-rise"].animating-in .necox-atext__letter.odd {
    animation: necox-letterFallDown var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="fall-rise"].animating-in .necox-atext__letter.even {
    animation: necox-letterRiseUp var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="fall-rise"].animating-out .necox-atext__letter.odd {
    animation: necox-letterExitDown var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="fall-rise"].animating-out .necox-atext__letter.even {
    animation: necox-letterExitUp var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FADE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes necox-fadeOut { from { opacity: 1; } to { opacity: 0; } }

.necox-atext__word[data-current-animation="fade"].animating-in .necox-atext__letter {
    animation: necox-fadeIn var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="fade"].animating-out .necox-atext__letter {
    animation: necox-fadeOut var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SLIDE-LEFT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-slideInLeft  { from { opacity: 0; transform: translateX(100px); }  to { opacity: 1; transform: translateX(0); } }
@keyframes necox-slideOutLeft { from { opacity: 1; transform: translateX(0); }      to { opacity: 0; transform: translateX(-100px); } }

.necox-atext__word[data-current-animation="slide-left"].animating-in .necox-atext__letter {
    animation: necox-slideInLeft var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="slide-left"].animating-out .necox-atext__letter {
    animation: necox-slideOutLeft var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SLIDE-RIGHT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-slideInRight  { from { opacity: 0; transform: translateX(-100px); } to { opacity: 1; transform: translateX(0); } }
@keyframes necox-slideOutRight { from { opacity: 1; transform: translateX(0); }      to { opacity: 0; transform: translateX(100px); } }

.necox-atext__word[data-current-animation="slide-right"].animating-in .necox-atext__letter {
    animation: necox-slideInRight var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="slide-right"].animating-out .necox-atext__letter {
    animation: necox-slideOutRight var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SLIDE-UP
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-slideInUp  { from { opacity: 0; transform: translateY(100px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes necox-slideOutUp { from { opacity: 1; transform: translateY(0); }      to { opacity: 0; transform: translateY(-100px); } }

.necox-atext__word[data-current-animation="slide-up"].animating-in .necox-atext__letter {
    animation: necox-slideInUp var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="slide-up"].animating-out .necox-atext__letter {
    animation: necox-slideOutUp var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SLIDE-DOWN
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-slideInDown  { from { opacity: 0; transform: translateY(-100px); } to { opacity: 1; transform: translateY(0); } }
@keyframes necox-slideOutDown { from { opacity: 1; transform: translateY(0); }      to { opacity: 0; transform: translateY(100px); } }

.necox-atext__word[data-current-animation="slide-down"].animating-in .necox-atext__letter {
    animation: necox-slideInDown var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="slide-down"].animating-out .necox-atext__letter {
    animation: necox-slideOutDown var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ZOOM-IN
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-zoomIn  { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes necox-zoomOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0); } }

.necox-atext__word[data-current-animation="zoom-in"].animating-in .necox-atext__letter {
    animation: necox-zoomIn var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="zoom-in"].animating-out .necox-atext__letter {
    animation: necox-zoomOut var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ZOOM-OUT
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-zoomOutIn  { from { opacity: 0; transform: scale(3); } to { opacity: 1; transform: scale(1); } }
@keyframes necox-zoomOutOut { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(3); } }

.necox-atext__word[data-current-animation="zoom-out"].animating-in .necox-atext__letter {
    animation: necox-zoomOutIn var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="zoom-out"].animating-out .necox-atext__letter {
    animation: necox-zoomOutOut var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ROTATE-IN
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-rotateIn  { from { opacity: 0; transform: rotate(-180deg) scale(0); }  to { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes necox-rotateOut { from { opacity: 1; transform: rotate(0) scale(1); }        to { opacity: 0; transform: rotate(180deg) scale(0); } }

.necox-atext__word[data-current-animation="rotate-in"].animating-in .necox-atext__letter {
    animation: necox-rotateIn var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="rotate-in"].animating-out .necox-atext__letter {
    animation: necox-rotateOut var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FLIP
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-flipIn  { from { opacity: 0; transform: perspective(400px) rotateY(90deg); }  to { opacity: 1; transform: perspective(400px) rotateY(0); } }
@keyframes necox-flipOut { from { opacity: 1; transform: perspective(400px) rotateY(0); }      to { opacity: 0; transform: perspective(400px) rotateY(-90deg); } }

.necox-atext__word[data-current-animation="flip"].animating-in .necox-atext__letter {
    animation: necox-flipIn var(--entry-duration) ease-out forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="flip"].animating-out .necox-atext__letter {
    animation: necox-flipOut var(--exit-duration) ease-in forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BOUNCE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@keyframes necox-bounceIn {
    0%   { opacity: 0; transform: scale(0) translateY(-50px); }
    50%  { transform: scale(1.2) translateY(0); }
    70%  { transform: scale(0.9) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes necox-bounceOut {
    0%   { opacity: 1; transform: scale(1) translateY(0); }
    30%  { transform: scale(1.1) translateY(-10px); }
    100% { opacity: 0; transform: scale(0) translateY(50px); }
}

.necox-atext__word[data-current-animation="bounce"].animating-in .necox-atext__letter {
    animation: necox-bounceIn var(--entry-duration) cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    animation-delay: var(--letter-delay);
}
.necox-atext__word[data-current-animation="bounce"].animating-out .necox-atext__letter {
    animation: necox-bounceOut var(--exit-duration) cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
    animation-delay: var(--letter-delay);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ARKA PLAN
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__word.has-background {
    background-size: cover;
    background-repeat: no-repeat;
}

.necox-atext__word.has-background .necox-atext__text {
    padding: 20px 40px;
    border-radius: 8px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TEXT MASK (renk/gradient/gorsel/video — slideshow HARIC)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__word--mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.necox-atext__word--mask .necox-atext__text {
    position: relative;
    z-index: 3;
    display: inline-block;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .necox-atext__word--mask .necox-atext__text {
        position: relative;
        background-clip: text !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        color: transparent !important;
    }

    /* Mask modunda basit fade — harf animasyonu yok */
    .necox-atext__word--mask {
        transition: opacity var(--entry-duration, 800ms) ease-in-out;
    }
    .necox-atext__word--mask:not(.active) {
        opacity: 0;
    }
    .necox-atext__word--mask.active {
        opacity: 1;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   OVERLAY
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   VIDEO
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__video-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.necox-atext__video-wrap video,
.necox-atext__video-wrap iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Video text mask — SVG mask yaklasimi */
.necox-atext__video-text-mask {
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.necox-atext__word--mask .necox-atext__video-text-mask {
    -webkit-mask-image: linear-gradient(white, white);
    mask-image: linear-gradient(white, white);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SLIDESHOW
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.necox-atext__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.5s ease;
}

.necox-atext__slide.active {
    opacity: 1;
    z-index: 1;
}

/* Slideshow gecis tipleri */
.necox-atext__slideshow--fade .necox-atext__slide {
    transition: opacity 0.5s ease;
}

.necox-atext__slideshow--slide .necox-atext__slide {
    transition: transform 0.5s ease, opacity 0.5s ease;
}
.necox-atext__slideshow--slide .necox-atext__slide:not(.active) {
    transform: translateX(100%);
}

.necox-atext__slideshow--zoom .necox-atext__slide.active {
    animation: necox-zoomSlide 0.5s ease;
}

@keyframes necox-zoomSlide {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Ken Burns */
.necox-atext__slideshow--ken-burns .necox-atext__slide.active {
    animation: necox-kenBurns var(--ken-burns-duration, 10s) var(--ken-burns-easing, linear);
}

@keyframes necox-kenBurns {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(2%, 2%); }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TEXT STROKE + BACKGROUND
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.necox-atext__word.has-text-background.has-stroke .necox-atext__text {
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke-color: inherit;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 1024px) {
    .necox-atext .necox-atext__text {
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .necox-atext .necox-atext__text {
        font-size: 28px;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ERISILEBILIRLIK
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (prefers-reduced-motion: reduce) {
    .necox-atext__word,
    .necox-atext__letter,
    .necox-atext__slide {
        animation: none !important;
        transition: none !important;
    }
    .necox-atext__word {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

@media (prefers-contrast: high) {
    .necox-atext__word {
        text-shadow: none;
    }
}

@media print {
    .necox-atext__word {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: inline !important;
    }
    .necox-atext__word::after {
        content: ' ';
    }
}
