/* ==========================================================================
   VIEWPORT ENVIRONMENT & RESPONSIVE STRUCTURAL LAYOUT
   ========================================================================== */
:root {
    --glow-color: rgba(59, 130, 246, 0.15);
    --glow-rgb: 59, 130, 246;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: #02040a; /* Darkened base layer slightly for better luminous text contrast */
    overflow-x: hidden;
}

/* ENHANCED: Balanced opacity gradient allows maximum glow visibility from elements underneath */
.expertise-viewport {
    min-height: 100vh;
    width: 100%;
    background: radial-gradient(circle at 15% 15%, rgba(13, 22, 58, 0.45) 0%, rgba(2, 4, 10, 0.2) 60%),
                radial-gradient(circle at 85% 85%, rgba(30, 9, 56, 0.4) 0%, rgba(2, 4, 10, 0.5) 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(20px, 5vw, 80px) 24px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* ENHANCED: Hardened the static deep canvas backdrop layer pin color */
#bg-particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2; 
    pointer-events: none;
    background: #02040a; 
}

.space-dust-layer {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 0);
    background-size: 50px 50px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.expertise-board-container {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: clamp(16px, 3vw, 28px);
    width: 100%;
    max-width: 1240px;
    padding: clamp(30px, 5vw, 65px) clamp(20px, 4vw, 50px) 40px 50px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
    position: relative;
    z-index: 2;
}

.expertise-header {
    text-align: center;
    margin-bottom: clamp(30px, 5vw, 55px);
}

.expertise-header .category-tag {
    color: #4f46e5;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 12px;
}

.expertise-header .main-title {
    color: #ffffff;
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

/* ==========================================================================
   3D PARALLAX MATTE CARDS WITH ACTIVE GLOW ENGINES
   ========================================================================== */
.expertise-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(260px, 25vw, 340px), 1fr));
    gap: 30px;
    width: 100%;
    margin-bottom: 40px;
}

.expertise-card {
    background: #07090f; 
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    min-height: 490px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    
    transform-style: preserve-3d;
    perspective: 1000px;
    
    border: 1px solid var(--glow-color);
    box-shadow: 0 0 20px rgba(var(--glow-rgb), 0.2);
    
    transition: transform 0.15s ease-out, 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.4s ease;
}

.expertise-card.minecraft-card {
    animation: neonPulse 3s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    0% { box-shadow: 0 0 15px rgba(34, 197, 94, 0.25); border-color: rgba(34, 197, 94, 0.7); }
    100% { box-shadow: 0 0 30px rgba(34, 197, 94, 0.5), inset 0 0 8px rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 1); }
}

.card-sheen-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.08), transparent 60%);
    pointer-events: none;
    z-index: 2;
}

.card-inner-content {
    padding: 50px 30px 40px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    flex: 1;
    z-index: 3;
    transform: translateZ(0px);
}

/* ==========================================================================
   FLOATING ASSETS LOGO MECHANICS
   ========================================================================== */
.logo-box {
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    transform: translateZ(40px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-asset {
    max-height: 100%;
    max-width: 140px;
    object-fit: contain;
    filter: drop-shadow(0 15px 12px rgba(0, 0, 0, 0.6));
    animation: globalFloatIcon 4.5s ease-in-out infinite;
}

.minecraft-card .brand-asset { animation-delay: 0s; }
.roblox-card .brand-asset { animation-delay: 1.5s; }
.retro-ps1-card .brand-asset { animation-delay: 3s; }

@keyframes globalFloatIcon {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.6));
    }
    50% {
        transform: translateY(-12px) rotate(1.5deg);
        filter: drop-shadow(0 25px 18px rgba(0, 0, 0, 0.4));
    }
}

.expertise-card h2 {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 18px 0;
    letter-spacing: -0.3px;
    transform: translateZ(30px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-description {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0 0 30px 0;
    max-width: 250px;
    transform: translateZ(20px);
    transition: color 0.3s ease;
}

.service-description.develop-mode {
    color: #52617a;
}

.arrow-tilt {
    display: inline-block;
    font-size: 0.85rem;
    margin-left: 2px;
    transition: transform 0.3s ease;
}

.expertise-card:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 40px rgba(var(--glow-rgb), 0.6);
}

.expertise-card:hover h2 { color: #ffffff; transform: translateZ(45px); }
.expertise-card:hover .logo-box { transform: translateZ(75px) scale(1.04); }
.expertise-card:hover .arrow-tilt { transform: translate(-2px, 2px); }

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.expertise-card .cta-btn-primary {
    text-decoration: none;
    display: block;
    width: 100%;
    background: #3b82f6; 
    border: none;
    color: #ffffff;
    padding: 15px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: auto;
    position: relative;
    overflow: hidden;
    transform: translateZ(25px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.expertise-card .cta-btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    transform: translateZ(35px) scale(1.02);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-20deg);
}

.expertise-card .cta-btn-primary:hover .btn-shine {
    animation: buttonSweep 1.5s infinite;
}

@keyframes buttonSweep {
    0% { left: -100%; }
    100% { left: 150%; }
}

.expertise-card .cta-btn-muted {
    width: 100%;
    background: transparent;
    border: 1px solid #141b2b; 
    color: #475569;
    padding: 15px 24px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-top: auto;
    cursor: not-allowed;
    transform: translateZ(10px);
}

.ribbon-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #e11d48; 
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
    z-index: 5;
    transform: translateZ(30px);
}

.expertise-footer-note {
    text-align: center;
    margin-top: 15px;
}

.expertise-footer-note p {
    color: #475569;
    font-size: 0.88rem;
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE CANVAS COLLAPSE
   ========================================================================== */
@media (max-width: 950px) {
    .expertise-board-container {
        padding: 40px 24px 30px 24px;
    }
    .expertise-cards-grid {
        max-width: 460px; 
        gap: 25px;
    }
    .expertise-card {
        min-height: 460px;
    }
}

@media (max-width: 480px) {
    .expertise-card .card-inner-content {
        padding: 45px 20px 30px 20px;
    }
    .expertise-header .main-title {
        letter-spacing: -0.3px;
    }
}


.cta-btn-primary {
    text-decoration: none;
}