/* ===== SEÇÃO NOSSA STACK - DARK MODE PREMIUM ===== */
.stack-section {
    padding: 4rem 1.25rem;
    background: linear-gradient(135deg, #0a1a42 0%, #081638 50%, #06122e 100%);
    position: relative;
    overflow: hidden;
    margin-top: 0;
    z-index: 1;
    display: block;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    contain: layout style;
}

/* Efeitos de fundo tecnológicos */
.stack-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 191, 255, 0.03) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

.stack-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.stack-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative !important; /* Forçar posição relativa */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto !important;
}

.stack-title {
    font-size: 1.75rem; /* Menor para acomodar texto mais longo */
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.03em; /* Menor para melhor legibilidade */
    background: linear-gradient(135deg, #ffffff 0%, #00FFFF 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative !important; /* Forçar posição relativa */
    line-height: 1.2; /* Melhor espaçamento de linha */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto !important;
}

.stack-divider {
    width: 5rem;
    height: 4px;
    background: linear-gradient(90deg, #00FFFF 0%, #00BFFF 50%, #00FFFF 100%);
    margin: 0 auto 1.5rem;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 40px rgba(0, 191, 255, 0.4),
        0 2px 8px rgba(0, 255, 255, 0.3);
}

/* Efeito de brilho animado na linha divisória */
.stack-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: stackShimmer 2.5s ease-in-out infinite;
    border-radius: 3px;
}

@keyframes stackShimmer {
    0% { 
        left: -100%; 
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% { 
        left: 100%; 
        opacity: 0;
    }
}

.stack-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative !important; /* Forçar posição relativa */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    z-index: auto !important;
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stack-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stack-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stack-item:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(0, 255, 255, 0.2);
}

.stack-item:hover::before {
    opacity: 1;
}

.stack-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.stack-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.stack-item h3 {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stack-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* Responsividade */
@media (max-width: 480px) {
    .stack-section {
        position: static !important; /* Forçar posição estática em mobile */
        transform: none !important; /* Remover qualquer transformação */
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin: 0 !important;
        padding: 3rem 1rem; /* Padding menor em mobile */
        display: block !important;
        overflow: visible !important;
    }
    
    .stack-container {
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        display: block !important;
    }
    
    .stack-header {
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        display: block !important;
        margin-bottom: 2rem;
    }
    
    .stack-title {
        font-size: 1.5rem; /* Menor para mobile pequeno */
        letter-spacing: 0.02em;
        line-height: 1.3;
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        display: block !important;
        margin-bottom: 1rem;
    }
    
    .stack-subtitle {
        font-size: 1rem;
        position: static !important;
        transform: none !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        display: block !important;
    }
}

@media (min-width: 768px) {
    .stack-section {
        padding: 5rem 2rem;
    }
    
    .stack-title {
        font-size: 2.125rem; /* Tamanho intermediário para tablet */
    }
    
    .stack-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .stack-section {
        padding: 6rem 3rem;
    }
    
    .stack-title {
        font-size: 2.5rem; /* Tamanho maior para desktop */
    }
    
    .stack-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .stack-item {
        padding: 2.5rem 1.5rem;
    }
}

@media (min-width: 1200px) {
    .stack-title {
        font-size: 2.75rem; /* Ainda maior para telas grandes */
        letter-spacing: 0.04em; /* Mais espaçamento em telas grandes */
    }
}

/* Animações de entrada */
@keyframes stackFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stack-item {
    animation: stackFadeIn 0.6s ease-out forwards;
}

.stack-item:nth-child(1) { animation-delay: 0.1s; }
.stack-item:nth-child(2) { animation-delay: 0.2s; }
.stack-item:nth-child(3) { animation-delay: 0.3s; }
.stack-item:nth-child(4) { animation-delay: 0.4s; }