/* =========================================
   SERVICE CARD ANIMATIONS
   ========================================= */

.service-icon.animated-icon {
    width: 64px;
    height: 64px;
    background: transparent !important;
    /* Override default bg */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    position: relative;
    border-radius: 0 !important;
}

/* --- 1. Web & App Animation (Browser Window) --- */
.web-icon .browser-window {
    width: 50px;
    height: 40px;
    background: rgba(30, 41, 59, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    transform-origin: bottom center;
}

.service-card:hover .web-icon .browser-window {
    transform: scale(1.1) translateY(-2px);
    border-color: var(--brand-blue);
}

.browser-header {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding-left: 6px;
    gap: 3px;
}

.browser-header .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
}

.dot.red {
    background: #FF5F56;
}

.dot.yellow {
    background: #FFBD2E;
}

.dot.green {
    background: #27C93F;
}

.browser-content {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loading-bar {
    width: 0%;
    height: 2px;
    background: var(--brand-blue);
    border-radius: 2px;
    animation: loadPage 2s infinite ease-in-out;
}

.content-line {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
}

.content-line.line-1 {
    width: 70%;
    animation: typeLine 2s infinite 0.5s ease-out;
}

.content-line.line-2 {
    width: 50%;
    animation: typeLine 2s infinite 0.7s ease-out;
}

@keyframes loadPage {
    0% {
        width: 0%;
        opacity: 1;
    }

    50% {
        width: 100%;
        opacity: 1;
    }

    90% {
        width: 100%;
        opacity: 0;
    }

    100% {
        width: 0%;
        opacity: 0;
    }
}

@keyframes typeLine {
    0% {
        transform: scaleX(0);
    }

    40% {
        transform: scaleX(1);
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: scaleX(1);
    }
}

/* --- 2. Automation & AI Animation (System Nodes) --- */
.auto-icon .system-nodes {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.node {
    position: absolute;
    background: var(--brand-green);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.center-node {
    width: 16px;
    height: 16px;
    z-index: 2;
    animation: pulseNode 2s infinite ease-in-out;
}

.satellite-node {
    width: 8px;
    height: 8px;
    background: #fff;
}

.sat-1 {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: orbit 4s linear infinite;
}

.sat-2 {
    bottom: 12px;
    left: 12px;
    animation: orbit 4s linear infinite 1.3s reverse;
}

.sat-3 {
    bottom: 12px;
    right: 12px;
    animation: orbit 4s linear infinite 2.6s;
}

/* Connecting lines simplified with rotation */
.connection-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 1px;
    background: rgba(16, 185, 129, 0.4);
    transform-origin: left center;
    z-index: 1;
}

.line-1 {
    transform: rotate(-90deg);
    animation: scanLine 2s infinite;
}

.line-2 {
    transform: rotate(150deg);
    animation: scanLine 2s infinite 0.6s;
}

.line-3 {
    transform: rotate(30deg);
    animation: scanLine 2s infinite 1.2s;
}

@keyframes pulseNode {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
    }

    50% {
        transform: scale(1.2);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    }
}

@keyframes scanLine {
    0% {
        opacity: 0.1;
        width: 0px;
    }

    50% {
        opacity: 1;
        width: 24px;
    }

    100% {
        opacity: 0.1;
        width: 24px;
    }
}

/* --- 3. Marketing Animation (Content Stack) --- */
.marketing-icon .content-stack {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card {
    background: rgba(40, 50, 70, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    position: absolute;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.post-1 {
    width: 44px;
    height: 54px;
    z-index: 2;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: floatCard 3s ease-in-out infinite;
}

.post-2 {
    width: 40px;
    height: 48px;
    background: rgba(139, 92, 246, 0.2);
    /* Violet tint */
    z-index: 1;
    transform: rotate(10deg) translate(8px, -4px);
    opacity: 0.7;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 4px;
}

.avatar {
    width: 8px;
    height: 8px;
    background: var(--brand-violet);
    border-radius: 50%;
}

.line {
    height: 2px;
    width: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
}

.post-img {
    flex-grow: 1;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Shine effect on image */
.post-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

.like-bubble {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 14px;
    background: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: popLike 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    50%,
    100% {
        left: 100%;
    }
}

@keyframes popLike {

    0%,
    80% {
        transform: scale(0);
        opacity: 0;
    }

    85% {
        transform: scale(1.2);
        opacity: 1;
    }

    90% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}