/**
 * WENTZ V3 - SISTEMA DE STACK LAYERS PARA BENEFÍCIOS
 * Implementação exata da lógica fornecida pelo usuário
 */

/* ==================== SEÇÃO DE BENEFÍCIOS ==================== */
.benefits-section {
    padding: 100px 20px;
    background: rgba(10, 14, 39, 0.6);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 10;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.section-title p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.benefits-grid {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 80px 0 300px 0;
    min-height: 120vh;
}

.benefit-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    padding: 40px 32px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s ease-out,
                border-color 0.25s ease-out,
                opacity 0.4s ease,
                transform 0.4s ease,
                filter 0.4s ease;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 120px;
    overflow: visible;
    will-change: transform, opacity, filter, box-shadow;
    backface-visibility: hidden;
    margin-bottom: 80px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    pointer-events: auto;
    /* Variaveis CSS para efeito de proximidade */
    --prox-scale: 1;
    --prox-brightness: 1;
    --prox-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --prox-border: rgba(255, 255, 255, 0.1);
    /* Estado inicial sera definido pelo JS */
    transform: translateZ(0);
    opacity: 1;
}

/* ==================== EFEITO DE BRILHO POR PROXIMIDADE (SCROLL) ==================== */
.benefit-card.proximity-active {
    box-shadow: var(--prox-shadow) !important;
    border-color: var(--prox-border) !important;
    filter: brightness(var(--prox-brightness)) !important;
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 166, 0.8), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.benefit-card:hover::before {
    transform: translateX(100%);
}

.benefit-card:hover {
    transform: translateZ(0) scale(1.08) rotateX(-3deg) translateY(-15px) !important;
    box-shadow: 0 20px 60px rgba(0, 102, 166, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    opacity: 1 !important;
    z-index: 20 !important;
    filter: brightness(1.2) !important;
}

/* Estados das camadas para benefit cards */
.benefit-card.active {
    opacity: 1;
    transform: translateZ(0) scale(1) rotateX(0deg) translateY(0px);
    filter: brightness(1);
    z-index: 16;
}

.benefit-card.layer-behind-1 {
    opacity: 0.8;
    transform: translateZ(0) scale(0.95) rotateX(2deg) translateY(25px);
    filter: brightness(0.9);
    z-index: 15;
}

.benefit-card.layer-behind-2 {
    opacity: 0.65;
    transform: translateZ(0) scale(0.9) rotateX(4deg) translateY(50px);
    filter: brightness(0.75);
    z-index: 14;
}

.benefit-card.layer-behind-3 {
    opacity: 0.5;
    transform: translateZ(0) scale(0.85) rotateX(6deg) translateY(75px);
    filter: brightness(0.6);
    z-index: 13;
}

.benefit-card.layer-behind-4 {
    opacity: 0.35;
    transform: translateZ(0) scale(0.8) rotateX(8deg) translateY(100px);
    filter: brightness(0.45);
    z-index: 12;
}

/* Estado inicial - empilhamento progressivo */
.benefit-card:nth-child(1) {
    opacity: 1;
    transform: translateZ(0) scale(1) rotateX(0deg) translateY(0px);
    z-index: 16;
    filter: brightness(1);
}

.benefit-card:nth-child(2) {
    opacity: 0.8;
    transform: translateZ(0) scale(0.95) rotateX(2deg) translateY(25px);
    z-index: 15;
    filter: brightness(0.9);
}

.benefit-card:nth-child(3) {
    opacity: 0.65;
    transform: translateZ(0) scale(0.9) rotateX(4deg) translateY(50px);
    z-index: 14;
    filter: brightness(0.75);
}

.benefit-card:nth-child(4) {
    opacity: 0.5;
    transform: translateZ(0) scale(0.85) rotateX(6deg) translateY(75px);
    z-index: 13;
    filter: brightness(0.6);
}

.benefit-card:nth-child(5) {
    opacity: 0.35;
    transform: translateZ(0) scale(0.8) rotateX(8deg) translateY(100px);
    z-index: 12;
    filter: brightness(0.45);
}

.benefit-icon {
    font-size: 56px;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 102, 166, 0.3));
}

.benefit-icon i {
    color: rgba(96, 165, 250, 0.9);
}

.benefit-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.benefit-card p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsividade */
@media (max-width: 768px) {
    .benefits-grid {
        min-height: 100vh;
        padding: 50px 0 200px 0;
    }

    .benefit-card {
        padding: 28px 22px;
        max-width: 360px;
        margin-bottom: 50px;
    }
}
