/**
 * Items Animacion Block - Premium Redesign (Awwwards Style)
 * High-contrast dark theme, neural connection animations, 3D cards
 */

/* --- Variables --- */
:root {
    --color-magenta: #EC4899;
    --color-blue-violet: #3B82F6;
    --color-electric-purple: #8B5CF6;
    --color-dark-navy: #1A1A2E;
    --color-soft-white: #FAFAFA;
    --color-blue-accent: #3B82F6;
}

.items-animacion-block {
    position: relative !important;
    width: 100% !important;
    min-height: 1000px !important;
    background: #1A1A2E !important;
    color: #FAFAFA !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
}

/* Subtle Noise Texture for depth */
.items-animacion-block::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    mix-blend-mode: overlay;
}

.items-animacion-container {
    position: relative;
    width: 100%;
    height: 1000px;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 10;
    margin-bottom: 150px;
}

/* --- SVG Layer (Neural Traces) --- */
.items-animacion-svg-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.connection-lines {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Normal Dashed Lines (Constant faint traces) */
.dashed-line {
    fill: none;
    stroke: #3B82F6;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-opacity: 0.12;
    stroke-dasharray: 4 6;
}

/* Neural Pulse (Flowing Energy) */
.neural-pulse {
    stroke-dasharray: 60 1200;
    stroke-dashoffset: 1260;
    opacity: 0;
    filter: drop-shadow(0 0 5px #3B82F6);
}

.items-animacion-block.active .neural-pulse {
    opacity: 0.9;
    animation: neural-flow 4s infinite linear;
}

@keyframes neural-flow {
    0% {
        stroke-dashoffset: 1260;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* Orbit Animations */
@keyframes orbit-rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.brain-orbit {
    transform-origin: 700px 500px;
}

.brain-orbit.dashed {
    animation: orbit-rotate 120s linear infinite;
}

/* --- Center Core (Refined AI Brain) --- */
.center-core-visual.ai-brain-container {
    width: 320px;
    height: 320px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.items-animacion-block.active .center-core-visual {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ai-outer-box {
    width: 140px;
    height: 50x;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.ai-inner-box {
    width: 140px;
    height: 140px;
    background: #1A1A2E;
    border: 3px solid #8B5CF6;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow:
        0 0 40px rgba(139, 92, 246, 0.3),
        inset 0 0 20px rgba(139, 92, 246, 0.2);
}

.side-nodes span {
    width: 12px;
    height: 3.5px;
    background: #8B5CF6;
    border-radius: 2px;
}

.ai-label {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 3.5rem !important;
    font-weight: 950 !important;
    color: #FAFAFA !important;
    letter-spacing: -0.05em;
    line-height: 1;
}

.ai-label::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 4px;
    background: #EC4899;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.6);
}

/* --- Block Intro Title --- */
#block-intro-title {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(2.5rem, 5vw, 3.2rem) !important;
    font-weight: 950 !important;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 50;
    opacity: 0;
    width: 100%;
    pointer-events: none;
}

#block-intro-title .neural {
    color: #FAFAFA;
}

#block-intro-title .core {
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Items & Cards (Premium Glassmorphism) --- */
.animacion-item {
    position: absolute;
    width: 420px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 30;
}

.items-animacion-block.active .animacion-item {
    opacity: 1;
    transform: translateY(0);
}

/* Card Alignment (Updated for 1000px height) */
.pos-tl {
    top: 240px;
    left: 80px;
    text-align: left;
}

.pos-tr {
    top: 240px;
    right: 80px;
    text-align: left;
}

.pos-bl {
    top: 760px;
    left: 80px;
    text-align: left;
}

.pos-br {
    top: 760px;
    right: 80px;
    text-align: left;
}

.item-card.glass-card {
    background: rgba(26, 26, 46, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 1.75rem 2.25rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.item-card-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.item-card.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1.5px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(139, 92, 246, 0.4));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    transition: opacity 0.5s ease;
}

.item-card.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(30, 30, 55, 0.85);
    border-color: rgba(236, 72, 153, 0.3);
}

.card-index {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 800;
    font-size: 0.875rem;
    box-shadow: 0 6px 15px rgba(236, 72, 153, 0.3);
}

.item-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 900 !important;
    color: #FFFFFF !important;
    margin: 0 !important;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.2 !important;
}

.item-description {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.95rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    line-height: 1.6;
}

/* Loading Bar Effect */
.card-loading-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.card-loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #EC4899, #8B5CF6);
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.item-card.glass-card:hover .card-loading-bar {
    width: 100%;
}

@media (max-width: 640px) {
        .items-animacion-block {
        
        padding: 0px !important;
    }
    .item-card.glass-card{
       margin-bottom: 25px;
    } 
    .items-animacion-container{
       margin-bottom: 50px;
}
    .items-animacion-block{
       padding: 0rem 0 !important;
    }
 }

/* --- Responsive --- */
@media (max-width: 1100px) {
    .animacion-item {
        width: 380px;
    }

    .pos-tl {
        left: 50px;
    }

    .pos-tr {
        right: 50px;
    }

    .pos-bl {
        left: 50px;
    }

    .pos-br {
        right: 50px;
    }
}

@media (max-width: 1024px) {
    .items-animacion-block {
        min-height: auto !important;
        padding: 8rem 0 !important;
    }

    .items-animacion-container {
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4rem;
    }

    .items-animacion-svg-layer {
        display: none;
    }

    .center-core-visual {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        opacity: 1;
    }

    #block-intro-title {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        opacity: 1;
        margin-bottom: 2rem;
    }

    .animacion-item {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        max-width: 500px;
        opacity: 1;
        transform: none;
        text-align: center !important;
    }
}