/* ===================================
   BREADCRUMB
   =================================== */

.breadcrumb-section {
    padding: 12px 0 10px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 10;
    margin-top: 60px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: #666666;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555555;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.breadcrumb-item:not(.active):hover {
    color: #c8102e;
}

.breadcrumb-item:not(.active):hover i {
    transform: scale(1.1);
}

.breadcrumb-item.active {
    color: #333333;
    font-weight: 600;
    cursor: default;
}

.breadcrumb-item i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.breadcrumb-separator {
    color: #cccccc;
    user-select: none;
    font-weight: 400;
}

/* ===================================
   PAGE HERO
   =================================== */

.empresas-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    padding: 80px 0 60px;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.empresas-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
    opacity: 0.5;
    pointer-events: none;
}

.empresas-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.empresas-hero-title {
    font-family: "Poppins", sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.empresas-hero-subtitle {
    font-family: "Open Sans", sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    color: #e0e0e0;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

/* ===================================
   SEÇÃO DE BUSCA
   =================================== */

.empresas-search {
    padding: 50px 0;
    background-color: var(--color-white);
    border-bottom: 1px solid #e0e0e0;
}

.search-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.search-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 24px;
    text-align: center;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 16px;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    grid-row: 1;
    align-self: end;
}

.search-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-label i {
    font-size: 0.875rem;
    color: var(--color-primary);
}

.search-input,
.search-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    color: var(--color-dark);
    background-color: var(--color-white);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.search-input:focus,
.search-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.search-buttons-wrapper {
    grid-row: 1 / 3;
    grid-column: 3;
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;
    align-items: end;
}

.search-btn {
    grid-row: 1;
    align-self: end;
    padding: 14px 32px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
    white-space: nowrap;
}

.search-btn:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.4);
}

.search-btn i {
    font-size: 1rem;
}

.search-clear {
    grid-row: 2;
    margin: 0;
}

.btn-limpar-filtros {
    background: transparent;
    border: 2px solid #e0e0e0;
    color: var(--color-gray);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-limpar-filtros:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

/* ===================================
   SEÇÃO DE RESULTADOS
   =================================== */

.empresas-results {
    padding: 60px 0;
    background-color: var(--color-light);
    min-height: 500px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.results-count {
    font-size: 1.125rem;
    color: var(--color-dark);
    font-weight: 600;
}

.results-count span {
    color: var(--color-primary);
}

.results-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-sort label {
    font-size: 0.9375rem;
    color: var(--color-gray);
    font-weight: 500;
}

.results-sort select {
    padding: 8px 32px 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9375rem;
    color: var(--color-dark);
    background-color: var(--color-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.results-sort select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Grid de Empresas */
.empresas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Card de Empresa */
.empresa-card {
    background-color: var(--color-white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.empresa-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--color-primary) 0%,
        var(--color-primary-dark) 100%
    );
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.empresa-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(200, 16, 46, 0.1);
}

.empresa-card:hover::before {
    transform: scaleX(1);
}

.empresa-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Logo da Empresa */
.empresa-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.empresa-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

/* Placeholder quando não há logo */
.empresa-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 24px;
}

.empresa-title-group {
    flex: 1;
}

.empresa-nome {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}

.empresa-ramo {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.empresa-info {
    margin-bottom: 16px;
}

.empresa-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.9375rem;
    color: var(--color-dark);
}

.empresa-info-item i {
    width: 20px;
    font-size: 0.875rem;
    color: var(--color-gray);
    flex-shrink: 0;
}

.empresa-info-item strong {
    font-weight: 600;
    min-width: 80px;
}

.empresa-localizacao {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.empresa-localizacao strong {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-primary);
    min-width: auto;
}

.empresa-localizacao span {
    font-size: 0.9375rem;
    color: var(--color-gray);
    font-weight: 500;
}

.empresa-contato {
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.empresa-contato-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.875rem;
    color: var(--color-gray);
}

.empresa-contato-item i {
    font-size: 0.875rem;
    color: var(--color-primary);
    width: 16px;
}

.empresa-contato-item a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.empresa-contato-item a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Estado vazio */
.empresas-empty {
    text-align: center;
    padding: 80px 20px;
    display: none;
}

.empresas-empty.show {
    display: block;
}

.empresas-empty > i {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 24px;
}

.empresas-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-dark);
    margin-bottom: 12px;
}

.empresas-empty p {
    font-size: 1rem;
    color: var(--color-gray);
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.empresas-empty .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: transparent;
    color: var(--color-gray);
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empresas-empty .btn i {
    font-size: 0.875rem;
    margin-bottom: 0;
    color: inherit;
}

.empresas-empty .btn:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.2);
}

/* ===================================
   PAGINAÇÃO
   =================================== */

.pagination-wrapper {
    margin-top: 40px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    background-color: var(--color-white);
    color: var(--color-dark);
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-link:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.page-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-item.active .page-link {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.25);
}

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

@keyframes underlineGrow {
    from {
        width: 0;
        left: 50%;
    }
    to {
        width: 100%;
        left: 0;
    }
}

/* Fade in dos cards */
.empresa-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

.empresa-card:nth-child(1) {
    animation-delay: 0.05s;
}
.empresa-card:nth-child(2) {
    animation-delay: 0.1s;
}
.empresa-card:nth-child(3) {
    animation-delay: 0.15s;
}
.empresa-card:nth-child(4) {
    animation-delay: 0.2s;
}
.empresa-card:nth-child(5) {
    animation-delay: 0.25s;
}
.empresa-card:nth-child(6) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Tablets */
@media (max-width: 992px) {
    .empresas-hero {
        padding: 60px 0 50px;
    }

    .empresas-hero-title {
        font-size: 2.5rem;
    }

    .empresas-hero-subtitle {
        font-size: 1.1rem;
    }

    .empresas-search {
        padding: 40px 0;
    }

    .search-form {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 16px;
    }

    .search-group {
        grid-row: auto;
    }

    .search-buttons-wrapper {
        grid-row: auto;
        grid-column: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .search-btn {
        width: 100%;
        grid-row: auto;
    }

    .search-clear {
        grid-row: auto;
        width: 100%;
    }

    .btn-limpar-filtros {
        width: 100%;
        display: flex;
    }

    .empresas-results {
        padding: 50px 0;
    }

    .empresas-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .breadcrumb-section {
        padding: 10px 0;
    }

    .empresas-hero {
        padding: 50px 0 40px;
    }

    .empresas-hero-title {
        font-size: 2rem;
    }

    .empresas-hero-subtitle {
        font-size: 1rem;
    }

    .empresas-search {
        padding: 30px 0;
    }

    .search-title {
        font-size: 1.25rem;
    }

    .search-input,
    .search-select,
    .search-btn {
        padding: 12px 14px;
        font-size: 0.9375rem;
    }

    .empresas-results {
        padding: 40px 0;
    }

    .results-count {
        font-size: 1rem;
    }

    .results-sort {
        width: 100%;
        justify-content: space-between;
    }

    .empresas-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .empresa-card {
        padding: 20px;
    }

    .empresa-header {
        gap: 12px;
    }

    .empresa-logo {
        width: 50px;
        height: 50px;
    }

    .empresa-icon-placeholder {
        font-size: 20px;
    }

    .empresa-nome {
        font-size: 1rem;
    }

    .empresa-ramo {
        font-size: 0.8125rem;
    }

    .empresa-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .empresa-info-item strong {
        min-width: auto;
    }

    .empresas-empty {
        padding: 60px 20px;
    }

    .empresas-empty i {
        font-size: 3rem;
    }

    .empresas-empty h3 {
        font-size: 1.25rem;
    }

    .empresas-empty p {
        font-size: 0.9375rem;
    }

    .pagination {
        gap: 6px;
    }

    .page-link {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 0.875rem;
    }
}

/* Mobile Pequeno */
@media (max-width: 375px) {
    .empresas-hero-title {
        font-size: 1.625rem;
    }

    .search-title {
        font-size: 1.125rem;
    }

    .empresa-card {
        padding: 16px;
    }
}
