/* =========================================
   CARROSSEL DE CASES DE SUCESSO - PREMIUM
   ========================================= */

@keyframes elementGlow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
    }
    50% {
        box-shadow: 0 8px 20px rgba(255, 107, 0, 0.4);
    }
}

.cases-section {
    padding: 100px 0;
    background: #0A0E27; /* Fundo azul muito escuro */
    position: relative;
    overflow: hidden;
}

/* Decoração sutil de fundo */
.cases-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 50%, rgba(255, 107, 0, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 85% 50%, rgba(255, 184, 0, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

/* Header da seção */
.cases-header {
    text-align: center;
    margin-bottom: 64px;
    position: relative;
    z-index: 2;
}

.cases-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 16px;
    line-height: 1.2;
}

.cases-subtitle {
    font-size: 1.125rem;
    color: #C7D2E0;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* Container do carrossel */
.cases-carousel-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.cases-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
}

/* Track do carrossel */
.cases-carousel-track {
    display: flex;
    gap: 32px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Card individual */
.case-card {
    flex: 0 0 auto;
    width: 380px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: grab;
}

.case-card:active {
    cursor: grabbing;
}

.case-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 20px 60px rgba(255, 107, 0, 0.15);
    animation: none;
}

/* Imagem do case */
.case-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #1a1d3a;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.case-card:hover .case-image img {
    transform: scale(1.05);
}

/* Overlay na imagem */
.case-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 14, 39, 0) 0%,
        rgba(10, 14, 39, 0.4) 100%
    );
    pointer-events: none;
}

/* Badge "CASE SOLAR" */
.case-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
    animation: elementGlow 1s ease-in-out infinite;
}

/* Conteúdo do card */
.case-content {
    padding: 28px;
}

.case-company {
    font-family: 'Poppins', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
    line-height: 1.3;
}

.case-result {
    font-size: 1rem;
    color: #C7D2E0;
    line-height: 1.6;
    margin: 0;
}

/* Setas de navegação (Desktop) */
.cases-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: white;
    font-size: 1.25rem;
}

.cases-nav-button:hover {
    background: rgba(255, 107, 0, 0.15);
    border-color: rgba(255, 107, 0, 0.4);
    transform: translateY(-50%) scale(1.05);
}

.cases-nav-button:active {
    transform: translateY(-50%) scale(0.95);
}

.cases-nav-button.prev {
    left: -28px;
}

.cases-nav-button.next {
    right: -28px;
}

/* Indicadores de progresso (dots) */
.cases-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.case-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.case-indicator.active {
    background: #FF6B00;
    width: 32px;
    border-radius: 5px;
}

/* =========================================
   RESPONSIVIDADE
   ========================================= */

/* Desktop grande (>1400px) */
@media (min-width: 1400px) {
    .case-card {
        width: 420px;
    }
}

/* Desktop padrão (>1024px) */
@media (min-width: 1024px) and (max-width: 1399px) {
    .case-card {
        width: 360px;
    }
}

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
    .cases-section {
        padding: 80px 0;
    }

    .cases-header {
        margin-bottom: 48px;
    }

    .case-card {
        width: 340px;
    }

    .cases-nav-button {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .cases-nav-button.prev {
        left: 0;
    }

    .cases-nav-button.next {
        right: 0;
    }
}

/* Tablet pequeno (≤768px) */
@media (max-width: 768px) {
    .cases-section {
        padding: 60px 0;
    }

    .cases-header h2 {
        font-size: 1.875rem;
    }

    .cases-subtitle {
        font-size: 1rem;
    }

    .case-card {
        width: 320px;
    }

    .case-image {
        height: 240px;
    }

    .case-content {
        padding: 24px;
    }

    .case-company {
        font-size: 1.25rem;
    }

    .case-result {
        font-size: 0.9375rem;
    }

    /* Oculta setas no tablet/mobile */
    .cases-nav-button {
        display: none;
    }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
    .cases-section {
        padding: 48px 0;
    }

    .cases-header {
        margin-bottom: 40px;
    }

    .cases-header h2 {
        font-size: 1.75rem;
    }

    .cases-subtitle {
        font-size: 0.9375rem;
    }

    .cases-carousel-wrapper {
        padding: 0 16px;
    }

    .cases-carousel-track {
        gap: 20px;
    }

    .case-card {
        width: 100%;
        max-width: 340px;
    }

    .case-image {
        height: 220px;
    }

    .case-content {
        padding: 20px;
    }

    .case-company {
        font-size: 1.125rem;
        margin-bottom: 10px;
    }

    .case-result {
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .case-badge {
        font-size: 0.6875rem;
        padding: 5px 12px;
    }

    .cases-indicators {
        gap: 10px;
        margin-top: 32px;
    }

    .case-indicator {
        width: 8px;
        height: 8px;
    }

    .case-indicator.active {
        width: 28px;
    }
}

/* Modo escuro - forçar para garantir contraste */
@media (prefers-color-scheme: dark) {
    .cases-section {
        background: #0A0E27;
    }
}

/* =========================================
   ANIMAÇÕES E INTERATIVIDADE
   ========================================= */

/* Scroll suave */
.cases-carousel-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Oculta scrollbar mas mantém funcionalidade */
.cases-carousel-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.cases-carousel-container::-webkit-scrollbar {
    display: none;
}

/* Loading state */
.case-card.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Animação de entrada dos cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.case-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.case-card:nth-child(1) { animation-delay: 0.1s; }
.case-card:nth-child(2) { animation-delay: 0.2s; }
.case-card:nth-child(3) { animation-delay: 0.3s; }
.case-card:nth-child(4) { animation-delay: 0.4s; }
.case-card:nth-child(5) { animation-delay: 0.5s; }
.case-card:nth-child(6) { animation-delay: 0.6s; }
.case-card:nth-child(7) { animation-delay: 0.7s; }

/* Reduz animações se usuário preferir */
@media (prefers-reduced-motion: reduce) {
    .cases-carousel-track,
    .case-card,
    .case-image img,
    .cases-nav-button {
        transition: none !important;
        animation: none !important;
    }
}
