/* CSS Variables - Seguindo a paleta do projeto */
:root {
    --fire-engine-red: #d62828;
    --prussian-blue: #003049;
    --orange-wheel: #f77f00;
    --xanthous: #fcbf49;
    --vanilla: #eae2b7;
    --charcoal: #37474f;
    --eire-black: #1e1e1e;
    --offwhite: #ffffff;
}

/* Reset e configurações globais */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--prussian-blue) 0%, var(--charcoal) 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Header */
.header-empresas {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--prussian-blue);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.page-title i {
    color: var(--fire-engine-red);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--charcoal);
    margin-bottom: 0;
    font-weight: 400;
}

/* Main Content */
.main-content {
    padding: 0 0 3rem 0;
}

/* Seção de filtros */
.filters-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--charcoal);
    z-index: 2;
}

.search-box input {
    padding-left: 3rem;
    border: 2px solid var(--vanilla);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.search-box input:focus {
    border-color: var(--fire-engine-red);
    box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.1);
    background: white;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-filter {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--vanilla);
    background: rgba(255, 255, 255, 0.8);
    color: var(--charcoal);
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.btn-filter:hover {
    background: linear-gradient(135deg, var(--fire-engine-red), var(--orange-wheel));
    color: white;
    border-color: var(--fire-engine-red);
    transform: translateY(-2px);
}

.btn-filter.active {
    background: linear-gradient(135deg, var(--fire-engine-red), var(--orange-wheel));
    color: white;
    border-color: var(--fire-engine-red);
    box-shadow: 0 4px 15px rgba(214, 40, 40, 0.3);
}

/* Grid de empresas */
.empresas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* Cards das empresas */
.empresa-card {
    transition: all 0.3s ease;
}

.empresa-card .card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
}

.empresa-card:hover .card {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Imagem do card */
.card-img-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.empresa-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Badge de status */
.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.status-aberto {
    background: linear-gradient(135deg, var(--xanthous), var(--orange-wheel));
    color: var(--eire-black);
}

.status-fechado {
    background: linear-gradient(135deg, var(--fire-engine-red), #c53030);
    color: white;
}

/* Conteúdo do card */
.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--prussian-blue);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.empresa-info {
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--charcoal);
    font-size: 0.9rem;
}

.info-item i {
    color: var(--fire-engine-red);
    width: 16px;
    text-align: center;
}

/* Botões de ação */
.btn-acessar {
    background: linear-gradient(135deg, var(--fire-engine-red), var(--orange-wheel));
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--offwhite);
}

.btn-acessar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(214, 40, 40, 0.4);
    background: linear-gradient(135deg, #c53030, #e53e3e);
}

.btn-secondary {
    background: var(--vanilla);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    color: var(--charcoal);
}

/* Mensagem de nenhum resultado */
.no-results {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Botão Voltar */
.btn-voltar {
    background: transparent;
    color: var(--prussian-blue);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--prussian-blue);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.btn-voltar:hover {
    background: var(--prussian-blue);
    color: var(--offwhite);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 48, 73, 0.3);
}

/* Footer */
.footer-empresas {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.footer-empresas p {
    color: var(--charcoal);
    font-size: 0.9rem;
}

.footer-empresas a {
    color: var(--fire-engine-red);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-empresas a:hover {
    color: var(--orange-wheel);
}

/* Responsividade */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .empresas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .filter-buttons {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .btn-filter {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .filters-section {
        padding: 1.5rem;
    }
    
    .header-empresas {
        text-align: center;
    }
    
    .header-empresas .col-md-6 {
        text-align: center !important;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.75rem;
        flex-direction: column;
        text-align: center;
    }
    
    .page-title i {
        margin-bottom: 0.5rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-filter {
        justify-content: center;
    }
}

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

.empresa-card {
    animation: fadeInUp 0.6s 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; }
.empresa-card:nth-child(6) { animation-delay: 0.6s; }

/* Estados de filtro */
.empresa-card.hidden {
    display: none;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Scrollbar customizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}
