/**
 * Grafos - Networks List Styles
 * Bootstrap 5 / Cassiopeia Compatible
 * Mobile-First Responsive Design
 * 
 * @package     Grafos
 * @subpackage  Site
 * @author      Lic. Joel Salazar
 */

/* Container */
.grafos-networks {
    padding: 2rem 0;
}

/* Page Header */
.grafos-networks .page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bs-primary, #0d6efd);
}

.grafos-networks .page-header h1 {
    margin-bottom: 0.5rem;
}

/* Network Cards - Bootstrap 5 */
.network-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
}

.network-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-4px);
    border-color: var(--bs-primary, #0d6efd);
}

.network-card .card-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.network-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    color: var(--bs-dark, #212529);
}

.network-card .card-text {
    font-size: 0.875rem;
    line-height: 1.5;
    max-height: 3em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Stats Boxes */
.network-card .bg-light {
    background-color: rgba(248, 249, 250, 0.5) !important;
    transition: background-color 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.network-card .bg-light:hover {
    background-color: rgba(248, 249, 250, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.1);
}

/* Buttons */
.network-card .btn {
    transition: all 0.2s ease;
}

.network-card .btn:hover {
    transform: translateY(-1px);
}

/* Responsive Typography */
@media (max-width: 575.98px) {
    .grafos-networks {
        padding: 1rem 0;
    }
    
    .network-card .card-title {
        font-size: 1rem;
    }
    
    .network-card .fs-5 {
        font-size: 1.1rem !important;
    }
    
    .grafos-networks .page-header h1 {
        font-size: 1.75rem;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .network-card .card-title {
        font-size: 1.05rem;
    }
}

@media (min-width: 1400px) {
    .grafos-networks .container-fluid {
        max-width: 1320px;
        margin: 0 auto;
    }
}

/* Accessibility */
.network-card:focus-within {
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

.network-card .btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Filter Form */
.grafos-networks .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--bs-dark, #212529);
}

.grafos-networks .form-control,
.grafos-networks .form-select {
    border-radius: 0.375rem;
}

.grafos-networks .btn-group .btn {
    flex: 1;
}

/* Alert */
.grafos-networks .alert {
    border-radius: 0.375rem;
}

/* Pagination - Bootstrap 5 */
.grafos-networks .pagination {
    margin-top: 2rem;
    justify-content: center;
}

.grafos-networks .pagination .page-link {
    color: var(--bs-primary, #0d6efd);
}

.grafos-networks .pagination .page-item.active .page-link {
    background-color: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
}

/* Dark Mode Support (Cassiopeia) */
@media (prefers-color-scheme: dark) {
    .network-card {
        border-color: rgba(255, 255, 255, 0.125);
    }
    
    .network-card .bg-light {
        background-color: rgba(52, 58, 64, 0.5) !important;
    }
    
    .network-card .bg-light:hover {
        background-color: rgba(52, 58, 64, 0.8) !important;
    }
}

/* Print Styles */
@media print {
    .grafos-networks form,
    .grafos-networks .pagination,
    .network-card .btn {
        display: none;
    }
    
    .network-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #000;
    }
}
