/**
 * Scroll-based Animation Effects
 * Modern fade-in, slide, and reveal animations for front page sections
 */

/* ========================================
   Animation Base Styles
   ======================================== */

/* Elements waiting to animate */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translate(0, 0) !important;
}

/* ========================================
   Fade Animations
   ======================================== */
.fade-up {
    transform: translateY(60px);
}

.fade-down {
    transform: translateY(-60px);
}

.fade-left {
    transform: translateX(60px);
}

.fade-right {
    transform: translateX(-60px);
}

.fade-in {
    transform: scale(0.95);
}

/* ========================================
   Zoom Animations
   ======================================== */
.zoom-in {
    transform: scale(0.8);
}

.zoom-out {
    transform: scale(1.1);
}

/* ========================================
   Staggered Children Animations
   ======================================== */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.stagger-children.animated > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animated > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animated > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animated > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animated > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animated > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.animated > * {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Section-Specific Animations
   ======================================== */

/* Welcome Section */
.front-page-text-box-wrap .about-section {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.front-page-text-box-wrap .icon-labels {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.2s;
}

.front-page-text-box-wrap.animated .about-section,
.front-page-text-box-wrap.animated .icon-labels {
    opacity: 1;
    transform: translateX(0);
}

/* Service Items */
.service-item {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.front-page-text-box-wrap.animated .service-item:nth-child(1) { transition-delay: 0.3s; }
.front-page-text-box-wrap.animated .service-item:nth-child(2) { transition-delay: 0.4s; }
.front-page-text-box-wrap.animated .service-item:nth-child(3) { transition-delay: 0.5s; }
.front-page-text-box-wrap.animated .service-item:nth-child(4) { transition-delay: 0.6s; }

.front-page-text-box-wrap.animated .service-item {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Parallax Divider Section */


.divide-paralax .container {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out 0.3s;
}

.divide-paralax.animated .container {
    opacity: 1;
    transform: translateY(0);
}

/* Our Menu / Facilities Section */


.our-menu h3 {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.our-menu.animated h3 {
    opacity: 1;
    transform: translateY(0);
}

.cover-bottom-links a {
    opacity: 0;
    transform: translateY(50px) rotate(-2deg);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.our-menu.animated .cover-bottom-links a:nth-child(1) { transition-delay: 0.2s; }
.our-menu.animated .cover-bottom-links a:nth-child(2) { transition-delay: 0.35s; }
.our-menu.animated .cover-bottom-links a:nth-child(3) { transition-delay: 0.5s; }
.our-menu.animated .cover-bottom-links a:nth-child(4) { transition-delay: 0.65s; }

.our-menu.animated .cover-bottom-links a {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

.facilities-more {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out 0.8s;
}

.our-menu.animated .facilities-more {
    opacity: 1;
    transform: translateY(0);
}

/* Facility Images Hover Effect */
.facltyimg {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.cover-bottom-links a:hover .facltyimg {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Bottom Info Section */

.bottom-info-section-wrap .bottom-img {
    opacity: 0;
    transform: translateX(-40px) rotate(-3deg);
    transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}

.embed-yt.animated .bottom-img {
    opacity: 1;
    transform: translateX(0) rotate(0);
}

.bottom-info-section {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.7s ease-out 0.4s;
}

.embed-yt.animated .bottom-info-section {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   Search Box Animation
   ======================================== */
.suitesync-search-box-wrap {
    animation: slideUpFadeCentered 1s ease-out 0.5s both;
}

@keyframes slideUpFadeCentered {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   Banner Title Animation
   ======================================== */
.main-bg-title-overlay h1,
.parallax-content h2 {
    animation: fadeInScale 1.2s ease-out 0.3s both;
}

/* Slide content text animation - preserves centering transform */
.slide-content {
    animation: slideTextReveal 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
}

.slide-content b {
    display: inline-block;
    animation: slideTextGlow 1.5s ease-out 0.5s both;
}

.slidelink.active .slide-content {
    animation: slideTextReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.slidelink.active .slide-content b {
    animation: slideTextGlow 1s ease-out 0.2s both;
}

@keyframes slideTextReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    50% {
        opacity: 1;
        clip-path: inset(0 50% 0 0);
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

@keyframes slideTextGlow {
    0% {
        opacity: 0;
        text-shadow: none;
        letter-spacing: 0.3em;
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
        letter-spacing: 0.15em;
    }
    100% {
        opacity: 1;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
        letter-spacing: normal;
    }
}

.parallax-content p {
    animation: fadeInUp 1s ease-out 0.6s both;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Hover Micro-interactions
   ======================================== */
.service-item {
    cursor: pointer;
}

.service-item:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

.service-item:hover .service-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Button Hover Effects */
.facilities-more,
#trigger {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.facilities-more:hover,
#trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Smooth Scroll Behavior
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* ========================================
   Reduced Motion Preference
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .front-page-text-box-wrap .about-section,
    .front-page-text-box-wrap .icon-labels,
    .service-item,
    .divide-paralax,
    .our-menu,
    .cover-bottom-links a,
    .embed-yt,
    .bottom-info-section-wrap .bottom-img,
    .bottom-info-section {
        opacity: 1;
        transform: none;
        transition: none;
        animation: none;
    }
}
