/* static/css/core/training_facilities.css */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero-section {
    background: var(--gradient-2);
    padding: 5rem 0 4rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') bottom center no-repeat;
    background-size: cover;
    opacity: 0.5;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero-title i {
    font-size: 2.25rem;
    margin-right: 0.75rem;
    vertical-align: middle;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

.hero-stats {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Filter Section */
.filter-section {
    padding: 3rem 0;
    background: var(--light);
}

.filter-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

/* Mobile Filter Toggle */
.filter-toggle-mobile {
    display: none;
}

.btn-filter-toggle {
    background: var(--gradient-2);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-filter-toggle:hover {
    background: var(--gradient-1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-filter-toggle:active {
    transform: translateY(0);
}

.btn-filter-toggle .toggle-icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.btn-filter-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.btn-filter-toggle .toggle-text-show {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-filter-toggle .toggle-text-hide {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.btn-filter-toggle[aria-expanded="true"] .toggle-text-show {
    display: none;
}

.btn-filter-toggle[aria-expanded="true"] .toggle-text-hide {
    display: inline-flex;
}

.filter-summary {
    text-align: center;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: 0.5rem;
}

.filter-summary small {
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#activeFiltersCount {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0 0.5rem;
}

/* Smooth collapse animation */
#filterCollapse {
    transition: height 0.35s ease;
}

#filterCollapse.collapsing {
    transition: height 0.35s ease;
}

.filter-form .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-form .form-label i {
    color: var(--primary);
}

.filter-form .form-control,
.filter-form .form-select {
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-form .form-control:focus,
.filter-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* static/css/core/training_facilities.css (continued) */

.filter-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.filter-actions .btn {
    padding: 0.75rem 1.5rem;
}

/* Results Section */
.results-section {
    padding: 4rem 0;
}

.results-header {
    margin-bottom: 2rem;
}

.results-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
}

/* Facilities Grid */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Facility Card */
.facility-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.facility-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.facility-header {
    background: var(--gradient-2);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.facility-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    backdrop-filter: blur(10px);
}

.facility-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}

.badge-verified {
    background: rgba(16, 185, 129, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-hospice {
    background: rgba(239, 68, 68, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.facility-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.facility-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.facility-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.meta-item i {
    color: var(--primary);
    font-size: 1rem;
}

.facility-training-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.training-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.training-badge.more {
    background: var(--primary);
    color: white;
}

.facility-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary);
}

.contact-link i {
    font-size: 1rem;
}

.facility-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
}

.facility-footer .btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Pagination */
.pagination-nav {
    margin-top: 3rem;
}

.pagination {
    gap: 0.5rem;
}

.page-item .page-link {
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    color: var(--gray-700);
    padding: 0.5rem 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-item .page-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.active .page-link {
    background: var(--gradient-2);
    border-color: var(--primary);
    color: white;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 1rem;
    border: 2px dashed var(--gray-300);
}

.no-results-icon {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.no-results h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Coordination Section */
.coordination-section {
    padding: 4rem 0;
    background: var(--gray-100);
}

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

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-header h2 i {
    color: var(--primary);
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.125rem;
}

.coordination-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--gray-200);
    height: 100%;
    transition: all 0.3s ease;
}

.coordination-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.coordination-header {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.office-type-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.875rem;
    border-radius: 2rem;
    font-weight: 600;
}

.office-type-badge.badge-federal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.office-type-badge.badge-state {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
}

.office-type-badge.badge-regional {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.state-badge {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.coordination-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.office-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.office-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.contact-item i {
    color: var(--primary);
    font-size: 1.125rem;
    width: 20px;
}

.contact-item a {
    color: var(--gray-700);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary);
}

/* Info Section */
.info-section {
    padding: 4rem 0;
    background: white;
}

.info-card {
    background: var(--light);
    border-radius: 1rem;
    padding: 2rem;
    height: 100%;
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
}

.info-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-2);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1.5rem;
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.25rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 0.625rem 0;
    color: var(--gray-700);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .facilities-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 991.98px) {
    .hero-section {
        padding: 4rem 0 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .filter-card {
        padding: 1.5rem;
    }

    .results-title {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 3rem 0 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-title i {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .filter-section {
        padding: 2rem 0;
    }

    .filter-card {
        padding: 1.25rem;
    }

    /* Show mobile filter toggle */
    .filter-toggle-mobile {
        display: block !important;
    }

    /* Collapse is hidden by default on mobile */
    #filterCollapse:not(.show) {
        display: none;
    }

    /* When shown, display as block */
    #filterCollapse.show {
        display: block !important;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .btn {
        width: 100%;
    }

    .facilities-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .results-section {
        padding: 2.5rem 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .info-section {
        padding: 2.5rem 0;
    }

    .coordination-section {
        padding: 2.5rem 0;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .filter-card {
        padding: 1rem;
    }

    .facility-header {
        padding: 1.25rem;
    }

    .facility-body {
        padding: 1.25rem;
    }

    .facility-footer {
        padding: 0.875rem 1.25rem;
    }

    .coordination-card,
    .info-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .hero-section,
    .filter-section,
    .pagination-nav,
    .facility-footer {
        display: none;
    }

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