/* ========================================
   LOADING SCREEN & PAGE TRANSITIONS
   ======================================== */

/* (Page loader removed - styles deleted to avoid initial white rectangle flash) */

/* ========================================
   ANIMATED BACKGROUND PATTERNS
   ======================================== */

.animated-bg {
    position: relative;
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(142, 36, 170, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    z-index: 0;
}

.animated-bg>* {
    position: relative;
    z-index: 1;
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

/* Floating particles effect */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(142, 36, 170, 0.3);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 5s;
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 2.5s;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 4.5s;
}

.particle:nth-child(9) {
    left: 90%;
    animation-delay: 1.5s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    50% {
        transform: translateY(-100vh) rotate(180deg);
        opacity: 0.8;
    }

    90% {
        opacity: 0.3;
    }
}

/* Wave animation for sections */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.wave-divider .shape-fill {
    fill: #FFFFFF;
}

/* ========================================
   SMOOTH SCROLL & TRANSITIONS
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* Fade-in on scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale on hover effects */
.hover-scale {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* ========================================
   LAZY LOAD IMAGE EFFECTS
   ======================================== */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded,
img.lazyloaded {
    opacity: 1;
}

/* Image blur-up effect */
img.blur-up {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

img.blur-up.loaded {
    filter: blur(0);
}

/* ========================================
   GRADIENT TEXT EFFECTS
   ======================================== */

.gradient-text {
    background: linear-gradient(135deg, #8E24AA 0%, #6A1B9A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(90deg, #8E24AA, #6A1B9A, #8E24AA);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ========================================
   CARD ANIMATIONS
   ======================================== */

.animated-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(142, 36, 170, 0.3) !important;
}

/* Card shimmer effect */
.card-shimmer {
    position: relative;
    overflow: hidden;
}

.card-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: left 0.5s ease;
}

.card-shimmer:hover::after {
    left: 100%;
}

/* ========================================
   BUTTON RIPPLE EFFECT
   ======================================== */

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ========================================
   SECTION DIVIDERS
   ======================================== */

.section-divider {
    position: relative;
    padding: 60px 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #8E24AA, transparent);
    border-radius: 2px;
}

/* ========================================
   PARALLAX EFFECTS
   ======================================== */

.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ========================================
   GLOW EFFECTS
   ======================================== */

.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(142, 36, 170, 0.6),
        0 0 40px rgba(142, 36, 170, 0.4);
}

/* ========================================
   TYPING ANIMATION
   ======================================== */

.typing-text {
    overflow: hidden;
    border-right: 2px solid #8E24AA;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: #8E24AA;
    }
}

/* ========================================
   RESPONSIVE ANIMATIONS
   ======================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Disable animations on mobile for performance */
@media (max-width: 768px) {
    .animated-bg::before {
        animation: none;
    }

    .particle {
        display: none;
    }
}