/* NAC Projects Directory - Professional Dark Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a5276;
    --secondary: #2e86c1;
    --accent: #f39c12;
    --bg-dark: #0a0e17;
    --bg-card: #151b2b;
    --bg-hover: #1e2a3f;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --border: #2d3748;
    --success: #10b981;
    --warning: #f59e0b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 40px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 3rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin-top: 5px;
}

.stats-header {
    display: flex;
    gap: 30px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

/* Filters */
.filters-section {
    background: var(--bg-card);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-btn {
    background: var(--bg-dark);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--secondary);
}

.filter-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.search-box {
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 25px;
    color: var(--text-primary);
    font-size: 1rem;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-box input:focus {
    outline: none;
    border-color: var(--secondary);
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

.results-info {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

/* Project Card */
.project-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border-color: var(--secondary);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-hover);
    position: relative;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.card-district {
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.card-confidence {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.confidence-high {
    background: var(--success);
    color: white;
}

.confidence-medium {
    background: var(--warning);
    color: black;
}

.confidence-low {
    background: #ef4444;
    color: white;
}

.card-emoji {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 2.5rem;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.card-developer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.card-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.card-detail .detail-label {
    color: var(--text-secondary);
}

.card-detail .detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.modal-close:hover {
    background: rgba(0,0,0,0.8);
}

.modal-header {
    height: 300px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-color: var(--bg-hover) !important;
    position: relative;
    border-radius: 16px 16px 0 0;
}

.modal-image {
    display: none;
}

.modal-overlay-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    display: flex;
    gap: 10px;
}

.modal-body {
    padding: 30px;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-developer {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-dark);
    border-radius: 12px;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.modal-description {
    margin-bottom: 25px;
}

.modal-description h3,
.modal-features h3 {
    margin-bottom: 10px;
    color: var(--secondary);
}

.modal-features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.modal-features-list li {
    padding: 10px 15px;
    background: var(--bg-dark);
    border-radius: 8px;
    border-left: 3px solid var(--secondary);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background: var(--bg-card);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

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

.footer-section h4 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.footer-section p,
.footer-section li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-header {
        justify-content: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-group {
        justify-content: center;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-header {
        height: 200px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}
