/* Archive Secretarias - Página de Listagem Modernizada */

.orgaos-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8f9fa, #fff);
    min-height: calc(100vh - 200px);
}

.breadcrumb-container {
    margin-bottom: 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.breadcrumb-link {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: #0052a3;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #dee2e6;
}

.breadcrumb-current {
    color: #495057;
    font-weight: 500;
}

.orgaos-header {
    text-align: center;
    margin-bottom: 3rem;
}

.orgaos-title {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #2c3e50 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.2 !important;
}

@media (max-width: 768px) {
    .orgaos-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .orgaos-title {
        font-size: 1.75rem !important;
    }
}

.orgaos-subtitle {
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: #6c757d;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

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

.categoria-section {
    margin-bottom: 3rem;
}

.categoria-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #e9ecef;
    position: relative;
}

.categoria-header:after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #0066cc, #00b4d8);
    border-radius: 3px;
}

.categoria-title {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    text-transform: capitalize;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .categoria-title {
        font-size: 1.5rem !important;
    }
}

.categoria-count {
    font-size: 0.875rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
}

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

@media (max-width: 1200px) {
    .orgaos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .orgaos-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
}

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

.orgao-card {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.orgao-card:hover {
    transform: translateY(-8px);
    text-decoration: none;
}

.orgao-card:hover .orgao-card-inner {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.orgao-card:hover .orgao-overlay {
    opacity: 1;
    visibility: visible;
}

.orgao-card:hover .orgao-icon {
    transform: scale(1.1);
}

.orgao-card:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

.orgao-card-inner {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s;
}

.orgao-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    min-height: 140px;
    transition: transform 0.3s;
}

.orgao-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.orgao-icon svg {
    width: 80px;
    height: 80px;
    color: #adb5bd;
}

.orgao-content {
    padding: 1.5rem;
}

.orgao-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin: 0 0 0.5rem !important;
    line-height: 1.4 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.orgao-description {
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.orgao-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.95), rgba(0, 180, 216, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.overlay-content {
    text-align: center;
    color: #fff;
}

.overlay-description {
    font-size: 0.938rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.overlay-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.938rem;
}

.overlay-action svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s;
}

.orgao-card:hover .overlay-action svg {
    transform: translateX(4px);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    color: #dee2e6;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Ocultar versões antigas desktop/mobile */
.app-pc,
.app-mobel {
    display: none;
}

@media print {
    .orgaos-section {
        background: #fff;
    }

    .search-box,
    .breadcrumb-container {
        display: none;
    }

    .orgao-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .orgao-card:hover {
        transform: none;
    }

    .orgao-overlay {
        display: none;
    }

    .orgaos-grid {
        gap: 1rem;
    }
}
