/* Entrance and hover effects of the public pages. Entrances use "translate" and "scale", which
   leave "transform" to hovering and to the designs. Run "npm run rtl" after changing this file. */

@media (prefers-reduced-motion: no-preference) {

    /* The page arrives. */
    .header-area {
        animation: motion-drop .5s ease backwards;
    }

    .header-area ~ section {
        animation: motion-fade .5s ease backwards;
    }

    .teacher-badge,
    .teacher-title,
    .teacher-subtitle,
    .teacher-hero .teacher-actions {
        animation: motion-rise .7s cubic-bezier(.2, .7, .3, 1) backwards;
    }

    .teacher-title { animation-delay: .12s; }
    .teacher-subtitle { animation-delay: .24s; }
    .teacher-hero .teacher-actions { animation-delay: .36s; }

    .teacher-portrait {
        animation: motion-grow .9s cubic-bezier(.2, .7, .3, 1) .15s backwards;
    }

    /* The signs pop up around the photo, then float. */
    .teacher-sign {
        animation: motion-pop .5s cubic-bezier(.3, 1.6, .5, 1) backwards, motion-float 3.2s ease-in-out infinite alternate;
    }

    .teacher-sign-1 { animation-delay: .6s, 1.1s; }
    .teacher-sign-2 { animation-delay: .75s, 1.6s; }
    .teacher-sign-3 { animation-delay: .9s, 2.1s; }
    .teacher-sign-4 { animation-delay: 1.05s, 1.3s; }
    .teacher-sign-5 { animation-delay: 1.2s, 1.9s; }

    .teacher-whatsapp::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 2px solid #25d366;
        animation: motion-pulse 2.2s ease-out infinite;
        pointer-events: none;
    }

    /* Parts further down arrive when they are scrolled to; partials/site/motion marks them. */
    .reveal:not(.reveal-in) {
        opacity: 0;
    }

    .reveal-in {
        animation: motion-rise .7s cubic-bezier(.2, .7, .3, 1) var(--reveal-delay, 0ms) backwards;
    }

    /* Moving under the pointer. */
    .teacher-btn,
    .eBtn,
    .teacher-grade,
    .teacher-course,
    .teacher-course > img,
    .teacher-feature,
    .teacher-feature i,
    .teacher-grade i,
    .teacher-steps > li,
    .teacher-steps > li > span,
    .teacher-review,
    .about-credential,
    .about-certificate,
    .about-story-picture,
    .teacher-stats li,
    .teacher-portrait img,
    .teacher-whatsapp,
    .Ecard,
    .Ecard .courses-img img,
    .contact-card,
    .contact-card .contact-icon,
    .logo-image img,
    .primary-end > div > a,
    .sub-header .right-sub li > a,
    .f-socials li a,
    .footer-area .footer-widget li a {
        transition: translate .3s ease, scale .3s ease, rotate .3s ease, transform .3s ease, box-shadow .3s ease,
            background-color .3s ease, color .3s ease, border-color .3s ease, filter .3s ease, padding .3s ease;
    }
}

/* The links of the header grow a line under the pointer. */
.header-area .main-menu-ul > li > a {
    padding-block: 4px;
    background: linear-gradient(currentColor, currentColor) no-repeat center bottom / 0 2px;
    transition: background-size .3s ease, color .3s ease;
}

.header-area .main-menu-ul > li:hover > a,
.header-area .main-menu-ul > li > a:focus-visible {
    background-size: 100% 2px;
    color: var(--brand-primary, #0062b7);
}

.teacher-course > div {
    position: relative;
    z-index: 1;
    background: #fff;
}

/* Pointers that can hover only: on a touch screen a tap would leave the effect behind. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {

    .teacher-btn:hover,
    .eBtn:hover {
        translate: 0 -3px;
        box-shadow: 0 12px 24px rgba(15, 23, 42, .18);
    }

    .teacher-btn:active,
    .eBtn:active {
        translate: 0;
        scale: .97;
    }

    .teacher-grade:hover i {
        scale: 1.25;
        rotate: 8deg;
    }

    .teacher-course:hover,
    .Ecard:hover {
        translate: 0 -8px;
        box-shadow: 0 22px 44px color-mix(in srgb, var(--brand-primary, #0062b7) 22%, transparent);
    }

    .teacher-course:hover > img,
    .Ecard:hover .courses-img img {
        scale: 1.07;
    }

    .Ecard .courses-img {
        overflow: hidden;
    }

    .teacher-feature:hover,
    .teacher-steps > li:hover,
    .teacher-review:hover,
    .about-credential:hover,
    .about-certificate:hover,
    .contact-card:hover {
        translate: 0 -8px;
        box-shadow: 0 20px 40px color-mix(in srgb, var(--brand-primary, #0062b7) 20%, transparent);
    }

    .teacher-feature:hover i {
        background: var(--brand-primary, #0062b7);
        color: #fff;
        rotate: 8deg;
        scale: 1.1;
    }

    .teacher-steps > li:hover > span,
    .contact-card:hover .contact-icon {
        scale: 1.18;
    }

    .teacher-stats li:hover {
        scale: 1.08;
    }

    .about-story-picture:hover,
    .teacher-portrait:hover img {
        scale: 1.02;
    }

    .teacher-home .accordion-button:hover {
        background-color: var(--brand-primary-tint, #f2f8ff);
        color: var(--brand-primary, #0062b7);
    }

    .teacher-whatsapp:hover {
        scale: 1.12;
    }

    .logo-image a:hover img {
        scale: 1.06;
    }

    .primary-end > div > a:hover,
    .sub-header .right-sub li > a:hover,
    .f-socials li a:hover {
        translate: 0 -4px;
    }

    .footer-area .footer-widget li a:hover {
        padding-inline-start: 6px;
    }
}

@media print {
    .reveal:not(.reveal-in) {
        opacity: 1;
    }
}

@keyframes motion-rise {
    from { opacity: 0; translate: 0 28px; }
}

@keyframes motion-drop {
    from { opacity: 0; translate: 0 -100%; }
}

@keyframes motion-fade {
    from { opacity: 0; }
}

@keyframes motion-grow {
    from { opacity: 0; scale: .88; }
}

@keyframes motion-pop {
    from { opacity: 0; scale: 0; }
}

@keyframes motion-float {
    to { translate: 0 -12px; }
}

@keyframes motion-pulse {
    from { opacity: .9; scale: 1; }
    to { opacity: 0; scale: 1.6; }
}
