/**
 * Estilos Públicos Premium - Associados ACEOP
 * Cores: Azul ACEOP #174799, Amarelo ACEOP #F2C12E
 */

/* Container Principal do Diretório */
.aceop-directory-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334155;
    background: transparent;
}

/* Barra de Filtros Lado a Lado */
.aceop-filters-bar {
    display: flex;
    gap: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 32px;
    align-items: center;
    flex-wrap: wrap;
}

.aceop-filter-col {
    flex: 1;
    min-width: 280px;
}

/* Inputs de Filtro */
.aceop-search-wrapper,
.aceop-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.aceop-search-wrapper .search-icon,
.aceop-select-wrapper .category-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 20px;
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.aceop-search-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 100px 12px 44px !important;
    font-size: 15px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    transition: all 0.3s ease !important;
    height: 48px !important;
    box-sizing: border-box !important;
}

.aceop-search-wrapper input[type="text"]:focus {
    border-color: #174799 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(23, 71, 153, 0.1) !important;
    outline: none !important;
}

.aceop-search-button {
    position: absolute;
    right: 6px;
    background-color: #174799 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    height: 36px !important;
    line-height: 20px !important;
    box-shadow: 0 2px 4px rgba(23, 71, 153, 0.15) !important;
}

.aceop-search-button:hover {
    background-color: #113470 !important;
    box-shadow: 0 3px 6px rgba(23, 71, 153, 0.25) !important;
}

.aceop-select-wrapper select {
    width: 100%;
    padding: 12px 40px 12px 44px !important;
    font-size: 15px !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #f8fafc url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center !important;
    background-size: 18px !important;
    color: #1e293b !important;
    appearance: none !important;
    transition: all 0.3s ease !important;
    height: 48px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

.aceop-select-wrapper select:focus {
    border-color: #174799 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(23, 71, 153, 0.1) !important;
    outline: none !important;
}

/* Grid de Cards */
.aceop-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
    transition: opacity 0.3s ease;
}

/* Card Individual Estilo Premium */
.aceop-associado-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-bottom: 4px solid #e2e8f0;
}

.aceop-associado-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -3px rgba(23, 71, 153, 0.08), 0 4px 12px -2px rgba(23, 71, 153, 0.05);
    border-color: #174799;
    border-bottom-color: #174799;
}

/* Header do Card */
.aceop-card-header {
    padding: 24px 20px 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.aceop-card-logo-container {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.aceop-card-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.aceop-card-logo-fallback {
    width: 100%;
    height: 100%;
    background-color: #eff6ff;
    color: #174799;
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.aceop-card-title-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0; /* Evita quebra de flex layout com textos longos */
}

.aceop-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge de Segmento Amarelo Premium e Texto Azul */
.aceop-card-segment-badge {
    background-color: #F2C12E;
    color: #174799;
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(242, 193, 46, 0.2);
}

/* Corpo do Card */
.aceop-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-grow: 1;
}

.aceop-card-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.45;
}

.aceop-card-info-row .icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #174799;
    flex-shrink: 0;
    margin-top: 1px;
}

.info-content {
    min-width: 0;
    word-break: break-word;
}

/* Links do Card */
.aceop-contact-link {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.aceop-contact-link:hover {
    color: #174799;
}

.aceop-website-link {
    color: #174799;
    font-weight: 600;
}

/* Endereço Premium e link direto para o Google Maps */
.aceop-address-row .icon {
    color: #ef4444; /* Destaque de localização no mapa */
}

.aceop-map-link {
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

.aceop-map-link:hover {
    color: #ef4444;
    border-bottom-color: #ef4444;
}

/* Footer do Card (Redes Sociais) */
.aceop-card-footer {
    padding: 16px 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

.aceop-social-links {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.social-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: color 0.2s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Cores específicas de hover das redes sociais */
.social-icon.instagram:hover {
    background-color: #fdf2f8;
    border-color: #f472b6;
}
.social-icon.instagram:hover .dashicons {
    color: #db2777;
}

.social-icon.facebook:hover {
    background-color: #eff6ff;
    border-color: #60a5fa;
}
.social-icon.facebook:hover .dashicons {
    color: #2563eb;
}

.social-icon.linkedin:hover {
    background-color: #f0fdfa;
    border-color: #2dd4bf;
}
.social-icon.linkedin:hover .dashicons {
    color: #0d9488;
}

.social-icon.youtube:hover {
    background-color: #fef2f2;
    border-color: #f87171;
}
.social-icon.youtube:hover .dashicons {
    color: #dc2626;
}

.social-icon.twitter:hover {
    background-color: #f8fafc;
    border-color: #0f172a;
}
.social-icon.twitter:hover .dashicons {
    color: #0f172a;
}

/* Sem Resultados */
.aceop-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.no-results-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
    display: inline-block;
}

.aceop-no-results h3 {
    font-size: 18px;
    color: #334155;
    margin: 0 0 8px 0;
}

.aceop-no-results p {
    color: #64748b;
    margin: 0;
    font-size: 14px;
}

/* Paginação AJAX Clássica */
.aceop-pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.aceop-pagination-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.pagination-btn {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #475569 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    outline: none !important;
}

.pagination-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pagination-btn:hover:not(.disabled):not(:disabled) {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

.pagination-btn.active {
    background-color: #174799 !important;
    border-color: #174799 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 4px rgba(23, 71, 153, 0.2) !important;
}

.pagination-btn.disabled,
.pagination-btn:disabled {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    background-color: #f8fafc !important;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-ellipsis {
    color: #94a3b8;
    padding: 0 4px;
    font-weight: bold;
}

/* ==========================================
   Efeito Shimmer (Esqueletos de Carregamento)
   ========================================== */
.aceop-shimmer-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.aceop-shimmer-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.aceop-shimmer-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f1f5f9;
}

.aceop-shimmer-title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.aceop-shimmer-title {
    height: 14px;
    width: 75%;
    border-radius: 4px;
    background: #f1f5f9;
}

.aceop-shimmer-badge {
    height: 10px;
    width: 35%;
    border-radius: 4px;
    background: #f1f5f9;
}

.aceop-shimmer-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.aceop-shimmer-line {
    height: 10px;
    border-radius: 4px;
    background: #f1f5f9;
}

.aceop-shimmer-w90 { width: 90%; }
.aceop-shimmer-w80 { width: 80%; }
.aceop-shimmer-w70 { width: 70%; }

.aceop-shimmer-footer {
    display: flex;
    gap: 10px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.aceop-shimmer-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
}

/* Animação do Shimmer */
.aceop-shimmer-card .aceop-shimmer-logo,
.aceop-shimmer-card .aceop-shimmer-title,
.aceop-shimmer-card .aceop-shimmer-badge,
.aceop-shimmer-card .aceop-shimmer-line,
.aceop-shimmer-card .aceop-shimmer-circle {
    background-image: linear-gradient(
        90deg,
        #f1f5f9 0px,
        #e2e8f0 40px,
        #f1f5f9 80px
    );
    background-size: 600px;
    animation: aceopShimmerAnimation 1.6s infinite linear;
}

@keyframes aceopShimmerAnimation {
    0% {
        background-position: -150px;
    }
    100% {
        background-position: 450px;
    }
}

/* Responsividade Geral */
@media (max-width: 768px) {
    .aceop-filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .aceop-filter-col {
        min-width: 100%;
    }

    .aceop-cards-grid {
        grid-template-columns: 1fr;
    }
}
