* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #2c3e50;
    color: white;
    padding: 1rem 2rem;
    text-align: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

header .subtitle {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

main {
    flex: 1;
    display: flex;
    position: relative;
}

#map {
    flex: 1;
    min-height: 500px;
    z-index: 1;
}

/* Sidebar */
.sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90vw;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(100%);
}

.sidebar-content {
    padding: 1.5rem;
}

.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

#location-name {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.years {
    font-size: 1.1rem;
    color: #3498db;
    font-weight: 500;
    margin-bottom: 1rem;
}

.story {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Documents Section */
.documents-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.documents-section h3 {
    font-size: 1rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.document-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #3498db;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}

.document-link:hover {
    background: #e8f4fc;
}

.doc-icon {
    font-size: 1.2rem;
}

/* Photo Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #eee;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .caption {
    display: none;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox.hidden {
    display: none;
}

.lightbox .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2.5rem;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
}

#lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
    text-align: center;
    padding: 0 2rem;
}

/* Footer & Legend */
footer {
    background: #2c3e50;
    color: white;
    padding: 0.75rem 2rem;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.marker-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.marker-icon.usaf {
    background: #3498db;
}

.marker-icon.home {
    background: #27ae60;
}

.marker-icon.travel {
    background: #e67e22;
}

/* Custom Map Markers */
.custom-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.custom-marker.usaf {
    background: #3498db;
}

.custom-marker.home {
    background: #27ae60;
}

.custom-marker.travel {
    background: #e67e22;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.4rem;
    }

    .sidebar {
        width: 100%;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .legend {
        gap: 1rem;
    }
}
