/* ACISPES Serviços Médicos - Frontend (tema-safe) */

.acispes-servicos-wrapper,
.acispes-servicos-wrapper *,
.acispes-servicos-wrapper *::before,
.acispes-servicos-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.acispes-servicos-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #2d3748;
    line-height: 1.5;
}

/* ===================== FILTROS ===================== */
.acispes-servicos-wrapper .acispes-filtros {
    margin: 0 0 36px 0;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.acispes-servicos-wrapper .acispes-filtros-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 14px;
    align-items: center;
    width: 100%;
}

.acispes-servicos-wrapper .acispes-search-box {
    flex: 1 1 0%;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.acispes-servicos-wrapper .acispes-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s ease;
    display: block;
}

.acispes-servicos-wrapper .acispes-search-box:focus-within .acispes-search-icon {
    color: #0e6ba8;
}

.acispes-servicos-wrapper input[type="text"].acispes-search {
    display: block;
    width: 100%;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    padding: 0 16px 0 44px;
    margin: 0;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background: #f8fafc;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    line-height: 46px;
}

.acispes-servicos-wrapper input[type="text"].acispes-search::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.acispes-servicos-wrapper input[type="text"].acispes-search:focus {
    border-color: #0e6ba8;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(14, 107, 168, 0.12);
}

.acispes-servicos-wrapper .acispes-filter-group {
    flex: 0 0 210px;
    width: 210px;
    min-width: 0;
}

.acispes-servicos-wrapper select.acispes-filter {
    display: block;
    width: 100%;
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    padding: 0 36px 0 14px;
    margin: 0;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #2d3748;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 42px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.acispes-servicos-wrapper select.acispes-filter:focus {
    border-color: #0e6ba8;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(14, 107, 168, 0.12);
}

/* ===================== GRID ===================== */
.acispes-servicos-wrapper .acispes-servicos-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
}

.acispes-servicos-wrapper[data-colunas="1"] .acispes-servicos-grid { grid-template-columns: 1fr; }
.acispes-servicos-wrapper[data-colunas="2"] .acispes-servicos-grid { grid-template-columns: repeat(2, 1fr); }
.acispes-servicos-wrapper[data-colunas="4"] .acispes-servicos-grid { grid-template-columns: repeat(4, 1fr); }

/* ===================== CARD ===================== */
.acispes-servicos-wrapper .acispes-servico-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 0;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.03);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.acispes-servicos-wrapper .acispes-servico-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #0e6ba8, #00b4d8, #0e6ba8);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.acispes-servicos-wrapper .acispes-servico-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(14, 107, 168, 0.12), 0 8px 16px rgba(0,0,0,0.06);
}

.acispes-servicos-wrapper .acispes-servico-card:hover::before {
    opacity: 1;
}

/* Card inner content area */
.acispes-servicos-wrapper .acispes-card-inner {
    padding: 32px 28px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-grow: 1;
}

.acispes-servicos-wrapper .acispes-card-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    background: linear-gradient(135deg, #e8f4fd 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.acispes-servicos-wrapper .acispes-card-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 23px;
    background: linear-gradient(135deg, #0e6ba8, #00b4d8);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.acispes-servicos-wrapper .acispes-servico-card:hover .acispes-card-icon {
    background: linear-gradient(135deg, #0e6ba8, #00b4d8);
    transform: scale(1.05) rotate(-3deg);
}

.acispes-servicos-wrapper .acispes-servico-card:hover .acispes-card-icon::after {
    opacity: 0.2;
}

.acispes-servicos-wrapper .acispes-card-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    transition: filter 0.3s ease;
}

.acispes-servicos-wrapper .acispes-servico-card:hover .acispes-card-icon img {
    filter: brightness(0) invert(1);
}

.acispes-servicos-wrapper .acispes-card-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    line-height: 32px;
    color: #0e6ba8;
    transition: color 0.3s ease;
}

.acispes-servicos-wrapper .acispes-servico-card:hover .acispes-card-icon .dashicons {
    color: #ffffff;
}

.acispes-servicos-wrapper h3.acispes-card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 12px 0;
    padding: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-transform: none;
    border: none;
    transition: color 0.25s ease;
}

.acispes-servicos-wrapper .acispes-servico-card:hover h3.acispes-card-title {
    color: #0e6ba8;
}

.acispes-servicos-wrapper .acispes-card-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

/* Card footer with tags */
.acispes-servicos-wrapper .acispes-card-footer {
    padding: 16px 28px 22px;
    width: 100%;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

/* ===================== TAGS ===================== */
.acispes-servicos-wrapper .acispes-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.acispes-servicos-wrapper .acispes-tag {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    margin: 0;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.acispes-servicos-wrapper .acispes-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.acispes-servicos-wrapper .acispes-tag-unidade {
    background: linear-gradient(135deg, #e0f2fe, #bae6fd);
    color: #0369a1;
}

.acispes-servicos-wrapper .acispes-tag-tipo {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #15803d;
}

/* ===================== ESTADOS ===================== */
.acispes-servicos-wrapper .acispes-no-results {
    text-align: center;
    color: #64748b;
    font-size: 15px;
    padding: 40px 20px;
    margin: 0;
    grid-column: 1 / -1;
}

.acispes-servicos-wrapper .acispes-servico-card.acispes-hidden {
    display: none !important;
}

/* ===================== PAGINAÇÃO ===================== */
.acispes-servicos-wrapper .acispes-paginacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 36px 0 0 0;
    padding: 0;
}

.acispes-servicos-wrapper .acispes-pag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    margin: 0;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #0e6ba8;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    line-height: 1.4;
}

.acispes-servicos-wrapper .acispes-pag-btn:hover:not(:disabled) {
    background: #0e6ba8;
    border-color: #0e6ba8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(14, 107, 168, 0.2);
}

.acispes-servicos-wrapper .acispes-pag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: #94a3b8;
    border-color: #e2e8f0;
    background: #f8fafc;
}

.acispes-servicos-wrapper .acispes-pag-info {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
}

/* ===================== RESPONSIVO ===================== */
@media (max-width: 900px) {
    .acispes-servicos-wrapper .acispes-servicos-grid,
    .acispes-servicos-wrapper[data-colunas="3"] .acispes-servicos-grid,
    .acispes-servicos-wrapper[data-colunas="4"] .acispes-servicos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .acispes-servicos-wrapper .acispes-filtros-row {
        flex-wrap: wrap;
    }

    .acispes-servicos-wrapper .acispes-search-box {
        flex: 1 1 100%;
    }

    .acispes-servicos-wrapper .acispes-filter-group {
        flex: 1 1 calc(50% - 7px);
        width: auto;
    }
}

@media (max-width: 600px) {
    .acispes-servicos-wrapper .acispes-servicos-grid,
    .acispes-servicos-wrapper[data-colunas="2"] .acispes-servicos-grid,
    .acispes-servicos-wrapper[data-colunas="3"] .acispes-servicos-grid,
    .acispes-servicos-wrapper[data-colunas="4"] .acispes-servicos-grid {
        grid-template-columns: 1fr;
    }

    .acispes-servicos-wrapper .acispes-filtros {
        padding: 16px;
        border-radius: 10px;
    }

    .acispes-servicos-wrapper .acispes-filtros-row {
        flex-direction: column;
        gap: 10px;
    }

    .acispes-servicos-wrapper .acispes-filter-group {
        flex: 1 1 100%;
        width: 100%;
    }
}
