/* Estilo Específico para a Página de Entidades e Doações - Renal Expert */

:root {
    --primary-color: #851c5e;
    --secondary-color: #440e2b;
    --accent-color: #c12a85;
    --donation-color: #c12a85; /* Rosa puxando pro tom do Hero para o botão doar */
    --text-color: #666;
    --bg-light: #F7FAFD;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

/* ===== HERO ===== */
.entities-hero {
    background: linear-gradient(135deg, #440e2b 0%, #851c5e 50%, #c12a85 100%);
    padding: 90px 20px 80px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.entities-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.entities-hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.entities-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

.entities-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.2;
    max-width: 700px;
}

.entities-hero p {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 45px;
    opacity: 0.85;
    line-height: 1.6;
}

/* ===== BARRA DE BUSCA ===== */
.search-bar-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: var(--white);
    border-radius: 50px;
    padding: 8px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(0, 173, 239, 0.6);
}

.search-field {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 0 20px;
    position: relative;
}

.search-field:not(:last-of-type) {
    border-right: 1px solid #eee;
}

.search-field i {
    color: var(--accent-color);
    margin-right: 12px;
    font-size: 16px;
}

.search-field select {
    border: none;
    outline: none;
    padding: 12px 0;
    width: 100%;
    font-size: 0.95rem;
    color: #333;
    background: transparent;
    cursor: pointer;
    appearance: none;
}

.search-btn-main {
    background: linear-gradient(135deg, #851c5e 0%, #c12a85 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-left: 10px;
    white-space: nowrap;
    font-size: 0.95rem;
}

.search-btn-main:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 20px rgba(0, 173, 239, 0.4);
}

/* ===== STATS BAR ===== */
.stats-bar {
    background: #f0f4f8;
    border-bottom: 1px solid #e0e8f0;
    padding: 16px 20px;
}

.stats-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.stats-count {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.stats-count span {
    font-weight: 800;
    font-size: 1.2rem;
}

.filter-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tag {
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.filter-tag.all       { background: var(--primary-color); color: #fff; }
.filter-tag.nacional   { background: #e8f0fe; color: #1a56db; border-color: #c3d4fd; }
.filter-tag.estadual  { background: #e6f9f0; color: #057a55; border-color: #bcf0da; }
.filter-tag.ong { background: #fff3e0; color: #c05621; border-color: #fbd38d; }
.filter-tag:hover { opacity: 0.8; }

/* ===== GRID DE CARDS ===== */
.entities-container {
    max-width: 1200px;
    margin: 50px auto 80px;
    padding: 0 20px;
}

.entities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.entity-card {
    background: var(--white);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    transition: var(--transition);
    border: 1px solid #eef2f8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.entity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 45px rgba(36, 65, 124, 0.15);
    border-color: var(--accent-color);
}

.entity-card-header {
    padding: 22px 24px 18px;
    border-bottom: 1px solid #f0f4f8;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.category-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    background: #e8f0fe; 
    color: #1a56db;
}

.destaque-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f6c90e, #f5a623);
    color: #7a4a00;
    display: flex;
    align-items: center;
    gap: 4px;
}

.entity-card-body {
    padding: 22px 24px;
    flex-grow: 1;
}

.entity-card-body h3 {
    font-size: 1.05rem;
    color: var(--primary-color);
    margin-bottom: 6px;
    line-height: 1.35;
    font-weight: 700;
}

.entity-location {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.entity-location i {
    color: var(--accent-color);
}

.entity-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #555;
}

.meta-item i {
    color: var(--accent-color);
    width: 14px;
    text-align: center;
    font-size: 13px;
}

.entity-description {
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entity-card-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f4f8;
    background: #fafbfd;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.entity-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 9px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
    width: 100%;
    text-decoration: none;
}

.entity-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.entity-btn.btn-donate {
    background: var(--donation-color);
    color: #fff;
    border-color: var(--donation-color);
}

.entity-btn.btn-donate:hover {
    background: #851c5e;
    border-color: #851c5e;
    transform: scale(1.02);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
    color: #aaa;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
    color: #ddd;
}

.empty-state p {
    font-size: 1.1rem;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
    .entities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .entities-hero h1 {
        font-size: 2rem;
    }

    .search-bar-container {
        flex-direction: column;
        border-radius: 20px;
        padding: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(0, 173, 239, 0.5);
    }

    .search-bar-container .search-field,
    .search-bar-container .search-field:not(:last-of-type) {
        width: 100%;
        padding: 12px 15px;
        border-right: none;
        border-bottom: 1px solid #eee;
        flex: none;
    }

    .search-bar-container .search-field:last-of-type {
        border-bottom: none;
    }

    .search-bar-container .search-field select {
        font-size: 16px;
        touch-action: manipulation;
    }

    .search-btn-main {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        justify-content: center;
        padding: 16px;
        font-size: 1rem;
        touch-action: manipulation;
    }

    .stats-bar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-tags {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-tag {
        white-space: nowrap;
        padding: 8px 18px;
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {
    .entities-grid {
        grid-template-columns: 1fr;
    }

    .entities-hero {
        padding: 70px 15px 60px;
    }

    .entities-hero h1 {
        font-size: 1.7rem;
    }
}
