/*
 * stadum-animations.css
 * All Stadum University–style animation styles
 * for Școala Gimnazială "Dan Iordăchescu" Hlipiceni
 */

/* ═══════════════════════════════════════════
   1. RIPPLE EFFECT ON BUTTONS
   ═══════════════════════════════════════════ */
.ripple-btn {
    position: relative;
    overflow: hidden;
}
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: ripple-anim 0.65s linear;
    pointer-events: none;
}
@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* ═══════════════════════════════════════════
   2. FLOATING BACKGROUND ELEMENTS (HERO)
   ═══════════════════════════════════════════ */
.background-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.background-elements .element {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
}
.background-elements .element-1 {
    width: 500px; height: 500px;
    background: var(--accent-color);
    top: -120px; right: -120px;
    animation: float-slow 8s ease-in-out infinite alternate;
}
.background-elements .element-2 {
    width: 250px; height: 250px;
    background: var(--heading-color);
    bottom: -60px; left: -60px;
    animation: float-slow 10s ease-in-out infinite alternate-reverse;
}
.background-elements .element-3 {
    width: 150px; height: 150px;
    background: var(--accent-color);
    top: 40%; right: 15%;
    animation: float-slow 6s ease-in-out infinite alternate;
}
@keyframes float-slow {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, 20px) scale(1.08); }
}

/* ═══════════════════════════════════════════
   3. FLOATING CARD ENTRANCE & LEVITATE
   ═══════════════════════════════════════════ */
.floating-card {
    animation: levitate 3.5s ease-in-out infinite alternate;
    will-change: transform;
}
.rating-card  { animation-delay: 1s; }
.appointment-card { animation-delay: 0.3s; }
@keyframes levitate {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

/* ═══════════════════════════════════════════
   4. ICON PULSE / BOUNCE ANIMATION
   ═══════════════════════════════════════════ */
.icon-animate {
    animation: icon-bounce 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    20%  { transform: translateY(-12px); }
    40%  { transform: translateY(-6px); }
    60%  { transform: translateY(-10px); }
    80%  { transform: translateY(-3px); }
}
/* Continuous pulse ring on emergency icon */
.emergency-icon {
    position: relative;
}
.emergency-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(211, 34, 77, 0.4);
    animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ═══════════════════════════════════════════
   5. IMAGE REVEAL ON SCROLL
   ═══════════════════════════════════════════ */
.img-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.9s cubic-bezier(0.77, 0, 0.18, 1);
}
.img-revealed {
    clip-path: inset(0 0% 0 0);
}

/* ═══════════════════════════════════════════
   6. SECTION TITLE REVEAL
   ═══════════════════════════════════════════ */
.section-title h2 {
    position: relative;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0;
    height: 3px;
    width: 0;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s;
}
.section-title h2.title-revealed::after,
.section-title:is([data-aos].aos-animate) h2::after {
    width: 60px;
}

/* ═══════════════════════════════════════════
   7. STATS NUMBER ENTRANCE
   ═══════════════════════════════════════════ */
.stat-item {
    transition: transform 0.5s ease;
}
.stats-revealed .stat-item {
    animation: stat-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.stats-revealed .stat-item:nth-child(2) { animation-delay: 0.1s; }
.stats-revealed .stat-item:nth-child(3) { animation-delay: 0.2s; }
@keyframes stat-pop {
    0%   { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

/* ═══════════════════════════════════════════
   8. TRUST BADGE STAGGER ENTRANCE
   ═══════════════════════════════════════════ */
.badge-item {
    opacity: 0;
    transform: translateY(12px);
    animation: badge-enter 0.5s ease forwards;
}
.badge-item:nth-child(1) { animation-delay: 0.5s; }
.badge-item:nth-child(2) { animation-delay: 0.65s; }
.badge-item:nth-child(3) { animation-delay: 0.8s; }
@keyframes badge-enter {
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   9. CARD HOVER GLOW EFFECT
   ═══════════════════════════════════════════ */
.specialty-card,
.department-highlight,
.news-card,
.feature-block {
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}
.specialty-card:hover,
.department-highlight:hover {
    box-shadow: 0 20px 50px rgba(211, 34, 77, 0.12),
                0 8px 24px rgba(8, 25, 51, 0.08) !important;
}
.news-card:hover {
    box-shadow: 0 16px 40px rgba(8, 25, 51, 0.14) !important;
}
.feature-block:hover {
    box-shadow: 0 10px 30px rgba(211, 34, 77, 0.08);
}

/* feature icon hover rotate */
.feature-block:hover .feature-icon i,
.department-highlight:hover .highlight-icon i {
    animation: icon-spin 0.6s ease-in-out;
}
@keyframes icon-spin {
    0%   { transform: rotate(0deg)   scale(1); }
    50%  { transform: rotate(15deg)  scale(1.2); }
    100% { transform: rotate(0deg)   scale(1); }
}

/* ═══════════════════════════════════════════
   10. BUTTON ARROW SLIDE (specialty-link, highlight-cta)
   ═══════════════════════════════════════════ */
.specialty-link i,
.highlight-cta i,
.main-cta i,
.footer-links a::after {
    display: inline-block;
    transition: transform 0.3s ease;
}
.specialty-link:hover i,
.highlight-cta:hover i,
.main-cta:hover i {
    transform: translateX(5px);
}

/* ═══════════════════════════════════════════
   11. TOPBAR ENTRANCE SLIDE-DOWN
   ═══════════════════════════════════════════ */
.topbar-stadum {
    animation: topbar-slide 0.5s ease 0.1s both;
}
@keyframes topbar-slide {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ═══════════════════════════════════════════
   12. HERO CONTENT STAGGERED ENTRANCE
   ═══════════════════════════════════════════ */
.hero-content h1 {
    animation: hero-text-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
}
.hero-content .hero-description {
    animation: hero-text-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.55s both;
}
.hero-content .hero-actions {
    animation: hero-text-in 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s both;
}
@keyframes hero-text-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   13. NAVIGATION DROPDOWN ENHANCED
   ═══════════════════════════════════════════ */
.navmenu .dropdown ul {
    transform-origin: top center;
    animation: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0.25s;
}
.navmenu .dropdown:hover > ul {
    animation: dropdown-in 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
@keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-8px) scaleY(0.95); }
    to   { opacity: 1; transform: translateY(0)    scaleY(1); }
}
.navmenu .dropdown ul a {
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.navmenu .dropdown ul a:hover {
    padding-left: 26px !important;
}

/* nav link underline grow */
.navmenu > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 50%;
    width: 0; height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease, left 0.3s ease;
}
.navmenu > ul > li > a:hover::after,
.navmenu > ul > li > a.active::after {
    width: 100%;
    left: 0;
}

/* ═══════════════════════════════════════════
   14. VIDEO MODAL
   ═══════════════════════════════════════════ */
#stadum-video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
#stadum-video-modal.active {
    visibility: visible;
    opacity: 1;
}
#stadum-video-modal .svm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 25, 51, 0.88);
    backdrop-filter: blur(4px);
}
#stadum-video-modal .svm-content {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 860px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
#stadum-video-modal.active .svm-content {
    transform: scale(1) translateY(0);
}
#stadum-video-modal .svm-close {
    position: absolute;
    top: 12px; right: 16px;
    background: rgba(8, 25, 51, 0.8);
    color: #fff;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
#stadum-video-modal .svm-close:hover { background: var(--accent-color); }
#stadum-video-modal .svm-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}
#stadum-video-modal .svm-video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    border: none;
}
#stadum-video-modal .svm-body {
    padding: 20px;
}
#stadum-video-modal .svm-body:has(.svm-video-wrapper) { padding: 0; }

/* Video popup trigger button */
.video-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--heading-color);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.3s;
}
.video-play-btn .play-icon {
    width: 52px; height: 52px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 0 0 0 rgba(211, 34, 77, 0.5);
    animation: play-pulse 2s ease-out infinite;
    transition: background 0.3s, transform 0.3s;
}
.video-play-btn:hover .play-icon {
    background: #b01a3a;
    transform: scale(1.1);
}
.video-play-btn:hover { color: var(--accent-color); }
@keyframes play-pulse {
    0%   { box-shadow: 0 0 0 0    rgba(211, 34, 77, 0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(211, 34, 77, 0); }
    100% { box-shadow: 0 0 0 0    rgba(211, 34, 77, 0); }
}

/* ═══════════════════════════════════════════
   15. MARQUEE / TICKER
   ═══════════════════════════════════════════ */
.stadum-ticker {
    background: var(--accent-color);
    color: #fff;
    overflow: hidden;
    padding: 10px 0;
    position: relative;
}
.stadum-ticker .ticker-label {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: #081933;
    color: #fff;
    padding: 0 20px;
    display: flex; align-items: center;
    font-weight: 700; font-size: 13px;
    letter-spacing: 0.5px;
    z-index: 1;
    white-space: nowrap;
}
.stadum-ticker .ticker-track {
    display: flex;
    white-space: nowrap;
    animation: ticker-scroll 25s linear infinite;
}
.stadum-ticker .ticker-inner {
    display: flex;
    gap: 60px;
    padding: 0 30px;
    font-size: 14px;
    font-weight: 500;
}
.stadum-ticker .ticker-inner span {
    display: flex; align-items: center; gap: 8px;
}
.stadum-ticker .ticker-inner span i {
    opacity: 0.8;
}
.stadum-ticker .ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════
   16. TOAST NOTIFICATION
   ═══════════════════════════════════════════ */
#stadum-toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.stadum-toast {
    background: #fff;
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 8px 30px rgba(8,25,51,0.15);
    font-size: 14px;
    color: var(--heading-color);
    min-width: 280px;
    max-width: 380px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.stadum-toast.toast-visible {
    opacity: 1;
    transform: translateX(0);
}
.stadum-toast-success { border-color: #22c55e; }
.stadum-toast-error   { border-color: var(--accent-color); }
.stadum-toast button {
    background: none; border: none;
    color: #999; font-size: 18px; cursor: pointer;
    padding: 0; margin-left: auto; flex-shrink: 0;
    line-height: 1;
}
.stadum-toast button:hover { color: var(--heading-color); }

/* ═══════════════════════════════════════════
   17. ACCENT LINE ON CARDS / HIGHLIGHT BOXES
   ═══════════════════════════════════════════ */
.department-highlight {
    position: relative;
    overflow: hidden;
}
.department-highlight::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 3px;
    background: var(--accent-color);
    transition: width 0.5s ease;
}
.department-highlight:hover::before { width: 100%; }

/* ═══════════════════════════════════════════
   18. EXPERIENCE BADGE ROTATE PULSE
   ═══════════════════════════════════════════ */
.experience-badge {
    animation: badge-rotate 6s linear infinite;
}
@keyframes badge-rotate {
    0%, 90%, 100% { transform: rotate(0deg) scale(1); }
    45%            { transform: rotate(5deg) scale(1.05); }
}

/* ═══════════════════════════════════════════
   19. SPECIALTY VISUAL OVERLAY APPEAR
   ═══════════════════════════════════════════ */
.specialty-visual .visual-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 25, 51, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.specialty-visual .visual-overlay i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
    transform: scale(0.7);
    transition: transform 0.35s ease;
}
.specialty-card:hover .specialty-visual .visual-overlay { opacity: 1; }
.specialty-card:hover .specialty-visual .visual-overlay i { transform: scale(1); }
.specialty-visual {
    position: relative;
    overflow: hidden;
}

/* ═══════════════════════════════════════════
   20. FOOTER ROW STAGGER REVEAL
   ═══════════════════════════════════════════ */
.footer-stadum-main .col-lg-4,
.footer-stadum-main .col-6,
.footer-stadum-main .col-lg-2 {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.footer-visible .footer-stadum-main .col-lg-4,
.footer-visible .footer-stadum-main .col-6,
.footer-visible .footer-stadum-main .col-lg-2 {
    opacity: 1;
    transform: translateY(0);
}
.footer-visible .footer-stadum-main .col-lg-4   { transition-delay: 0.1s; }
.footer-visible .footer-stadum-main .col-6:nth-child(2) { transition-delay: 0.2s; }
.footer-visible .footer-stadum-main .col-6:nth-child(3) { transition-delay: 0.3s; }
.footer-visible .footer-stadum-main .col-lg-2:nth-child(4) { transition-delay: 0.4s; }
.footer-visible .footer-stadum-main .col-lg-2:nth-child(5) { transition-delay: 0.5s; }

/* ═══════════════════════════════════════════
   21. BACK TO TOP ENHANCED
   ═══════════════════════════════════════════ */
#backToTop {
    transition: transform 0.3s ease, opacity 0.3s ease !important;
}
#backToTop:hover {
    transform: translateY(-4px) !important;
}

/* ═══════════════════════════════════════════
   22. SMOOTH PAGE TRANSITION OVERLAY
   ═══════════════════════════════════════════ */
#page-transition {
    position: fixed;
    inset: 0;
    background: var(--accent-color);
    z-index: 99999;
    transform: scaleY(1);
    transform-origin: top;
    animation: page-reveal 0.6s cubic-bezier(0.77, 0, 0.18, 1) 0.1s forwards;
    pointer-events: none;
}
@keyframes page-reveal {
    0%   { transform: scaleY(1); transform-origin: top; }
    100% { transform: scaleY(0); transform-origin: top; }
}

/* ═══════════════════════════════════════════
   23. HERO TYPED CURSOR
   ═══════════════════════════════════════════ */
.hero-typed-word::after {
    content: '|';
    display: inline-block;
    animation: cursor-blink 0.8s step-end infinite;
    color: var(--accent-color);
    font-weight: 300;
    margin-left: 2px;
}
@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ═══════════════════════════════════════════
   24. SOCIAL ICON BOUNCE
   ═══════════════════════════════════════════ */
.footer-social-icons a:hover {
    animation: social-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes social-bounce {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════
   25. ACCESSIBILITY — REDUCE MOTION
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
.a11y-reduce-motion *, .a11y-reduce-motion *::before, .a11y-reduce-motion *::after {
    animation: none !important;
    transition: none !important;
}
.a11y-pause-animations * {
    animation-play-state: paused !important;
}
