/**
 * Animații CSS - startup-delivery.ro
 *
 * Ultima modificare: 2026-01-30 22:30
 * Modificare: Creare animații CSS (orbit, pulse, float, fade)
 */

/* ==========================================================================
   ORBIT ANIMATION - Particule orbitând în jurul unui element central
   ========================================================================== */

.orbit-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
}

.orbit-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.orbit-ring-1 {
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    animation: orbit-rotate 20s linear infinite;
}

.orbit-ring-2 {
    width: 260px;
    height: 260px;
    margin: -130px 0 0 -130px;
    animation: orbit-rotate 30s linear infinite reverse;
}

.orbit-ring-3 {
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
    animation: orbit-rotate 25s linear infinite;
}

.orbit-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent-cyan);
}

/* Particule pe ring-ul 1 */
.orbit-ring-1 .orbit-particle:nth-child(1) {
    top: 0;
    left: 50%;
    margin-left: -5px;
    margin-top: -5px;
}

.orbit-ring-1 .orbit-particle:nth-child(2) {
    bottom: 0;
    left: 50%;
    margin-left: -5px;
    margin-bottom: -5px;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    margin-bottom: -6px;
    background: var(--color-primary);
}

.orbit-ring-1 .orbit-particle:nth-child(3) {
    top: 50%;
    right: 0;
    margin-top: -5px;
    margin-right: -5px;
    background: var(--color-secondary);
}

/* Particule pe ring-ul 2 */
.orbit-ring-2 .orbit-particle:nth-child(1) {
    top: 15%;
    right: 5%;
    width: 12px;
    height: 12px;
    background: var(--color-accent-green);
}

.orbit-ring-2 .orbit-particle:nth-child(2) {
    bottom: 10%;
    left: 8%;
    background: var(--color-primary);
}

.orbit-ring-2 .orbit-particle:nth-child(3) {
    top: 50%;
    left: 0;
    margin-top: -5px;
    margin-left: -5px;
    width: 12px;
    height: 12px;
    background: var(--color-accent-cyan);
}

/* Particule pe ring-ul 3 */
.orbit-ring-3 .orbit-particle:nth-child(1) {
    top: 5%;
    left: 30%;
    background: var(--color-secondary);
}

.orbit-ring-3 .orbit-particle:nth-child(2) {
    bottom: 8%;
    right: 15%;
    width: 12px;
    height: 12px;
    background: var(--color-accent-green);
}

.orbit-ring-3 .orbit-particle:nth-child(3) {
    top: 60%;
    left: 0;
    margin-left: -5px;
    background: var(--color-primary);
}

.orbit-ring-3 .orbit-particle:nth-child(4) {
    top: 20%;
    right: 0;
    margin-right: -5px;
    width: 12px;
    height: 12px;
    background: var(--color-accent-cyan);
}

@keyframes orbit-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   PULSE ANIMATION
   ========================================================================== */

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-dot {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

/* ==========================================================================
   FLOAT ANIMATION
   ========================================================================== */

.float {
    animation: float 3s ease-in-out infinite;
}

.float-delayed {
    animation: float 3s ease-in-out infinite 1.5s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ==========================================================================
   GRADIENT SHIFT
   ========================================================================== */

.gradient-shift {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ==========================================================================
   SHIMMER EFFECT - Pentru stări de încărcare
   ========================================================================== */

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   FADE IN VARIANTS
   ========================================================================== */

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   SCALE IN
   ========================================================================== */

.scale-in {
    animation: scaleIn 0.4s ease forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   SLIDE UP - Pentru elemente care apar la scroll
   ========================================================================== */

.slide-up {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   TYPEWRITER EFFECT - Pentru secțiunea hero
   ========================================================================== */

.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-accent-cyan);
    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: var(--color-accent-cyan);
    }
}

/* ==========================================================================
   COUNTER ANIMATION TRIGGER
   Clasa folosită de JS pentru a declanșa animația de numărare
   ========================================================================== */

.count-up {
    /* Clasă marker - animația este controlată via JavaScript */
}

/* ==========================================================================
   HOVER LIFT - Pentru elemente interactive
   ========================================================================== */

.hover-lift {
    transition: var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   BORDER GLOW - Efect de strălucire pe margini
   ========================================================================== */

.border-glow {
    position: relative;
    overflow: hidden;
}

.border-glow::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        var(--color-primary),
        var(--color-accent-cyan),
        var(--color-secondary),
        var(--color-accent-green)
    );
    background-size: 400%;
    border-radius: inherit;
    z-index: -1;
    animation: border-glow-rotate 3s linear infinite;
}

@keyframes border-glow-rotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ==========================================================================
   ACCESIBILITATE - Respect pentru preferințele utilizatorului
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
