/* ═══════════════════════════════════════════════════════════════════════════
   TEDUCAS Logo Widget — Elementor
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Base & layout ── */
.teducas-logo-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.teducas-logo-wrapper a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.teducas-logo-wrapper .teducas-logo-normal,
.teducas-logo-wrapper .teducas-logo-sticky {
    display: block;
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

/* ── Sticky toggling & smooth crossfade ── */

/* If sticky logo is not present in settings, keep fallback hidden */
.teducas-logo-wrapper:not(.teducas-logo-has-sticky) .teducas-logo-sticky {
    display: none;
}

/* Smooth transition when a separate sticky logo exists */
.teducas-logo-wrapper.teducas-logo-has-sticky a {
    position: relative;
}

.teducas-logo-wrapper.teducas-logo-has-sticky .teducas-logo-sticky {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.teducas-logo-wrapper.teducas-logo-has-sticky .teducas-logo-normal {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.elementor-sticky--effects .teducas-logo-wrapper.teducas-logo-has-sticky .teducas-logo-normal,
.elementor-sticky--effects.teducas-logo-wrapper.teducas-logo-has-sticky .teducas-logo-normal {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.elementor-sticky--effects .teducas-logo-wrapper.teducas-logo-has-sticky .teducas-logo-sticky,
.elementor-sticky--effects.teducas-logo-wrapper.teducas-logo-has-sticky .teducas-logo-sticky {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ── Hover effects ── */
.teducas-logo-hover-zoom-in:hover img {
    transform: scale(1.05);
}

.teducas-logo-wrapper.teducas-logo-has-sticky.teducas-logo-hover-zoom-in:hover .teducas-logo-sticky {
    transform: translate(-50%, -50%) scale(1.05);
}

.teducas-logo-hover-glow:hover img {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
}

.teducas-logo-hover-brightness:hover img {
    filter: brightness(1.15);
}

.teducas-logo-hover-tilt:hover img {
    transform: rotate(2deg) scale(1.02);
}

.teducas-logo-wrapper.teducas-logo-has-sticky.teducas-logo-hover-tilt:hover .teducas-logo-sticky {
    transform: translate(-50%, -50%) rotate(2deg) scale(1.02);
}

/* ── Filter modes ── */
.teducas-logo-filter-grayscale_to_color img {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.teducas-logo-filter-grayscale_to_color:hover img {
    filter: grayscale(0%);
}

@media (prefers-color-scheme: dark) {
    .teducas-logo-filter-invert_dark img {
        filter: invert(1);
    }
}

:root[data-theme="dark"] .teducas-logo-filter-invert_dark img,
body.dark .teducas-logo-filter-invert_dark img {
    filter: invert(1);
}

/* ── Sticky transition variants ── */

/* Slide down */
.teducas-logo-wrapper.teducas-sticky-slide-down .teducas-logo-sticky {
    transform: translate(-50%, -80%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
}

.elementor-sticky--effects .teducas-logo-wrapper.teducas-sticky-slide-down .teducas-logo-sticky,
.elementor-sticky--effects.teducas-logo-wrapper.teducas-sticky-slide-down .teducas-logo-sticky {
    transform: translate(-50%, -50%);
    opacity: 1;
    visibility: visible;
}

.elementor-sticky--effects .teducas-logo-wrapper.teducas-sticky-slide-down .teducas-logo-normal,
.elementor-sticky--effects.teducas-logo-wrapper.teducas-sticky-slide-down .teducas-logo-normal {
    transform: translateY(30%);
    opacity: 0;
    visibility: hidden;
}

/* Scale in */
.teducas-logo-wrapper.teducas-sticky-scale-in .teducas-logo-sticky {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
}

.elementor-sticky--effects .teducas-logo-wrapper.teducas-sticky-scale-in .teducas-logo-sticky,
.elementor-sticky--effects.teducas-logo-wrapper.teducas-sticky-scale-in .teducas-logo-sticky {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.elementor-sticky--effects .teducas-logo-wrapper.teducas-sticky-scale-in .teducas-logo-normal,
.elementor-sticky--effects.teducas-logo-wrapper.teducas-sticky-scale-in .teducas-logo-normal {
    transform: scale(0.7);
    opacity: 0;
    visibility: hidden;
}

