/* Estilos específicos para a página de Lista de Creches (SMED) */

:root {
    --primary-color: #036db3;
    --primary-light: #4a9bd9;
    --primary-dark: #004b8d;
    --secondary-color: #2c3e50;
    --accent-color: #ffffff;
    --text-color: #2c3e50;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Cores de Categoria e Ícone */
    --pdf-color: #ef4444;
    --pdf-bg: rgba(239, 68, 68, 0.08);
    --law-color: #f59e0b;
    --law-bg: rgba(245, 158, 11, 0.08);
    --report-color: #8b5cf6;
    --report-bg: rgba(139, 92, 246, 0.08);
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    position: relative;
    width: calc(100% - 40px);
    max-width: 1400px;
    height: auto;
    min-height: 380px;
    margin: 0 auto 3rem auto;
    border-radius: 30px;
    background: linear-gradient(120deg, #0b2e4e 0%, #046eb4 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: 0 20px 40px rgba(4, 110, 180, 0.12);
    padding: 3rem 2rem;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.04) 0%, transparent 24%),
        radial-gradient(circle at 88% 76%, rgba(255, 255, 255, 0.04) 0%, transparent 24%);
    background-size: cover;
    background-position: center;
    opacity: 0.6;
    mix-blend-mode: overlay;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0;
}

.hero-text {
    max-width: 750px;
    text-align: left;
}

.highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1.2rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #4ddbff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.highlight-badge::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    background-color: #4ddbff;
    border-radius: 50%;
    box-shadow: 0 0 8px #4ddbff;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: white;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 600px;
    font-weight: 300;
    line-height: 1.6;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: white;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ==================== ESTATÍSTICAS RÁPIDAS ==================== */
.creches-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(4, 110, 180, 0.08);
}

.stat-icon {
    width: 54px;
    height: 54px;
    background: rgba(3, 109, 179, 0.08);
    color: var(--primary-color);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ==================== BARRA DE BUSCA DE DOCUMENTOS ==================== */
.creches-search-section {
    background: white;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 3rem;
}

.creches-search-wrapper {
    position: relative;
    width: 100%;
}

.creches-search-wrapper i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
}

.creches-search-wrapper input {
    width: 100%;
    padding: 16px 20px 16px 54px;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    font-size: 1.05rem;
    color: var(--text-color);
    transition: var(--transition);
    background-color: #fafbfc;
}

.creches-search-wrapper input:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(3, 109, 179, 0.1);
}

.search-info {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 6px;
}

/* ==================== SEÇÃO DE CATEGORIAS E GRID ==================== */
.creches-category {
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.category-badge {
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(3, 109, 179, 0.2);
}

.category-info h2 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 2px;
}

.category-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

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

/* ==================== CARDS DE CRECHES (VISUAL PREMIUM COMPACTO) ==================== */
.creche-card {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.creche-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
}

.creche-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    background: var(--pdf-bg);
    color: var(--pdf-color);
}

/* Customizações de Ícones de Acordo com o Tipo */
.creche-card-icon.legislacao {
    background: var(--law-bg);
    color: var(--law-color);
}

.creche-card-icon.relatorio {
    background: var(--report-bg);
    color: var(--report-color);
}

.creche-card-body {
    flex: 1;
    min-width: 0; /* Permite truncamento de texto longo, se necessário */
}

.creche-card-body h3 {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--secondary-color);
    line-height: 1.35;
    margin-bottom: 4px;
    word-wrap: break-word;
}

.creche-card-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    background-color: var(--pdf-bg);
    color: var(--pdf-color);
    border-radius: 4px;
    text-transform: uppercase;
}

.creche-card-badge.legislacao {
    background-color: var(--law-bg);
    color: var(--law-color);
}

.creche-card-badge.relatorio {
    background-color: var(--report-bg);
    color: var(--report-color);
}

.creche-card-action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.creche-card-action:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(3, 109, 179, 0.2);
}

/* Hover no card inteiro */
.creche-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    border-color: rgba(3, 109, 179, 0.15);
}

.creche-card:hover .creche-card-action {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ==================== SEM RESULTADOS E ANIMAÇÕES ==================== */
.no-results-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: white;
    border-radius: 24px;
    border: 1px dashed var(--border-color);
    color: var(--text-light);
}

.no-results-message i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.no-results-message h3 {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.no-results-message p {
    font-size: 0.9rem;
}

/* ==================== VERSÃO MOBILE E TABLET (ALTA PRIORIDADE) ==================== */
@media (max-width: 992px) {
    .hero-section {
        border-radius: 20px;
        min-height: auto;
        padding: 2.5rem 1.5rem;
        margin-bottom: 2rem;
        width: 100%;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .creches-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 16px;
    }

    .hero-section {
        padding: 2.2rem 1.2rem;
        text-align: center;
    }

    .hero-text {
        text-align: center;
    }

    .highlight-badge {
        margin-bottom: 1rem;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
    }

    .creches-stats {
        grid-template-columns: 1fr; /* Coluna única no mobile para facilitar a leitura */
        gap: 12px;
        margin-bottom: 2rem;
    }

    .stat-card {
        padding: 16px;
        border-radius: 14px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .creches-search-section {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 2rem;
    }

    .creches-search-wrapper input {
        padding: 12px 16px 12px 46px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .creches-search-wrapper i {
        left: 16px;
        font-size: 0.95rem;
    }

    .category-header {
        margin-bottom: 1.5rem;
        padding-bottom: 8px;
    }

    .category-badge {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }

    .category-info h2 {
        font-size: 1.25rem;
    }

    .creches-grid {
        grid-template-columns: 1fr; /* Força os cards em linha única super fluída no mobile */
        gap: 12px;
    }

    .creche-card {
        padding: 12px 16px;
        border-radius: 12px;
    }

    .creche-card-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .creche-card-body h3 {
        font-size: 0.85rem;
    }

    .creche-card-action {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}
