/* ===========================
   ANIMATIONS CSS
   Reliance Overseas Cargo
   =========================== */

/* Fade animations for hero */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes slideInUp {
    from { transform: translateY(60px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(244,163,0,0.3); }
    50% { box-shadow: 0 0 30px rgba(244,163,0,0.7), 0 0 60px rgba(244,163,0,0.3); }
}
@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes borderDraw {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}
@keyframes waveMove {
    0% { transform: translateX(0) rotate(0deg); }
    100% { transform: translateX(-50%) rotate(360deg); }
}
@keyframes particleFly {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-400px) rotate(720deg); opacity: 0; }
}
@keyframes textGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated gradient text */
.gradient-text {
    background: linear-gradient(90deg, #2d6a4f, #f4a300, #40916c, #ffcb47);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 4s ease infinite;
}

/* Hero animations */
.animate-fade-down { animation: fadeInDown 0.8s ease forwards; }
.animate-fade-up { animation: fadeInUp 0.8s ease forwards; }
.delay-2 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }
.delay-3 { animation-delay: 0.6s; opacity: 0; animation-fill-mode: forwards; }
.delay-4 { animation-delay: 0.9s; opacity: 0; animation-fill-mode: forwards; }

/* Card hover shine effect */
.shine-on-hover {
    position: relative; overflow: hidden;
}
.shine-on-hover::after {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 40%; height: 200%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    transition: left 0.6s ease;
}
.shine-on-hover:hover::after { left: 130%; }

/* Particle floating elements */
.particles {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.particle {
    position: absolute; font-size: 1.5rem;
    animation: particleFly 6s ease-in infinite;
    opacity: 0.6;
}
.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 7s; }
.particle:nth-child(2) { left: 25%; animation-delay: 1.5s; animation-duration: 9s; }
.particle:nth-child(3) { left: 45%; animation-delay: 3s; animation-duration: 6s; }
.particle:nth-child(4) { left: 65%; animation-delay: 2s; animation-duration: 8s; }
.particle:nth-child(5) { left: 80%; animation-delay: 0.5s; animation-duration: 10s; }
.particle:nth-child(6) { left: 90%; animation-delay: 4s; animation-duration: 7s; }

/* Wave dividers */
.wave-divider {
    position: absolute; bottom: -1px; left: 0; right: 0;
    overflow: hidden; line-height: 0;
}
.wave-divider svg { display: block; width: 100%; }

/* Spice pattern background */
.spice-pattern-bg {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(244,163,0,0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(45,106,79,0.04) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232d6a4f' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Scroll reveal classes */
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.25,0.46,0.45,0.94); }
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-50px); transition: all 0.8s cubic-bezier(0.25,0.46,0.45,0.94); }
.reveal-left.revealed { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(50px); transition: all 0.8s cubic-bezier(0.25,0.46,0.45,0.94); }
.reveal-right.revealed { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(0.85); transition: all 0.8s cubic-bezier(0.34,1.56,0.64,1); }
.reveal-scale.revealed { opacity: 1; transform: scale(1); }

/* Page transitions */
.page-enter { animation: fadeInUp 0.5s ease forwards; }

/* Typewriter effect */
.typewriter { overflow: hidden; border-right: 3px solid var(--gold); white-space: nowrap; animation: typing 3.5s steps(40) forwards, blink 0.75s step-end infinite; }
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink { from, to { border-color: transparent } 50% { border-color: var(--gold); } }

/* Number counter animation */
.counter-animated { animation: bounceIn 0.6s cubic-bezier(0.68,-0.55,0.265,1.55); }

/* Spice icon bounce */
.bounce-icon { animation: float 3s ease-in-out infinite; display: inline-block; }

/* Background animated gradient */
.animated-gradient-bg {
    background: linear-gradient(-45deg, #1a3c2e, #2d6a4f, #0d2a1f, #1a4a35);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hover lift */
.hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.15); }

/* Gold shimmer text */
.gold-shimmer {
    background: linear-gradient(90deg, #f4a300, #ffcb47, #f4a300, #ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

/* Pulsing badge */
.pulse-badge {
    position: relative;
}
.pulse-badge::before {
    content: '';
    position: absolute; inset: -4px;
    border-radius: inherit;
    border: 2px solid var(--gold);
    animation: pulse 2s ease-in-out infinite;
}
