/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #1e40af;
    font-weight: 700;
    font-size: 1.25rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #1e40af;
}

.search-container {
    flex: 1;
    max-width: 400px;
}

.search-form {
    position: relative;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem 0 0 0.5rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.search-button {
    padding: 0.75rem;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background: #1d4ed8;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #4b5563;
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto;
}

.search-form-large {
    display: flex;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.search-input-large {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    color: #1f2937;
    outline: none;
}

.search-button-large {
    padding: 1rem 2rem;
    background: #dc2626;
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button-large:hover {
    background: #b91c1c;
}

/* Sections */
.featured-sections {
    padding: 4rem 0;
    background: #f9fafb;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.section-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.section-icon {
    color: #1e40af;
    margin-bottom: 1rem;
}

.section-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.section-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.section-link:hover {
    color: #1d4ed8;
}

/* Popular Cities */
.popular-cities {
    padding: 4rem 0;
}

.popular-cities h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: #1f2937;
}

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

/* City Cards */
.city-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.city-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.city-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.city-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.city-code {
    background: #eff6ff;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.city-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

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

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-weight: 600;
    color: #1f2937;
}

.city-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.city-link:hover {
    color: #1d4ed8;
}

/* City Page */
.city-page {
    padding: 2rem 0;
}

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.city-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.city-meta {
    display: flex;
    gap: 1rem;
}

.city-postal, .city-insee {
    background: #eff6ff;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.city-location a {
    color: #1e40af;
    text-decoration: none;
}

.city-location a:hover {
    text-decoration: underline;
}

.city-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

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

.city-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1e40af;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.info-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: #1f2937;
}

.admin-info {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: #1e40af;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.map-container {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.map-placeholder {
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.map-info {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Sidebar */
.city-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.related-cities {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.related-cities h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.related-list {
    list-style: none;
}

.related-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.related-list li:last-child {
    border-bottom: none;
}

.related-list a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.related-list a:hover {
    text-decoration: underline;
}

.distance {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Ad Spaces */
.ad-space {
    margin: 2rem 0;
}

.ad-banner {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.ad-label {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ad-content {
    color: #6b7280;
}

.affiliate-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.affiliate-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

.affiliate-grid {
    display: grid;
    gap: 1rem;
}

.affiliate-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.affiliate-item:hover {
    background: #f3f4f6;
}

.affiliate-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.375rem;
}

.affiliate-content {
    flex: 1;
}

.affiliate-content h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.affiliate-content p {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.affiliate-link {
    display: inline-block;
    font-size: 0.75rem;
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.affiliate-link:hover {
    text-decoration: underline;
}

/* Opening Hours Table */
.opening-hours {
    margin-top: 1.5rem;
}

.opening-hours h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hours-table th {
    background: #f9fafb;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    border-bottom: 1px solid #e5e7eb;
}

.hours-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
}

.hours-table tr:last-child td {
    border-bottom: none;
}

.hours-table tr:hover {
    background: #f9fafb;
}

.day-cell {
    font-weight: 600;
    color: #1f2937;
    width: 20%;
}

.hours-cell {
    width: 50%;
}

.time-slot {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.time-slot:last-child {
    margin-bottom: 0;
}

.closed {
    color: #dc2626;
    font-weight: 500;
    font-style: italic;
}

.comment-cell {
    width: 30%;
}

.comment {
    color: #6b7280;
    font-style: italic;
    font-size: 0.8125rem;
}

/* Public Services */
.public-services {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.public-services h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border: 1px solid #1e40af;
    border-radius: 0.5rem;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}

.service-link:hover {
    background: #1e40af;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.service-description {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: #9ca3af;
}

.breadcrumb-item a {
    color: #1e40af;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6b7280;
}

/* Department & Region Pages */
.department-page, .region-page {
    padding: 2rem 0;
}

.department-header, .region-header {
    text-align: center;
    margin-bottom: 3rem;
}

.department-header h1, .region-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.department-subtitle, .region-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
}

.department-content, .region-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.department-section, .region-section {
    margin-bottom: 3rem;
}

.department-section h2, .region-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #1e40af;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.department-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.department-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.department-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.department-card p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.department-card a {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
}

.department-card a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section h3 {
    color: #1e40af;
    font-size: 1.25rem;
}

.footer-section h4 {
    color: #e5e7eb;
}

.footer-section p {
    color: #9ca3af;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 1024px) {
    .city-content, .department-content, .region-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .city-sidebar, .department-sidebar, .region-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .search-container {
        order: 3;
        flex-basis: 100%;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .search-form-large {
        flex-direction: column;
    }
    
    .search-button-large {
        border-radius: 0 0 0.75rem 0.75rem;
    }
    
    .sections-grid {
        grid-template-columns: 1fr;
    }
    
    .cities-grid {
        grid-template-columns: 1fr;
    }
    
    .city-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .city-title h1 {
        font-size: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .city-info {
        grid-template-columns: 1fr;
    }
    
    .affiliate-item {
        flex-direction: column;
        text-align: center;
    }
    
    .affiliate-item img {
        align-self: center;
    }
    
    .hours-table {
        font-size: 0.8125rem;
    }
    
    .hours-table th,
    .hours-table td {
        padding: 0.5rem;
    }
    
    .service-link {
        display: flex;
        text-align: center;
        justify-content: center;
    }
}

/* Utilities */
.text-sm {
    font-size: 0.875rem;
}

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

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}
/* Listing Pages */
.regions-page, .departments-page {
    padding: 2rem 0;
}

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

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

.main-content {
    min-width: 0;
}

.intro-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border-left: 4px solid #1e40af;
}

.intro-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.intro-section p {
    color: #4b5563;
    line-height: 1.7;
}

/* Regions Grid */
.regions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.region-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.region-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e40af, #3b82f6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.region-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.region-card:hover::before {
    transform: scaleX(1);
}

.region-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.region-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.region-capital {
    background: #eff6ff;
    color: #1e40af;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.region-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.region-stat {
    text-align: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    /*min-width: 0;
    overflow: hidden;*/
}

.region-stat .stat-value {
    word-break: break-word;
    font-size: 0.875rem;
    line-height: 1.2;
}

.region-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    padding: 0.75rem 1rem;
    border: 2px solid #1e40af;
    border-radius: 0.5rem;
    background: transparent;
}

.region-link:hover {
    background: #1e40af;
    color: white;
    transform: translateX(4px);
}

/* Departments Filter */
.departments-filter {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
}

.departments-filter h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #4b5563;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: #1e40af;
    color: #1e40af;
}

.filter-btn.active {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

/* Departments Grid */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.department-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.department-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #1e40af;
}

.department-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.department-number {
    background: #1e40af;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.department-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.department-region {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.department-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.department-stat {
    text-align: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.department-actions {
    display: flex;
    gap: 0.75rem;
}

.department-link {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.department-link.primary {
    background: #1e40af;
    color: white;
}

.department-link.primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.department-link.secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.department-link.secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Page Sidebar */
.page-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.quick-stats {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.quick-stats h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.aside-stats {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.aside-stats h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.departments-stats {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.departments-stats h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

.stat-row .stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: none;
    letter-spacing: normal;
}

.stat-row .stat-value {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
}

/* Responsive for listing pages */
@media (max-width: 1024px) {
    .page-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .page-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .regions-grid {
        grid-template-columns: 1fr;
    }
    
    .departments-grid {
        grid-template-columns: 1fr;
    }
    
    .region-info {
        grid-template-columns: 1fr;
    }
    
    .department-info {
        grid-template-columns: 1fr;
    }
    
    .department-actions {
        flex-direction: column;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.generic-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.generic-card-listing {
    margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.generic-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.generic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #1e40af;
}

.generic-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: space-between;

}

.generic-card-header-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}
.generic-card-header-number {
    background: #1e40af;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.generic-card-header-title span {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}
.generic-card-header-title a {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.generic-card-header-number {
    background: #1e40af;
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.generic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.generic-grid-stat {

  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 0.5rem;
}

.generic-grid-stat-label {
  display: block;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.generic-grid-stat-value {
  font-weight: 600;
  color: #1f2937;
}

.generic-grid-stat-value a {
  font-weight: 600;
  color: #1f2937;
}

.generic-grid-actions {
    display: flex;
    gap: 0.75rem;
}

.generic-grid-link {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.generic-grid-link.primary {
    background: #1e40af;
    color: white;
}

.generic-grid-link.primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.generic-grid-link.secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.generic-grid-link.secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}



.tag-list {
    margin-bottom: 1.5rem;
}

.tag-list h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-list-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-list-tag {
    background: #e5e7eb;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-list-tag a {
    background: #e5e7eb;
    color: #374151;
}

.more-departments {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}