/* ======================= ANIMAÇÕES ======================= */

/* Grid de Clientes Moderno */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.client-logo {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.client-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 82, 204, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.client-logo:hover::before {
    opacity: 1;
}

.client-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    filter: grayscale(100%) contrast(0.8);
}

.client-logo:hover img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.1);
}

.client-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-text);
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.client-logo:hover .client-name {
    color: var(--primary-blue);
}

/* Responsividade */
@media (max-width: 1024px) {
    .clients-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }
    
    .client-logo img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 640px) {
    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .client-logo {
        padding: 1rem;
    }
    
    .client-logo img {
        width: 50px;
        height: 50px;
    }
    
    .client-name {
        font-size: 0.8rem;
    }
}

/* ======================= ANIMAÇÕES ======================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Classes de animação */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Efeito de hover nos cards */
.benefit-card, .position-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover, .position-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Efeito nos botões */
.btn-apply, .btn-secondary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-apply::after, .btn-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    opacity: 0;
}

.btn-apply:hover::after, .btn-secondary:hover::after {
    width: 300px;
    height: 300px;
    opacity: 1;
}

/* Efeito de loading */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Animações para os ícones */
.benefit-icon {
    transition: transform 0.3s ease;
}

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

/* Animações para os cards de vaga */
.position-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.position-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Carrossel Circular de Clientes - Efeito Órbita */
.clients-carousel {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 600px;
    margin: 0 auto;
    perspective: 2400px;
    overflow: visible;
    --primary-color: #2563eb;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.orbit-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform-style: preserve-3d;
    animation: rotateOrbit 90s linear infinite;
    transform-origin: center center;
    z-index: 2;
    animation-timing-function: cubic-bezier(0.2, 0.6, 0.8, 0.4);
}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Planeta */
.planet {
    width: 150px;
    height: 150px;
    border-radius: 24px;
    background: linear-gradient(145deg, #1e1b4b, #0f172a);
    background-size: 200% 200%;
    animation: gradientShift 12s ease infinite;
    box-shadow: var(--glass-shadow),
                inset 0 1px 1px rgba(255, 255, 255, 0.1),
                inset 0 -1px 1px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    animation: float 8s ease-in-out infinite;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.planet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    border-radius: 20px;
    z-index: -1;
}

.planet:hover {
    transform: translate(-50%, -50%) scale(1.03);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

/* Anel orbital */
.planet::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border: 2px dashed rgba(0, 82, 204, 0.2);
    border-radius: 50%;
    z-index: 1;
    /* Removida a animação de rotação */
}

/* Logo dentro do planeta */
.planet .center-logo {
    width: 80%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 3;
    transition: none; /* Removida a transição */
    transform: none !important; /* Força a não rotação */
}

/* Efeito de brilho */
.planet::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    opacity: 0.3;
    transform: rotate(30deg);
    z-index: 2;
}

/* Animações */
@keyframes rotateOrbit {
    0% { 
        transform: translate(-50%, -50%) rotateY(0) rotateX(12deg) rotateZ(0); 
    }
    100% { 
        transform: translate(-50%, -50%) rotateY(360deg) rotateX(12deg) rotateZ(0); 
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    50% { 
        transform: translateY(-15px) rotate(1deg); 
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efeito hover */
.orbit-center:hover .planet {
    transform: none; /* Remove a transformação no hover */
    box-shadow: 
        0 0 60px rgba(0, 82, 204, 0.3),
        inset 15px 15px 30px rgba(255, 255, 255, 0.8),
        inset -15px -15px 30px rgba(0, 0, 0, 0.1);
}

.orbit-center:hover .planet::before {
    border-color: rgba(0, 82, 204, 0.3);
}

/* Cores dos itens orbitais */
.carousel-item {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    backface-visibility: visible;
    transform-style: preserve-3d;
    will-change: transform, box-shadow, background;
    transform: rotateY(calc(var(--i) * 60deg)) translateZ(350px) rotateY(calc(-1 * var(--i) * 60deg));
    z-index: 2;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    animation: float 8s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.5s);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.2);
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    padding: 1px;
}

.carousel-item:hover {
    transform: rotateY(calc(var(--i) * 60deg)) translateZ(350px) rotateY(calc(-1 * var(--i) * 60deg)) scale(1.25) translateZ(100px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    z-index: 20;
    animation: none;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.carousel-item img {
    width: 55%;
    height: 55%;
    object-fit: contain;
    filter: grayscale(80%) contrast(1.2) brightness(0.9);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.2);
    opacity: 0.9;
    will-change: transform, filter, opacity;
}

.carousel-item:hover img {
    transform: scale(1.2) rotate(2deg);
    filter: grayscale(0%) contrast(1.1) brightness(1.1) drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    opacity: 1;
}

/* Animação de órbita principal */
@keyframes orbit {
    from { transform: rotateY(0); }
    to { transform: rotateY(-360deg); }
}

/* Posicionamento dos itens na órbita */
.carousel-item {
    --total-items: 6;
    --radius: 250px;
    --angle: calc(360deg / var(--total-items) * (var(--i) - 1));
    
    /* Posição inicial */
    transform: 
        rotateY(var(--angle, 0deg))
        translateZ(var(--radius))
        rotateY(calc(-1 * var(--angle, 0deg)));
    
    /* Animações */
    animation: 
        orbit-float 24s linear infinite,
        item-float 4s ease-in-out infinite;
    animation-delay: 
        calc(var(--i, 0) * -4s),
        calc(var(--i, 0) * 0.5s);
    
    /* Garante que as transformações sejam aplicadas corretamente */
    transform-style: preserve-3d;
    backface-visibility: visible;
}

/* Animações de órbita e flutuação */
@keyframes orbit-float {
    from { 
        transform: 
            rotateY(0deg)
            translateZ(var(--radius))
            rotateY(0deg);
    }
    to { 
        transform: 
            rotateY(360deg)
            translateZ(var(--radius))
            rotateY(-360deg);
    }
}

@keyframes item-float {
    0%, 100% { 
        transform: 
            rotateY(var(--angle, 0deg))
            translateZ(var(--radius))
            rotateY(calc(-1 * var(--angle, 0deg)))
            translateY(0);
    }
    50% { 
        transform: 
            rotateY(var(--angle, 0deg))
            translateZ(var(--radius))
            rotateY(calc(-1 * var(--angle, 0deg)))
            translateY(-15px);
    }
}

/* Ajuste fino para cada item */
.carousel-item:nth-child(1) { --i: 1; }
.carousel-item:nth-child(2) { --i: 2; }
.carousel-item:nth-child(3) { --i: 3; }
.carousel-item:nth-child(4) { --i: 4; }
.carousel-item:nth-child(5) { --i: 5; }
.carousel-item:nth-child(6) { --i: 6; }

/* Estilo para a legenda dos clientes */
.clients-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.clients-legend.animate-on-scroll {
    opacity: 1;
    transform: translateY(0);
}

.clients-legend span {
    background: #f1f5f9;
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.clients-legend span:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 768px) {
    .clients-carousel {
        height: 300px;
    }
    
    /* Posicionamento e atrasos de animação */
    .carousel-item {
        transform: rotateY(calc(var(--i) * 60deg)) translateZ(180px) rotateY(calc(-1 * var(--i) * 60deg));
    }
    
    .carousel-item:nth-child(1) { --i: 0; animation-delay: 0s; }
    .carousel-item:nth-child(2) { --i: 1; animation-delay: -6.6s; }
    .carousel-item:nth-child(3) { --i: 2; animation-delay: -13.3s; }
    .carousel-item:nth-child(4) { --i: 3; animation-delay: -20s; }
    .carousel-item:nth-child(5) { --i: 4; animation-delay: -26.6s; }
    .carousel-item:nth-child(6) { --i: 5; animation-delay: -33.3s; }
    
    .clients-legend {
        gap: 0.5rem;
    }
    
    .clients-legend span {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Efeito de digitação */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-blue); }
}

.typing-effect {
    overflow: hidden;
    border-right: 3px solid var(--primary-blue);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 0.15em;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

/* Animações para o hero section */
.hero-section h1 {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.hero-section p {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

/* Animações para a seção de benefícios */
.benefit-card {
    opacity: 0;
    transform: translateY(30px);
}

.benefit-card:nth-child(1) { animation: fadeInUp 0.8s ease-out 0.3s forwards; }
.benefit-card:nth-child(2) { animation: fadeInUp 0.8s ease-out 0.5s forwards; }
.benefit-card:nth-child(3) { animation: fadeInUp 0.8s ease-out 0.7s forwards; }
.benefit-card:nth-child(4) { animation: fadeInUp 0.8s ease-out 0.9s forwards; }

/* Estilos para os cards de parceiros */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.partner-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Delay para cada card */
.partner-card:nth-child(1) { animation-delay: 0.1s; }
.partner-card:nth-child(2) { animation-delay: 0.3s; }
.partner-card:nth-child(3) { animation-delay: 0.5s; }

.partner-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue);
}

.partner-logo {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.partner-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: grayscale(100%) contrast(0.8);
}

.partner-card:hover .partner-logo img {
    filter: grayscale(0%) contrast(1);
    transform: scale(1.1);
}

.partner-card h3 {
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.partner-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    min-height: 3em;
}

/* Responsividade */
@media (max-width: 768px) {
    .partners-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .partner-card {
        padding: 1.5rem;
    }
}
