/* Grid de Empresas - Layout Moderno */
.empresas-carousel-section {
    padding: 30px 0;
    background: linear-gradient(135deg, #23599d 0%, #23599d 100%);
    position: relative;
    overflow: hidden;
    --empresa-card-size: 260px;
}

.empresas-carousel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.empresas-carousel-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.empresas-carousel-title {
    font-size: 2.5rem;
    font-weight: 500;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
    letter-spacing: 0px;
    text-transform: none;
}

.empresas-carousel-subtitle {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.95);
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    text-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.empresas-carousel-container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 50px;
}

.empresas-carousel {
    display: flex;
    gap: 50px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-left: 50px;
    scroll-padding-right: 50px;
    padding: 10px 0 50px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Evitar que o primeiro/último card fique "cortado" */
.empresas-carousel::before,
.empresas-carousel::after {
    content: '';
    flex: 0 0 50px;
}

.empresas-carousel::-webkit-scrollbar {
    display: none;
}

.empresas-carousel::-webkit-scrollbar-track {
    display: none;
}

.empresas-carousel::-webkit-scrollbar-thumb {
    display: none;
}

.empresa-card {
    flex: 0 0 var(--empresa-card-size);
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    scroll-snap-align: start;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
}

.empresa-card::before {
    content: 'DESTAQUE';
    position: absolute;
    top: 15px;
    right: -37px;
    background: #d6c402;
    color: white;
    padding: 5px 40px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    transform: rotate(45deg);
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

.empresa-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: var(--empresa-card-size);
    overflow: hidden;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.empresa-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.empresa-card-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(251, 191, 36, 0.95);
    color: #000;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.empresa-card-content {
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 170px;
    flex: 1;
}

.empresa-card-title {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 10px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -moz-box;
    -moz-line-clamp: 2;
    -moz-box-orient: vertical;
    display: box;
    line-clamp: 2;
    box-orient: vertical;
    overflow: hidden;
}

.empresa-card-description {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -moz-box;
    -moz-line-clamp: 2;
    -moz-box-orient: vertical;
    display: box;
    line-clamp: 2;
    box-orient: vertical;
    overflow: hidden;
}

.empresa-card-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
    padding: 8px 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    min-height: 40px;
}

.empresa-card-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
}

.empresa-card-location svg {
    width: 18px;
    height: 18px;
    color: #fbbf24;
}

.empresa-card-whatsapp {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empresa-card-whatsapp:hover {
    color: #25d366;
}

.empresa-card-whatsapp svg {
    width: 18px;
    height: 18px;
    color: #25d366;
}

.empresa-card-action {
    display: flex;
    justify-content: center;
    margin-top: auto;
}

.empresa-card-btn {
    width: auto;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.empresa-card-btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #000;
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empresa-card-btn-secondary {
    background: #f3f4f6;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.empresas-carousel-nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}

.empresas-carousel-btn {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    border: 3px solid rgba(255,255,255,0.4);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.empresas-carousel-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.6);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

.empresas-carousel-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.empresas-carousel-btn:hover svg {
    transform: scale(1.2);
}

.empresas-carousel-btn.prev svg {
    transform: rotate(180deg);
}

.empresas-carousel-btn.prev:hover svg {
    transform: rotate(180deg) scale(1.2);
}

/* Responsivo */
@media (max-width: 768px) {
    .empresas-carousel-section {
        padding: 60px 0;
        --empresa-card-size: 240px;
    }
    
    .empresas-carousel-title {
        font-size: 2.5rem;
    }
    
    .empresas-carousel-subtitle {
        font-size: 1.1rem;
    }
    
    .empresa-card-content {
        padding: 16px;
    }
    
    .empresa-card-title {
        font-size: 16px;
    }
    
    .empresa-card-action {
        flex-direction: column;
    }
    
    .empresas-carousel-nav {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .empresas-carousel-section {
        --empresa-card-size: clamp(260px, 85vw, 340px);
    }

    .empresas-carousel-container {
        padding: 0 16px;
    }

    .empresas-carousel {
        gap: 16px;
        scroll-padding-left: 16px;
        scroll-padding-right: 16px;
    }

    .empresas-carousel::before,
    .empresas-carousel::after {
        flex: 0 0 16px;
    }

    .empresa-card {
        scroll-snap-align: center;
    }

    .empresa-card-content {
        padding: 14px;
    }
    
    .empresas-carousel-title {
        font-size: 2rem;
    }
}

/* Animações de entrada */
.empresa-card {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInUp 0.8s ease forwards;
}

.empresa-card:nth-child(1) { animation-delay: 0.1s; }
.empresa-card:nth-child(2) { animation-delay: 0.2s; }
.empresa-card:nth-child(3) { animation-delay: 0.3s; }
.empresa-card:nth-child(4) { animation-delay: 0.4s; }
.empresa-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.empresas-carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
}

.empresas-carousel-loading::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}