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

body {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.5;
    color: #2c2c2c;
    background-color: #f8f9fa;
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 0 15px 0;
    background: #ffffff;
    border-top: 3px solid #1e3a8a;
    border-bottom: 1px solid #d3d3d3;
}

header h1 {
    color: #1e3a8a;
    font-size: 2.4rem;
    font-weight: bold;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.tagline {
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 10px;
    font-family: Georgia, serif;
}

.header-nav {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.header-nav a {
    color: #8b1538;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-nav a:hover {
    text-decoration: underline;
    color: #1e3a8a;
}

.nav-separator {
    color: #999;
    font-weight: normal;
}

.page-title {
    color: #333;
    font-weight: 600;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 0 20px;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tab {
    background: #ffffff;
    border: 1px solid #b3b3b3;
    border-radius: 0;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: Georgia, serif;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #333333;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-tab:hover {
    border-color: #1e3a8a;
    background: #f0f4ff;
    color: #1e3a8a;
}

.category-tab.active {
    background: #1e3a8a;
    border-color: #1e3a8a;
    color: #ffffff;
    font-weight: bold;
}

@media (max-width: 768px) {
    .category-tabs {
        gap: 8px;
        padding: 0 15px;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
    }

    .category-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        flex-shrink: 0;
        min-width: fit-content;
    }
}

/* Controls */
.controls {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #1e3a8a;
}

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

.filters select {
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.filters select:focus {
    outline: none;
    border-color: #1e3a8a;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 5px;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Content Area */
.main-content {
    position: relative;
    min-height: 600px;
}

/* Projects */
.projects-container {
    min-height: 400px;
}

.loading, .no-results {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: #6c757d;
    font-size: 1.1rem;
}

.projects-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .projects-list {
        grid-template-columns: 1fr;
    }
}




.project-card {
    background: #ffffff;
    border-radius: 0;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #d3d3d3;
    border-left: 4px solid #8b1538;
    transition: box-shadow 0.2s ease;
    cursor: pointer;
}

.project-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-left-width: 5px;
}

.flagged-badge {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #fbbf24;
    margin-left: auto;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.project-board {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-meeting-date {
    font-size: 0.8rem;
    color: #6b7280;
}

.project-notes {
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
    margin: 8px 0;
    line-height: 1.4;
}


.project-status {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 10px 0;
    display: inline-block;
}

.project-card-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

/* Simplified project card styles */
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.project-id {
    font-size: 0.9rem;
    color: #1e3a8a;
    font-weight: 600;
}

.project-meeting-date {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c2c2c;
    margin-bottom: 10px;
    line-height: 1.4;
}

.project-meta {
    margin-bottom: 12px;
}

.project-location {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 6px;
}

.project-status {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.project-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* Remove old project card elements that are no longer used */
.project-source-attribution,
.source-label,
.source-meeting,
.source-link {
    display: none;
}

.view-details-btn {
    padding: 8px 16px;
    background-color: #1e3a8a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.view-details-btn:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.view-details-btn:active {
    transform: translateY(0);
}

.source-btn {
    padding: 6px 12px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}

.source-btn:hover {
    background-color: #545b62;
    color: white;
    text-decoration: none;
}


.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.project-meeting-date {
    background: #f8f9fa;
    color: #6c757d;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    white-space: nowrap;
}

.project-id {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 5px;
}

.project-type {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.4;
}

.project-location {
    color: #6c757d;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.project-location::before {
    content: "📍 ";
}

.location-error {
    color: #dc3545;
    font-style: italic;
}

.location-error::before {
    content: "⚠️ ";
}

.project-details {
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    min-width: 120px;
    margin-right: 10px;
}

.detail-value {
    color: #6c757d;
    flex: 1;
}

.project-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.status-approve {
    background: #d4edda;
    color: #155724;
}

.status-defer {
    background: #fff3cd;
    color: #856404;
}

.status-deny {
    background: #f8d7da;
    color: #721c24;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
}

.tag {
    background: #f8f9fa;
    color: #495057;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid #dee2e6;
}


.project-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.source-link {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.source-link:hover {
    background: #bbdefb;
    text-decoration: none;
}

.metadata-link {
    color: #1e3a8a;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.metadata-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.project-type .metadata-link {
    color: inherit;
}

.project-type .metadata-link:hover {
    color: #0056b3;
}


.meeting-info {
    background: #e8f5e8;
    border-left-color: #28a745;
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

/* View Controls */
.view-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.view-btn {
    padding: 12px 24px;
    border: 2px solid #1e3a8a;
    background: white;
    color: #1e3a8a;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #f8f9fa;
}

.view-btn.active {
    background: #1e3a8a;
    color: white;
}

/* Map Container */
.map-container {
    position: relative;
    background: white;
    border-radius: 0;
    border: 1px solid #d3d3d3;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
    height: 80vh;
    margin-top: 20px;
}

#map {
    height: 100%;
    width: 100%;
}

.map-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 12px;
    font-size: 12px;
    line-height: 1.4;
    z-index: 1000;
    max-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.map-legend h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.legend-label {
    color: #333;
    font-weight: 500;
}



/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 2rem;
    }

    .filters {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-label {
        min-width: auto;
        margin-bottom: 2px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .project-card {
        padding: 20px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

}

/* Project Detail Page Styles */
.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.back-link {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border: 2px solid #1e3a8a;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background: #1e3a8a;
    color: white;
    text-decoration: none;
}

.project-detail-page {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.detail-header {
    background: linear-gradient(135deg, #1e3a8a, #0056b3);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.detail-project-title {
    font-size: 2rem;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.detail-project-id {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 10px;
    font-weight: 500;
}

.detail-project-type {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    font-weight: 500;
}

.detail-meeting-date {
    background: rgba(255,255,255,0.15);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
    white-space: nowrap;
}

.detail-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.detail-location {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 6px solid #1e3a8a;
}

.detail-status {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    margin-bottom: 20px;
}

.detail-grid .detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

.detail-value {
    color: #6c757d;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tags .tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.detail-map {
    height: 400px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.detail-actions {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    gap: 15px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #1e3a8a;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    text-decoration: none;
}

/* Responsive detail page */
@media (max-width: 768px) {
    .detail-body {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }

    .detail-header {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .detail-project-title {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .detail-project-id {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .detail-grid .detail-row {
        grid-template-columns: 1fr;
        gap: 3px;
        margin-bottom: 12px;
    }

    .detail-section {
        margin-bottom: 20px;
    }

    .detail-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .detail-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 15px;
    }

    .btn {
        text-align: center;
        padding: 12px;
    }

    .detail-map {
        height: 250px;
        margin-top: 10px;
    }
}

/* Admin Interface Styles */
.admin-form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.project-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 25px;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.geocode-results {
    background: #f8f9fa;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.success-message {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
}

/* Glossary Modal */
.glossary-modal {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.glossary-intro {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.glossary-section {
    margin-bottom: 25px;
}

.glossary-section h3 {
    color: #1e3a8a;
    font-size: 1.2rem;
    margin-bottom: 15px;
    border-left: 4px solid #1e3a8a;
    padding-left: 10px;
}

.glossary-term {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.glossary-term .term-name {
    font-weight: bold;
    color: #1e3a8a;
    margin-bottom: 5px;
}

.glossary-term .term-definition {
    color: #555;
    line-height: 1.6;
}

/* Jargon Translation Tooltips */
.jargon-term {
    border-bottom: 1px dotted #8b1538;
    cursor: help;
    position: relative;
}

.jargon-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    max-width: 300px;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.4;
}

.jargon-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

/* Source Attribution */
.project-source-attribution {
    font-size: 0.85rem;
    color: #666;
    margin-top: 12px;
    margin-bottom: 12px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #1e3a8a;
}

.source-label {
    font-weight: bold;
    color: #1e3a8a;
}

.source-meeting {
    margin-left: 5px;
}

.source-link {
    color: #8b1538;
    text-decoration: none;
    margin-left: 10px;
    font-weight: 500;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .glossary-modal {
        margin: 10px;
        max-height: 90vh;
    }

    .jargon-tooltip {
        max-width: 250px;
        font-size: 0.8rem;
    }

    .project-source-attribution {
        font-size: 0.8rem;
    }

    .source-link {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}

/* Provenance Footer */
.provenance-footer {
    background: #f8f9fa;
    border-top: 1px solid #d3d3d3;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.85rem;
    color: #666;
}

.data-source-details {
    margin: 10px 0;
    font-size: 0.8rem;
    color: #777;
}

.disclaimer {
    font-style: italic;
    margin-top: 10px;
    color: #888;
}

/* Highlighted project card */
.project-card.highlighted {
    background: #fef3c7 !important;
    border-left-color: #fbbf24 !important;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.3) !important;
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}
