/* ========================================
   ADVANCED ANIMATIONS & EFFECTS
   Professional Government Website
   ======================================== */

/* ========================================
   ENTRANCE ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(60px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-60px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-80px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(120px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-120px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CONTINUOUS ANIMATIONS
   ======================================== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-25px);
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes bounce-gentle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.85;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 25px rgba(255, 107, 107, 0.4);
    }

    50% {
        box-shadow: 0 0 50px rgba(199, 125, 255, 0.6);
    }
}

@keyframes rotate-360 {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes swing {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(8deg);
    }

    75% {
        transform: rotate(-8deg);
    }
}

/* ========================================
   SHIMMER & SHINE EFFECTS
   ======================================== */
@keyframes shimmer {
    0% {
        background-position: -1200px 0;
    }

    100% {
        background-position: 1200px 0;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   BORDER ANIMATIONS
   ======================================== */
@keyframes border-dance {

    0%,
    100% {
        border-color: #FF6B6B;
    }

    33% {
        border-color: #C77DFF;
    }

    66% {
        border-color: #FFD166;
    }
}

@keyframes border-glow {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(255, 107, 107, 0.5);
    }

    50% {
        box-shadow: 0 0 30px rgba(199, 125, 255, 0.7);
    }
}

/* ========================================
   BACKGROUND ANIMATIONS
   ======================================== */
@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes bg-pulse {

    0%,
    100% {
        background-color: rgba(255, 107, 107, 0.05);
    }

    50% {
        background-color: rgba(199, 125, 255, 0.08);
    }
}

/* ========================================
   TEXT ANIMATIONS
   ======================================== */
@keyframes text-glow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    }

    50% {
        text-shadow: 0 0 25px rgba(199, 125, 255, 0.8);
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
@keyframes scroll-horizontal {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-vertical {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100%);
    }
}

/* ========================================
   HOVER EFFECTS
   ======================================== */
@keyframes hover-lift {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-15px);
    }
}

@keyframes hover-scale {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes dots {

    0%,
    20% {
        content: '.';
    }

    40% {
        content: '..';
    }

    60%,
    100% {
        content: '...';
    }
}

/* ========================================
   PARTICLE EFFECTS
   ======================================== */
@keyframes particle-float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* ========================================
   WAVE ANIMATIONS
   ======================================== */
@keyframes wave {
    0% {
        transform: translateX(0) translateY(0);
    }

    50% {
        transform: translateX(-25%) translateY(-10px);
    }

    100% {
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   CARD FLIP ANIMATIONS
   ======================================== */
@keyframes flip-in {
    0% {
        transform: rotateY(90deg);
        opacity: 0;
    }

    100% {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

@keyframes flip-out {
    0% {
        transform: rotateY(0deg);
        opacity: 1;
    }

    100% {
        transform: rotateY(90deg);
        opacity: 0;
    }
}

/* ========================================
   UTILITY ANIMATION CLASSES
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.hover-float:hover {
    animation: float 2s ease-in-out infinite;
}

.hover-pulse:hover {
    animation: pulse 1.5s ease-in-out infinite;
}

.hover-glow:hover {
    animation: pulse-glow 2s ease-in-out infinite;
}

.hover-rotate:hover {
    animation: rotate-360 0.6s ease-in-out;
}

.hover-swing:hover {
    animation: swing 1s ease-in-out;
}

.shimmer-effect {
    background: linear-gradient(90deg,
            rgba(255, 107, 107, 0.1) 0%,
            rgba(199, 125, 255, 0.2) 50%,
            rgba(255, 107, 107, 0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.gradient-animate {
    background: linear-gradient(-45deg,
            #FF6B6B,
            #FFB088,
            #C77DFF,
            #FFD166);
    background-size: 400% 400%;
    animation: gradient-flow 8s ease infinite;
}

/* ========================================
   STAGGER ANIMATIONS
   ======================================== */
.stagger-item {
    animation: fadeInUp 0.8s ease-out both;
}

.stagger-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-item:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-item:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-item:nth-child(6) {
    animation-delay: 0.6s;
}

.stagger-item:nth-child(7) {
    animation-delay: 0.7s;
}

.stagger-item:nth-child(8) {
    animation-delay: 0.8s;
}

.stagger-item:nth-child(9) {
    animation-delay: 0.9s;
}

.stagger-item:nth-child(10) {
    animation-delay: 1s;
}

/* ========================================
   ENTRANCE DELAY CLASSES
   ======================================== */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

.delay-900 {
    animation-delay: 0.9s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* ========================================
   DURATION CLASSES
   ======================================== */
.duration-fast {
    animation-duration: 0.3s;
}

.duration-normal {
    animation-duration: 0.6s;
}

.duration-slow {
    animation-duration: 1s;
}

.duration-slower {
    animation-duration: 1.5s;
}

.duration-slowest {
    animation-duration: 2s;
}

/* ========================================
   INFINITE ANIMATIONS
   ======================================== */
.infinite-float {
    animation: float 4s ease-in-out infinite;
}

.infinite-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.infinite-rotate {
    animation: rotate-slow 20s linear infinite;
}

.infinite-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.infinite-bounce {
    animation: bounce-gentle 2s ease-in-out infinite;
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(80px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-zoom {
    opacity: 0;
    transform: scale(0.8);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-zoom.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   INTERACTIVE ANIMATIONS
   ======================================== */
.interactive-card {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.interactive-card:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: 0 25px 60px rgba(255, 107, 107, 0.3);
}

.interactive-button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.interactive-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.interactive-button:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   SPECIAL EFFECTS
   ======================================== */
.glow-on-hover {
    transition: all 0.4s ease;
}

.glow-on-hover:hover {
    box-shadow:
        0 0 20px rgba(255, 107, 107, 0.5),
        0 0 40px rgba(199, 125, 255, 0.3),
        0 0 60px rgba(255, 209, 102, 0.2);
}

.border-animate {
    position: relative;
    border: 3px solid transparent;
}

.border-animate::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, #FF6B6B, #C77DFF, #FFD166, #FF6B6B);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    animation: gradient-flow 4s ease infinite;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */
.will-animate {
    will-change: transform, opacity;
}

.gpu-accelerate {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ========================================
   REDUCED MOTION SUPPORT
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}