/* ============================================
   INFRASTRUCTURE LAYERS - Modern Visualization
   ============================================ */

/* Brand Colors from colour.md */
:root {
    --primary-yellow: #FCC41B;
    --accent-red: #DC512D;
    --brand-purple: #8B2377;
    --success-green: #42A469;
    --text-dark: #1A1A1A;
    --bg-white: #FFFFFF;
}

/* Container */
.infrastructure-layers-viz {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

/* Layered Architecture Stack */
.layer-stack {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transform-style: preserve-3d;
}

/* Individual Layer Card */
.infra-layer {
    position: relative;
    width: 90%;
    padding: 25px 30px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 1px 8px rgba(0, 0, 0, 0.06);
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

/* Layer Hover Effect */
.infra-layer:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Color Accent Bar (Left Border) */
.infra-layer::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, var(--layer-color), var(--layer-color-dark));
    border-radius: 16px 0 0 16px;
    transition: width 0.3s ease;
}

.infra-layer:hover::before {
    width: 8px;
}

/* Layer Content Layout */
.layer-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* Icon Container */
.layer-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--layer-color), var(--layer-color-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--bg-white);
    flex-shrink: 0;
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.15),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.infra-layer:hover .layer-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Text Content */
.layer-text {
    flex: 1;
}

.layer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.layer-desc {
    font-size: 13px;
    color: rgba(26, 26, 26, 0.6);
    margin: 0;
    line-height: 1.4;
}

/* Background Glow Effect */
.infra-layer::after {
    content: '';
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--layer-color-light) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.infra-layer:hover::after {
    opacity: 0.3;
}

/* Layer-Specific Colors */
.infra-layer.layer-data {
    --layer-color: var(--brand-purple);
    --layer-color-dark: #7A1F6A;
    --layer-color-light: rgba(139, 35, 119, 0.15);
}

.infra-layer.layer-apps {
    --layer-color: var(--accent-red);
    --layer-color-dark: #C44628;
    --layer-color-light: rgba(220, 81, 45, 0.15);
}

.infra-layer.layer-portal {
    --layer-color: var(--primary-yellow);
    --layer-color-dark: #E6B018;
    --layer-color-light: rgba(252, 196, 27, 0.15);
}

.infra-layer.layer-crm {
    --layer-color: var(--success-green);
    --layer-color-dark: #3A935E;
    --layer-color-light: rgba(66, 164, 105, 0.15);
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.infra-layer:nth-child(1) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 0s;
}

.infra-layer:nth-child(2) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 0.5s;
}

.infra-layer:nth-child(3) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 1s;
}

.infra-layer:nth-child(4) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* Pulse Effect on Icons */
@keyframes pulse-icon {
    0%, 100% {
        box-shadow: 
            0 8px 16px rgba(0, 0, 0, 0.15),
            inset 0 -2px 8px rgba(0, 0, 0, 0.1),
            0 0 0 0 var(--layer-color);
    }
    50% {
        box-shadow: 
            0 8px 16px rgba(0, 0, 0, 0.15),
            inset 0 -2px 8px rgba(0, 0, 0, 0.1),
            0 0 0 8px transparent;
    }
}

.layer-icon {
    animation: pulse-icon 3s ease-in-out infinite;
}

/* Connection Lines (Optional Enhancement) */
.layer-connections {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(26, 26, 26, 0.1) 20%,
        rgba(26, 26, 26, 0.1) 80%,
        transparent 100%
    );
    z-index: 0;
}

.layer-connection-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary-yellow);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(252, 196, 27, 0.6);
}

.layer-connection-dot:nth-child(1) { top: 25%; }
.layer-connection-dot:nth-child(2) { top: 50%; }
.layer-connection-dot:nth-child(3) { top: 75%; }

/* Responsive Design */
@media (max-width: 768px) {
    .infrastructure-layers-viz {
        max-width: 100%;
        height: auto;
        padding: 20px 0;
    }
    
    .layer-stack {
        gap: 15px;
    }
    
    .infra-layer {
        width: 95%;
        padding: 20px;
    }
    
    .layer-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .layer-title {
        font-size: 15px;
    }
    
    .layer-desc {
        font-size: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .infra-layer {
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(10px);
    }
    
    .layer-title {
        color: var(--bg-white);
    }
    
    .layer-desc {
        color: rgba(255, 255, 255, 0.7);
    }
}

