/* Financial Intelligence Diagram */
.bsa-diagram-container {
    position: relative;
    width: 259px;
    height: 216px;
    flex-shrink: 0;
    transform: scale(1.7);
    margin: 5px 0 0 0;
}
.bsa-diagram-container .tick-ring {
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 1px solid rgba(96, 165, 250, 0.3);
    animation: rotate 20s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.bsa-diagram-container .tick {
    position: absolute;
    width: 1px;
    height: 6px;
    background: rgba(96, 165, 250, 0.5);
    left: 50%;
    top: 0;
    transform-origin: 50% 65px;
}
.bsa-diagram-container .central-node {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0.3rem;
}
.bsa-diagram-container .central-text {
    font-size: 0.6rem;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 1.2;
}
.bsa-diagram-container .sector {
    position: absolute;
    padding: 0.4rem 0.5rem;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(96, 165, 250, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 5;
}
.bsa-diagram-container .sector-1 {
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: pulse1 3s ease-in-out infinite;
    width: 90px;
}
.bsa-diagram-container .sector-2 {
    bottom: 25px;
    left: 5px;
    animation: pulse2 3s ease-in-out infinite 1s;
    width: 90px;
}
.bsa-diagram-container .sector-3 {
    bottom: 25px;
    right: 5px;
    animation: pulse3 3s ease-in-out infinite 2s;
    width: 90px;
}
.bsa-diagram-container .sector-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.15rem;
}
.bsa-diagram-container .sector-content {
    font-size: 0.45rem;
    color: #94a3b8;
    line-height: 1.3;
}
.bsa-diagram-container .chip {
    position: absolute;
    padding: 0.25rem 0.4rem;
    border-radius: 0.8rem;
    background: rgba(167, 139, 250, 0.2);
    border: 1px solid rgba(167, 139, 250, 0.4);
    color: #c4b5fd;
    font-size: 0.5rem;
    font-weight: 500;
    white-space: nowrap;
    animation: float 4s ease-in-out infinite;
    backdrop-filter: blur(3px);
    z-index: 3;
}
.bsa-diagram-container .chip-1 {
    top: 15px;
    left: 5px;
    animation-delay: 0s;
}

.bsa-diagram-container .chip-2 {
    top: 15px;
    right: 5px;
    animation-delay: 0.5s;
}

.bsa-diagram-container .chip-3 {
    top: 50px;
    left: 0px;
    animation-delay: 1s;
}

.bsa-diagram-container .chip-4 {
    top: 50px;
    right: 0px;
    animation-delay: 1.5s;
}

.bsa-diagram-container .chip-5 {
    top: 85px;
    left: 0px;
    animation-delay: 2s;
}

.bsa-diagram-container .chip-6 {
    top: 85px;
    right: 0px;
    animation-delay: 2.5s;
}

.bsa-diagram-container .chip-7 {
    bottom: 48px;
    left: 8px;
    animation-delay: 3s;
}

.bsa-diagram-container .chip-8 {
    bottom: 48px;
    right: 8px;
    animation-delay: 3.5s;
}

.bsa-diagram-container .chip-9 {
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

/* Animations */
@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
@keyframes pulse1 {
    0%,
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 2px 12px rgba(96, 165, 250, 0.6);
    }
}
@keyframes pulse2 {
    0%,
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    50% {
        box-shadow: 0 2px 12px rgba(139, 92, 246, 0.6);
    }
}
@keyframes pulse3 {
    0%,
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 2px 12px rgba(167, 139, 250, 0.6);
    }
}
@keyframes float {
    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Business Rule Engine Diagram */
.bre-diagram-container { 
    width: 259px; 
    height: 216px;
    position: relative; 
    scale: 1.7;
    flex-shrink: 0; 
} 
.bre-diagram-container .central-hub { 
    position: absolute; 
    top: 48%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 70px; 
    height: 70px; 
    z-index: 20; 
}
.bre-diagram-container .orbital-ring { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 85px; 
    height: 85px; 
    border-radius: 50%; 
    border: 2px solid transparent; 
    border-top-color: rgba(0, 224, 255, 0.6); 
    border-right-color: rgba(0, 224, 255, 0.3); 
    animation: orbital-rotate 8s linear infinite; 
} 
  
.bre-diagram-container .pulse-ring { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 75px; 
    height: 75px; 
    border-radius: 50%; 
    border: 2px solid rgba(31, 111, 255, 0.4); 
    animation: pulse-expand 3s ease-in-out infinite; 
} 
  
.bre-diagram-container .hub-circle { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%); 
    width: 70px; 
    height: 70px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #004CFF 0%, #1F6FFF 50%, #7C3AED 100%); 
    box-shadow: 0 0 25px rgba(31, 111, 255, 0.7), 0 0 40px rgba(124, 58, 237, 0.4); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    animation: hub-pulse 3s ease-in-out infinite; 
} 
.bre-diagram-container .hub-title { 
    font-size: 0.9rem; 
    font-weight: 800; 
    color: white; 
    text-align: center; 
    letter-spacing: 1px; 
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4); 
    margin-bottom: 2px; 
} 
  
.bre-diagram-container .hub-subtitle {   
    font-size: 0.28rem; 
    color: rgba(255, 255, 255, 0.85); 
    text-align: center; 
    line-height: 1.15; 
    padding: 0 8px; 
    font-weight: 400; 
} 
  
/* Workflow Nodes */ 
.bre-diagram-container .node { 
    position: absolute; 
    width: 58px; 
    padding: 5px; 
    border-radius: 7px; 
    background: rgba(15, 23, 42, 0.95); 
    border: 1.5px solid rgba(31, 111, 255, 0.4); 
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6); 
    z-index: 10; 
} 
.bre-diagram-container .node-1 {
    top: -3px; 
    left: 50%; 
    transform: translateX(-50%); 
    animation: node-glow 15s ease-in-out infinite; 
} 
  
.bre-diagram-container .node-2 { 
    top: 22%; 
    right: 3px; 
    transform: translateY(-50%); 
    animation: node-glow 15s ease-in-out infinite 3s; 
} 
  
.bre-diagram-container .node-3 { 
    bottom: 24px; 
    right: 18%; 
    animation: node-glow 15s ease-in-out infinite 6s; 
} 
  
.bre-diagram-container .node-4 { 
    bottom: 24px; 
    left: 18%; 
    animation: node-glow 15s ease-in-out infinite 9s; 
} 

.bre-diagram-container .node-5 { 
    top: 22%; 
    left: 3px; 
    transform: translateY(-50%); 
    animation: node-glow 15s ease-in-out infinite 12s; 
} 

.bre-diagram-container .node-icon { 
    width: 20px; 
    height: 20px; 
    margin: 0 auto 3px; 
} 
  
.bre-diagram-container .node-number { 
    display: none; 
} 
  
.bre-diagram-container .node-title { 
    font-size: 0.45rem; 
    font-weight: 700; 
    color: white; 
    text-align: center; 
    line-height: 1.2; 
    margin-bottom: 2px; 
} 
  
.bre-diagram-container .node-desc { 
    font-size: 0.33rem; 
    color: #94a3b8; 
    text-align: center; 
    line-height: 1.25; 
} 

/* Connection Lines */ 
.bre-diagram-container .connector { 
    position: absolute; 
    background: linear-gradient(90deg, transparent, rgba(0, 224, 255, 0.5), transparent); 
    z-index: 5; 
    opacity: 0.4; 
} 
  
.bre-diagram-container .conn-1 { 
    top: 52px; 
    left: 50%; 
    width: 2px; 
    height: 22px; 
    transform: translateX(-50%) rotate(30deg); 
    transform-origin: top; 
    animation: connector-pulse 15s ease-in-out infinite 1.5s; 
} 

.bre-diagram-container .conn-2 { 
    top: 32%; 
    right: 72px; 
    width: 28px; 
    height: 2px; 
    animation: connector-pulse 15s ease-in-out infinite 4.5s; 
} 
  
.bre-diagram-container .conn-3 { 
    bottom: 78px; 
    right: 82px; 
    width: 2px; 
    height: 22px; 
    transform: rotate(-30deg); 
    animation: connector-pulse 15s ease-in-out infinite 7.5s; 
} 
  
.bre-diagram-container .conn-4 { 
    bottom: 78px; 
    left: 82px; 
    width: 2px; 
    height: 22px; 
    transform: rotate(30deg); 
    animation: connector-pulse 15s ease-in-out infinite 10.5s; 
} 
  
.bre-diagram-container .conn-5 { 
    top: 32%; 
    left: 72px; 
    width: 28px; 
    height: 2px; 
    animation: connector-pulse 15s ease-in-out infinite 13.5s; 
} 
  
/* Footer */ 
.bre-diagram-container .footer { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    text-align: center; 
    padding: 5px; 
    border-top: 1px solid rgba(31, 111, 255, 0.3); 
} 

.bre-diagram-container .footer-text { 
    font-size: 0.48rem; 
    color: #00E0FF; 
    font-weight: 600; 
    letter-spacing: 0.3px; 
    line-height: 1.3; 
} 

/* Animations */ 
@keyframes orbital-rotate { 
from { 
    transform: translate(-50%, -50%) rotate(0deg); 
} 
to { 
    transform: translate(-50%, -50%) rotate(360deg); 
} 
} 

@keyframes pulse-expand { 
0%, 100% { 
    transform: translate(-50%, -50%) scale(1); 
    opacity: 0.5; 
} 
50% { 
    transform: translate(-50%, -50%) scale(1.12); 
    opacity: 0.8; 
} 
} 
  
@keyframes hub-pulse { 
    0%, 100% { 
        box-shadow: 0 0 25px rgba(31, 111, 255, 0.7), 0 0 40px rgba(124, 58, 237, 0.4); 
    }
    50% { 
        box-shadow: 0 0 35px rgba(31, 111, 255, 0.95), 0 0 55px rgba(124, 58, 237, 0.6), 0 0 70px rgba(0, 224, 255, 0.35); 
    } 
} 
  
   
  
@keyframes node-glow { 
    0%, 90%, 100% { 
        border-color: rgba(31, 111, 255, 0.4); 
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6); 
        transform: translateX(-50%) scale(1); 
    } 
    5%, 15% { 
        border-color: rgba(0, 224, 255, 0.95); 
        box-shadow: 0 4px 18px rgba(0, 224, 255, 0.7), 0 0 28px rgba(31, 111, 255, 0.6); 
        transform: translateX(-50%) scale(1.04); 
    }
} 
  
.bre-diagram-container .node-2, .bre-diagram-container .node-5 { 
    animation-name: node-glow-y; 
} 
  
@keyframes node-glow-y { 
    0%, 90%, 100% { 
        border-color: rgba(31, 111, 255, 0.4); 
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6); 
        transform: translateY(-50%) scale(1); 
    } 

    5%, 15% { 
        border-color: rgba(0, 224, 255, 0.95); 
        box-shadow: 0 4px 18px rgba(0, 224, 255, 0.7), 0 0 28px rgba(31, 111, 255, 0.6); 
        transform: translateY(-50%) scale(1.04); 
    } 
} 
  
.bre-diagram-container .node-3, .bre-diagram-container .node-4 { 
    animation-name: node-glow-none; 
} 
  
@keyframes node-glow-none { 
    0%, 90%, 100% { 
        border-color: rgba(31, 111, 255, 0.4); 
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6); 
        transform: scale(1); 
    } 

    5%, 15% { 
        border-color: rgba(0, 224, 255, 0.95); 
        box-shadow: 0 4px 18px rgba(0, 224, 255, 0.7), 0 0 28px rgba(31, 111, 255, 0.6); 
        transform: scale(1.04); 
    } 
} 
  
@keyframes connector-pulse { 
    0%, 90%, 100% { 
        opacity: 0.3; 
    } 
    5%, 15% { 
        opacity: 1; 
    } 
} 


/* AI Decision Model */
/* Animated background particles */
.ml-diagram-container {
    transform: scale(2.2);
}
.ml-diagram-container .bg-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 224, 255, 0.3);
    border-radius: 50%;
    animation: float-particle 5s linear infinite;
}

.ml-diagram-container .bg-particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.ml-diagram-container .bg-particle:nth-child(2) {
    top: 60%;
    left: 20%;
    animation-delay: 1s;
}

.ml-diagram-container .bg-particle:nth-child(3) {
    top: 40%;
    left: 70%;
    animation-delay: 2s;
}

.ml-diagram-container .bg-particle:nth-child(4) {
    top: 80%;
    left: 50%;
    animation-delay: 3s;
}

.ml-diagram-container .container {
    width: 259px;
    height: 160px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header */
.ml-diagram-container .header {
    text-align: center;
    padding: 6px 8px 4px;
    background: linear-gradient(90deg, rgb(2 133 140), rgb(31 159 52));
    border-bottom: 1px solid rgba(0, 224, 255, 0.3);
}

.ml-diagram-container .main-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #F8FAFC;
    margin: 0 0 2px 0;
    text-shadow: 0 0 10px rgba(0, 224, 255, 0.5);
}

.ml-diagram-container .subtitle {
    font-size: 0.32rem;
    color: rgba(248, 250, 252, 0.7);
    margin: 0;
    line-height: 1.2;
}

/* Pipeline Container */
.ml-diagram-container .pipeline {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    position: relative;
}

/* Flow lines connecting stages */
.ml-diagram-container .flow-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 224, 255, 0.6), transparent);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
}

.ml-diagram-container .flow-1 {
    left: 46px;
    width: 8px;
    animation: flow-animate 5s ease-in-out infinite;
}

.ml-diagram-container .flow-2 {
    left: 92px;
    width: 8px;
    animation: flow-animate 5s ease-in-out infinite 1s;
}

.ml-diagram-container .flow-3 {
    left: 138px;
    width: 8px;
    animation: flow-animate 5s ease-in-out infinite 2s;
}

.ml-diagram-container .flow-4 {
    left: 184px;
    width: 8px;
    animation: flow-animate 5s ease-in-out infinite 3s;
}

/* Data stream particles */
.ml-diagram-container .stream-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(0, 224, 255, 0.8);
    border-radius: 50%;
    top: 50%;
    box-shadow: 0 0 6px rgba(0, 224, 255, 0.9);
    opacity: 0;
}

.ml-diagram-container .stream-1 {
    animation: stream-flow 4s linear infinite;
}

.ml-diagram-container .stream-2 {
    animation: stream-flow 4s linear infinite 1.5s;
}

.ml-diagram-container .stream-3 {
    animation: stream-flow 4s linear infinite 3s;
}

/* Stage nodes */
.ml-diagram-container .stage {
    width: 45px;
    height: 70px;
    background: rgba(11, 18, 37, 0.9);
    border: 1.5px solid rgba(31, 111, 255, 0.4);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.ml-diagram-container .stage-icon {
    width: 16px;
    height: 16px;
    margin-bottom: 3px;
}

.ml-diagram-container .stage-number {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #004CFF, #1F6FFF);
    color: white;
    font-size: 0.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(0, 224, 255, 0.6);
}

.ml-diagram-container .stage-title {
    font-size: 0.32rem;
    font-weight: 700;
    color: #00E0FF;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 2px;
}

.ml-diagram-container .stage-desc {
    font-size: 0.25rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.15;
}

/* Stage activation animation */
.ml-diagram-container .stage-1 {
    animation: stage-glow 5s ease-in-out infinite;
}

.ml-diagram-container .stage-2 {
    animation: stage-glow 5s ease-in-out infinite 1s;
}

.ml-diagram-container .stage-3 {
    animation: stage-glow 5s ease-in-out infinite 2s;
}

.ml-diagram-container .stage-4 {
    animation: stage-glow 5s ease-in-out infinite 3s;
}

.ml-diagram-container .stage-5 {
    animation: stage-glow 5s ease-in-out infinite 4s;
}

/* Footer */
.ml-diagram-container .footer {
    text-align: center;
    padding: 4px 6px;
    background: rgba(11, 18, 37, 0.95);
    border-top: 1px solid rgba(0, 224, 255, 0.3);
}

.ml-diagram-container .footer-text {
    font-size: 0.4rem;
    color: #00E0FF;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.2px;
}

/* Animations */
@keyframes float-particle {
    0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
    }

    20% {
    opacity: 0.5;
    }

    80% {
    opacity: 0.5;
    }

    100% {
    transform: translateY(-40px) translateX(30px);
    opacity: 0;
    }
}

@keyframes flow-animate {
    0%,
    85% {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
    }

    2% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
    }

    8% {
    opacity: 1;
    transform: translateY(-50%) scaleX(1) translateX(0);
    }

    10% {
    opacity: 0;
    transform: translateY(-50%) scaleX(1) translateX(20px);
    }
}

@keyframes stream-flow {
    0% {
    left: 10px;
    opacity: 0;
    }

    5% {
    opacity: 1;
    }

    95% {
    opacity: 1;
    }

    100% {
    left: 245px;
    opacity: 0;
    }
}

@keyframes stage-glow {
    0%,
    85%,
    100% {
    border-color: rgba(31, 111, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transform: scale(1);
    }

    2%,
    10% {
    border-color: rgba(0, 224, 255, 1);
    box-shadow: 0 0 20px rgba(0, 224, 255, 0.8), 0 4px 16px rgba(31, 111, 255, 0.6);
    transform: scale(1.05);
    }
}

/* Specific icon animations */
.ml-diagram-container .pulse-icon {
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {
    0%,
    100% {
    opacity: 0.8;
    transform: scale(1);
    }

    50% {
    opacity: 1;
    transform: scale(1.1);
    }
}

/* Responsive Design */
@media (max-width: 991px) {
    .bsa-diagram-container {
        scale: 0.7;
    }
    .bre-diagram-container {
        scale: 0.5;
    }
    .ml-diagram-container {
        scale: 0.55;
    }
    #credit-risk svg {
        height: auto !important;
    }
}
@media (max-width: 550px) {
    .bsa-diagram-container {
        scale: 0.8;
        margin: 30px 0 0 0;
    }
    .bre-diagram-container {
        scale: 1.2;
        margin: 30px 0 0 0;
    }
    .ml-diagram-container {
        scale: 0.6;
        margin: 30px 0 0 0;
    }
    #credit-risk svg {
        width: 500px !important;
        height: auto !important;
    }
}
@media (max-width: 480px) {
    .bre-diagram-container {
        scale: 1;
        margin: 15px 0 0 0;
    }
    .bre-diagram-container {
        margin: 15px 0 0 0;
    }
    .ml-diagram-container {
        margin: 15px 0 0 0;
    }
}