@font-face {
    font-family: 'Brandon Text';
    src: url('brandontext-regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: 'Brandon Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    height: 100vh;
}

.container {
    display: flex;
    height: 100vh;
    border: 2px solid #E8E3C8;
}

/* Sidebar Styles */
.sidebar {
    width: 33.333%;
    background-color: #FDFBDD;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #D4CEB0;
}

.sidebar-header {
    padding: 20px;
    background-color: #000000;
    color: #FDFBDD;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.subtitle-link {
    display: block;
    color: #FDFBDD;
    font-size: 14px;
    text-decoration: underline;
    margin-bottom: 12px;
    transition: opacity 0.2s;
}

.subtitle-link:hover {
    opacity: 0.8;
}

.search-container {
    margin-top: 12px;
}

.search-input {
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Brandon Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #F5F2E0;
    transition: background-color 0.2s;
}

.search-input:focus {
    outline: none;
    background-color: #FFF9E6;
    box-shadow: 0 0 0 3px rgba(253, 251, 221, 0.4);
}

.search-input::placeholder {
    color: #8B8373;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.project-item {
    padding: 20px;
    border-bottom: 1px solid #E8E3C8;
    cursor: pointer;
    transition: background-color 0.2s;
    display: block;
}

.project-item.hidden {
    display: none;
}

.project-item:hover {
    background-color: #F5F2E0;
}

.project-item.expanded {
    background-color: #FFF9E6;
}

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

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: #3d3520;
    flex: 1;
    cursor: pointer;
}

.project-preview {
    color: #5d5740;
    line-height: 1.5;
    display: inline;
}

.project-description {
    color: #5d5740;
    line-height: 1.5;
    margin-bottom: 12px;
}

.description-preview {
    display: block;
}

.description-preview.hidden {
    display: none;
}

.expand-toggle {
    color: #8B7E4F;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    font-size: 14px;
    padding: 4px;
    min-width: 20px;
    justify-content: center;
}

.expand-toggle:hover {
    color: #6B5E3F;
}

.project-details {
    display: none;
    margin-top: 12px;
}

.project-details.show {
    display: block;
}

.project-details p {
    margin-bottom: 12px;
    color: #495057;
    line-height: 1.6;
}

.project-details strong {
    color: #3d3520;
    display: block;
    margin-bottom: 4px;
}

.description-full {
    display: none;
    color: #5d5740;
    line-height: 1.5;
    white-space: pre-wrap;
}

.description-full.show {
    display: block;
}

.project-leader,
.project-contact,
.project-zipcode {
    margin-bottom: 12px;
}

/* Map Styles */
#map {
    width: 66.667%;
    height: 100vh;
    position: relative;
}

/* Custom Zoom Controls */
.custom-zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 4px;
}

.zoom-button {
    width: 40px;
    height: 40px;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-button:hover {
    background: #f8f9fa;
    color: #007bff;
}

.zoom-button:active {
    transform: scale(0.95);
}

/* Mapbox Popup Styles */
.mapboxgl-popup {
    max-width: 300px;
}

.mapboxgl-popup-content {
    padding: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.popup-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

/* Custom marker styles */
.marker {
    background-color: #007bff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    transition: transform 0.2s ease-out;
}

.marker:hover {
    transform: translate3d(0, 0, 0) scale(1.2);
}

.marker.active {
    background-color: #dc3545;
    transform: translate3d(0, 0, 0) scale(1.3);
}

/* Scrollbar Styles */
.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: #F5F2E0;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #C4BDA0;
    border-radius: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #A89F82;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: 50vh;
        border-right: none;
        border-top: 1px solid #D4CEB0;
        order: 2;
    }

    .sidebar-header {
        padding: 12px;
    }

    .sidebar-header h1 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .subtitle-link {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .search-input {
        padding: 6px 8px;
        font-size: 12px;
    }

    #map {
        width: 100%;
        height: 50vh;
        order: 1;
    }

    .project-item {
        padding: 12px;
    }

    .project-title {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .project-description {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .description-preview,
    .description-full {
        font-size: 13px;
        line-height: 1.4;
    }

    .project-details {
        margin-top: 8px;
        font-size: 12px;
    }

    .project-leader,
    .project-contact,
    .project-zipcode {
        margin-bottom: 8px;
    }

    .expand-toggle {
        font-size: 12px;
        padding: 2px;
    }

    .custom-zoom-controls {
        top: 10px;
        right: 10px;
    }

    .zoom-button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
}
