/* ========================================
   RINGLAB MEDIA - ANIMATIONS
   ======================================== */

/* ========================================
   KEYFRAME ANIMATIONS
   ======================================== */

/* Hero Background Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating Shapes Animation */
@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(-15px, -50px) rotate(180deg);
    }
    75% {
        transform: translate(-30px, -20px) rotate(270deg);
    }
}

/* Floating Icons Animation */
@keyframes floatIcon {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(15px, -25px) scale(1.1);
        opacity: 0.4;
    }
    50% {
        transform: translate(-10px, -40px) scale(1);
        opacity: 0.3;
    }
    75% {
        transform: translate(-20px, -15px) scale(0.9);
        opacity: 0.2;
    }
}

/* Scroll Indicator Bounce */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse Animation for Icons */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* ========================================
   HERO SECTION ANIMATIONS
   ======================================== */
.hero-title,
.hero-subtitle,
.hero-cta {
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-subtitle {
    animation: fadeInUp 1s ease forwards 0.6s;
}

.hero-cta {
    animation: fadeInUp 1s ease forwards 0.9s;
}

.scroll-indicator {
    animation: fadeIn 1s ease forwards 1.5s;
}

/* ========================================
   SCROLL-TRIGGERED ANIMATIONS
   ======================================== */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for multiple items */
.service-card.fade-in-scroll:nth-child(1).animate {
    transition-delay: 0s;
}

.service-card.fade-in-scroll:nth-child(2).animate {
    transition-delay: 0.2s;
}

.service-card.fade-in-scroll:nth-child(3).animate {
    transition-delay: 0.4s;
}

/* ========================================
   HOVER ANIMATIONS
   ======================================== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 102, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    animation: pulse 1s ease infinite;
}

/* ========================================
   BUTTON ANIMATIONS
   ======================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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 ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn span {
    position: relative;
    z-index: 1;
}

/* ========================================
   STATISTICS COUNTER
   ======================================== */
.stat-number {
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

/* ========================================
   CTA CARD ANIMATIONS
   ======================================== */
.cta-card {
    position: relative;
}

.cta-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--color-orange), var(--color-green));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cta-card:hover::after {
    opacity: 1;
}

.cta-advertiser::after {
    background: var(--color-orange);
}

.cta-publisher::after {
    background: var(--color-green);
}

/* ========================================
   NAVIGATION ANIMATIONS
   ======================================== */
.nav-link {
    position: relative;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ========================================
   PARALLAX EFFECT
   ======================================== */
.hero-background {
    transform: translateZ(0);
    will-change: transform;
}

/* ========================================
   IMAGE HOVER EFFECTS
   ======================================== */
.about-image {
    position: relative;
    overflow: hidden;
}

.about-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.3), rgba(7, 153, 100, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.about-image:hover::after {
    opacity: 1;
}

.about-image img {
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* ========================================
   INDUSTRY TAGS ANIMATION
   ======================================== */
.industry-tag {
    position: relative;
}

.industry-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-orange);
    border-radius: 25px;
    transform: scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.industry-tag:hover::before {
    transform: scale(1);
}

/* ========================================
   FOOTER LINK UNDERLINE ANIMATION
   ======================================== */
.footer-links a {
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-orange);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

/* ========================================
   FEATURE ICON ANIMATION
   ======================================== */
.feature-icon {
    animation: scaleIn 0.5s ease forwards;
}

.feature-item:nth-child(1) .feature-icon {
    animation-delay: 0.1s;
}

.feature-item:nth-child(2) .feature-icon {
    animation-delay: 0.2s;
}

.feature-item:nth-child(3) .feature-icon {
    animation-delay: 0.3s;
}

.feature-item:nth-child(4) .feature-icon {
    animation-delay: 0.4s;
}

/* ========================================
   RESPONSIVE ANIMATION ADJUSTMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
