/* Reset and Base Styles */
* {
    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: #333;
    background-color: #fafafa;
    overflow-x: hidden;
}

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

/* Header Styles */
.header {
    background: #fe7700;
    background-image: url('../images/ui/sibling-action-texture-01.png');
    background-size: 800px 566px;
    background-position: top -50px left -450px;
    background-repeat: repeat;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.header h1 {
    font-size: 2.5rem;
    color: white;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

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

.nav-link {
    text-decoration: none;
    color: #f8fafc;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #fef3c7;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #2563eb;
}

/* Main Layout */
.main {
    display: flex;
    min-height: calc(100vh - 140px);
    position: relative;
}

/* Welcome Content within Filter Panel */
.filter-panel .welcome-content {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin: 10px;
}

.filter-panel .welcome-content h2 {
    font-size: 1.5rem;
}

.filter-panel .welcome-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.filter-panel .welcome-content p {
    font-size: 0.95rem;
    color: #495057;
    margin-bottom: 15px;
    line-height: 1.6;
}

.filter-panel .welcome-content p:last-child {
    margin-bottom: 0;
}

.filter-panel .welcome-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.filter-panel .welcome-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.filter-panel .welcome-content a:hover {
    text-decoration: underline;
}

/* Filter Panel */
.filter-panel {
    width: 400px;
    background: #fff;
    background-image: url('../images/ui/sibling-action-texture-01.png');
    background-size: 800px 566px;
    background-position: top left;
    background-repeat: repeat;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
}

.filter-panel--open {
    transform: translateX(0);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.filter-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.filter-toggle {
    background: #fe7700; /* Match clear filters button - darker orange */
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-toggle:hover {
    background: #e55a00; /* Standard orange on hover */
}

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.filter-input,
.filter-select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.filter-option:hover {
    background: #f1f5f9;
}

.filter-option input[type="radio"] {
    margin: 0;
}

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

.filter-tag {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.filter-tag:hover {
    background: #e2e8f0;
}

.filter-tag input[type="checkbox"] {
    margin: 0;
}


/* Map Container */
.map-container {
    flex: 1;
    position: relative;
    background: #f8fafc;
}

.map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.map-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

.map-control-btn {
    background: #fff;
    border: 1px solid #d1d5db;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.map-control-btn:hover {
    background: #f9fafb;
    border-color: #2563eb;
}

/* Project Cards */
.project-cards {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.project-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 2002;
}

.project-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.project-card__header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.project-card__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.project-card__close:hover {
    background: #f1f5f9;
}

.project-card__content {
    padding: 1.5rem;
}

.project-card__image {
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card__image img,
.project-card__image-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.project-card__description {
    margin-bottom: 1rem;
    color: #64748b;
    line-height: 1.6;
}

.project-card__meta {
    margin-bottom: 1.5rem;
}

.project-card__category {
    display: inline-block;
    background: #fe7700;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-card__tag {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.project-card__actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

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

.btn-secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
}

/* Footer */
.footer {
    background: #1e293b;
    background-image: url('../images/ui/texture_footer_cracked.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    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 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

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

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

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
    color: #94a3b8;
}

/* Top Controls */
.top-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Time Period and Status Row */
.time-status-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.time-period-group {
    flex: 2;
    min-width: 0;
}

.advanced-category .time-period-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151 !important; /* Override the black color */
}

.time-slider-container {
    position: relative;
}

/* Angle Status Row - Same as time-status-row */
.angle-status-row {
    display: flex;
    gap: 1rem;
    align-items: end;
}

.dual-slider-wrapper {
    position: relative;
    height: 20px;
    background: #e5e7eb;
    border-radius: 2px;
}

.time-slider {
    position: absolute;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    pointer-events: none;
}

.time-slider-min {
    z-index: 2;
    pointer-events: auto;
}

.time-slider-max {
    z-index: 1;
    pointer-events: auto;
}

.time-slider::-webkit-slider-track {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
}

.time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fe7700;
    cursor: pointer;
    border: 2px solid #e55a00;
    border-radius: 3px;
    position: relative;
}

/* Chevron arrows positioned above/below slider line */
.time-slider-min::-webkit-slider-thumb::after {
    content: '▲';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    color: #feffd9;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

.time-slider-max::-webkit-slider-thumb::after {
    content: '▼';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    color: #feffd9;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

.time-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    color: #6b7280;
}

/* Custom Dual Range Slider Styles */
.dual-range-slider {
    position: relative;
    height: 20px;
    margin: 0.5rem 0;
    cursor: pointer;
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    transform: translateY(-50%);
}

.slider-range {
    position: absolute;
    top: 50%;
    height: 4px;
    background: #fe7700;
    border-radius: 2px;
    transform: translateY(-50%);
}

/* Special styling when sliders are touching */
.dual-range-slider.overlapped .slider-range {
    background: #f59e0b; /* Lighter orange */
}

.dual-range-slider.overlapped .slider-thumb {
    background: #f59e0b;
    border-color: #fe7700;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3); /* Subtle orange glow effect */
}

.slider-thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #fe7700;
    border: 2px solid #e55a00;
    border-radius: 3px;
    cursor: pointer;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-thumb:hover {
    background: #e55a00;
    transform: translate(-50%, -50%) scale(1.1);
}

.thumb-arrow {
    color: #feffd9;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
}

/* Status Toggle Group */
.status-toggle-group {
    flex: 1;
    min-width: 0;
}

.status-toggle {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d1d5db;
    background: #fff;
}

.status-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: #fff;
    color: #374151;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e5e7eb;
}

.status-btn:last-child {
    border-bottom: none;
}

.status-btn:hover {
    background: #fef3e2; /* Cream hover instead of grey */
}

.status-btn.active {
    background: #fe7700;
    color: #fff;
}

/* Color By Row */
.color-by-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-by-row label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #000;
}

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

.color-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f3f4f6; /* Light grey for inactive */
    color: #374151;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0;
    flex: 1;
}

.color-btn:hover:not(.active) {
    background: #fef3e2; /* Light cream hover */
    border-color: #fbbf24;
}

.color-btn.active {
    background: #fe7700; /* Orange for active state */
    color: #fff;
    border-color: #fe7700;
}

/* Filter Accordion */
.filter-accordion {
    margin-top: -0.5rem;
    margin-bottom: 0.5rem; /* Restore some bottom margin */
    width: 100%; /* Ensure full width */
}

.filter-category {
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.8); /* Less translucent - 80% instead of 70% */
    overflow: hidden;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-title-section {
    flex: 1;
    margin-right: 1rem;
    display: flex;
    justify-content: space-between; /* Space between title and description */
    align-items: center; /* Vertically center both elements */
}

.category-title-section h3 {
    margin-right: 0.5rem; /* Add space between title and subtitle */
}

.category-description-inline {
    font-size: 0.8rem;
    color: #374151; /* Dark grey instead of white */
    margin-top: 0; /* Remove top margin */
    font-weight: normal;
    line-height: 1.3;
    display: inline; /* Make it inline */
}

/* Right-align only Art Forms description */
.artforms-category .category-description-inline {
    /* Flexbox handles positioning automatically */
}

.category-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.category-content {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.accordion-icon {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
}

.accordion-icon.open {
    transform: rotate(180deg);
}

.artforms-category {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.25), rgba(59, 130, 246, 0.2)); /* Less translucent and darker */
    border-color: rgba(59, 130, 246, 0.3);
}

.communities-category {
    background: linear-gradient(135deg, rgba(134, 239, 172, 0.25), rgba(34, 197, 94, 0.2)); /* Less translucent and darker */
    border-color: rgba(34, 197, 94, 0.3);
}

.issues-category {
    background: linear-gradient(135deg, rgba(251, 191, 143, 0.25), rgba(249, 115, 22, 0.2)); /* Less translucent and darker */
    border-color: rgba(249, 115, 22, 0.3);
}

.ownership-category {
    background: linear-gradient(135deg, rgba(196, 181, 253, 0.25), rgba(139, 92, 246, 0.2)); /* Less translucent and darker */
    border-color: rgba(139, 92, 246, 0.3);
}

.filter-category h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #000;
}

.category-description {
    margin: 0 0 0.75rem 0;
    font-size: 0.8rem;
    color: #000;
    line-height: 1.3;
}

/* Filter Search */
.filter-search {
    margin-bottom: 0.75rem;
}

.filter-search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #000;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.filter-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.filter-search-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Applied Tags */
.applied-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}


/* Common Tags */
.common-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tags-label {
    width: 100%;
    font-size: 0.7rem;
    font-weight: 600;
    color: #000;
    margin-bottom: 0.25rem;
}

.common-tag {
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #fff;
    color: #6b7280;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.common-tag:hover {
    background: #fef3e2; /* Cream hover instead of black */
    border-color: #fbbf24; /* Amber border */
    color: #374151; /* Dark grey text */
}

.common-tag.active {
    background: #fe7700;
    border-color: #fe7700;
    color: #fff;
}

/* Applied tags also get white text when active */
.applied-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #fe7700;
    color: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid #fe7700;
}

.remove-tag {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.remove-tag:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

/* Ownership Sliders */
.slider-group {
    margin-bottom: 1rem;
}

.slider-header {
    display: flex;
    flex-direction: column; /* Stack vertically instead of horizontally */
    align-items: center; /* Center align instead of flex-start */
    margin-bottom: 0.1rem; /* Minimal padding */
}

.slider-header label {
    margin-bottom: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #000;
}

.slider-guide {
    font-size: 0.7rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 0.1rem; /* Minimal spacing */
    display: block; /* Force line break */
}

.slider-container {
    position: relative;
}

.ownership-slider {
    position: absolute;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    pointer-events: none;
}

.ownership-slider-min {
    z-index: 2;
    pointer-events: auto;
}

.ownership-slider-max {
    z-index: 1;
    pointer-events: auto;
}

.ownership-slider::-webkit-slider-track {
    height: 6px;
    border-radius: 3px;
    background: #fff;
}

.ownership-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fe7700;
    cursor: pointer;
    border: 2px solid #e55a00;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Chevron arrows positioned above/below ownership slider line */
.ownership-slider-min::-webkit-slider-thumb::after {
    content: '▲';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    color: #feffd9;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

.ownership-slider-max::-webkit-slider-thumb::after {
    content: '▼';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    color: #feffd9;
    font-size: 14px;
    font-weight: bold;
    pointer-events: none;
}

.ownership-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fe7700;
    cursor: pointer;
    border: 2px solid #e55a00;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #666;
}

.slider-label-min {
    text-align: left;
}

.slider-label-max {
    text-align: right;
}

.slider-label-unified {
    text-align: center;
    width: 100%;
}

/* Status toggle specific styling */
.status-toggle-group {
    flex: 0 0 25%; /* Fixed 25% width */
    min-width: 0;
}

/* Angle slider specific styling */
#angle-slider {
    flex: 1; /* Take full available width */
    min-width: 0;
}

#angle-slider .slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: #64748b;
}

#angle-slider .slider-label-min,
#angle-slider .slider-label-max {
    max-width: 40%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-height: 2.5em; /* Force two lines */
    line-height: 1.25;
    display: flex;
    align-items: center;
}

#angle-slider .slider-label-min {
    text-align: left;
}

#angle-slider .slider-label-max {
    text-align: right;
}

#angle-slider .slider-label-unified {
    text-align: center;
    width: 100%;
    max-width: 100%;
    min-height: 2.5em; /* Match min/max labels height */
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-label-unified {
    text-align: center;
    width: 100%;
}

/* Pulse animation for changed text */
@keyframes pulse-purple {
    0% { color: #8b5cf6; }
    100% { color: #6b7280; }
}

.text-pulse {
    animation: pulse-purple 0.8s ease-out;
}

/* Status Toggle Colors - Consolidated */
.status-btn {
    background: #f3f4f6; /* Light grey default */
    color: #374151;
    transition: all 0.2s ease;
}

.status-btn:hover {
    background: #fef3e2; /* Cream hover instead of blue */
    color: #1e40af;
}

.status-btn.active {
    background: #fe7700; /* Orange active state */
    color: white;
}

/* Filter Clear Button */
.filter-clear {
    width: 100%;
    padding: 0.5rem;
    background: #e55a00; /* Darker orange - slightly darker than main orange */
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.75rem;
    font-size: 0.8rem;
}

.filter-clear:hover {
    background: #fe7700; /* Standard orange on hover */
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* About Page Styles */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

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

.breadcrumb-item:not(:last-child)::after {
    content: '→';
    margin-left: 0.5rem;
    color: #6b7280;
}

.breadcrumb-item a {
    color: #fe7700;
    text-decoration: none;
    font-weight: 500;
}

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

.breadcrumb-item.active {
    color: #374151;
    font-weight: 500;
}

.about-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-sidebar {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.about-nav h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.about-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-nav-list li {
    margin-bottom: 0.5rem;
}

.about-nav-link {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #6b7280;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.about-nav-link:hover {
    background: #fef3e2;
    color: #374151;
}

.about-nav-link.active {
    background: #fe7700;
    color: white;
}

.about-content {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 2rem;
}

.about-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #fe7700;
    padding-bottom: 0.5rem;
}

.about-section h3 {
    margin: 2rem 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
}

.about-text {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: #4b5563;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-text a {
    color: #fe7700;
    text-decoration: none;
    font-weight: 500;
}

.about-text a:hover {
    text-decoration: underline;
}

.contact-info {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.contact-details {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer {
    background: #1e293b;
    background-image: url('../images/ui/texture_footer_cracked.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #fe7700;
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Navigation Styles */
.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #fef3c7;
    background: none;
}

.nav-link.active {
    background: #fef3c7;
    color: #f59e0b;
}

/* View Toggle Group (Map/Library) */
.view-toggle-group {
    display: flex;
    flex-direction: row;
    gap: 0;
    background: #ffffff;
    border-radius: 20px;
    padding: 2px;
    overflow: hidden;
    margin-right: 1rem;
}

.view-toggle-btn {
    border-radius: 0;
    border: none;
    margin: 0;
    background: #ffe8af;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    transition: background-color 0.2s ease;
    flex: 1;
    cursor: pointer;
    color: #6b7280;
}

.view-toggle-btn:first-child {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.view-toggle-btn:last-child {
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

.view-toggle-btn:hover {
    background: #fef3e2;
}

.view-toggle-btn.active {
    background: white;
    color: #fe7700;
}

/* Coming Soon Button Text */
.view-toggle-btn.coming-soon {
    color: #dc2626 !important;
}

/* Desktop - Hide mobile elements */
@media (min-width: 769px) {
    .mobile-explore-btn {
        display: none;
    }
    
    .mobile-filter-close {
        display: none;
    }
    
    .mobile-welcome {
        display: none !important;
    }
    
    /* Show map control buttons on desktop */
    .map-control-btn {
        display: inline-block !important;
    }
}

/* Mobile Filter Overlay */
@media (max-width: 768px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 3000 !important;
        overflow-y: auto;
        padding: 1rem;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        display: none;
    }
    
    .filter-sidebar.open {
        transform: translateX(0);
        display: block;
    }
    
    .filter-sidebar .filter-toggle {
        display: none !important; /* Hide the about/filter toggle in mobile overlay */
    }
    
    /* Hide the entire filter toggle section on mobile */
    .filter-toggle {
        display: none !important;
    }
    
    .mobile-filter-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: #fe7700;
        color: white;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-filter-close:hover {
        background: #e55a00;
    }
    
    /* Mobile Explore Button in Header */
    .mobile-explore-btn {
        background: white !important;
        color: #fe7700 !important;
        border: none !important;
        border-radius: 20px !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
        cursor: pointer;
        text-decoration: none !important;
        display: inline-block;
    }
    
    .mobile-explore-btn:hover {
        background: #f8fafc !important;
        color: #e55a00 !important;
    }
    
    /* Mobile Welcome Content */
    .mobile-welcome {
        padding: 1rem;
        background: white;
        margin-top: 1rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-welcome h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        color: #1e293b;
    }
    
    .mobile-welcome p {
        font-size: 0.9rem;
        line-height: 1.5;
        color: #64748b;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile Legend - Target YOUR Custom Legend */
    .map-legend {
        font-size: 0.7rem !important;
        max-width: 100px !important;
        min-width: 100px !important;
        width: 100px !important;
        padding: 0.4rem !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.5) !important;
        border-radius: 4px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
        position: absolute !important;
        bottom: 0.5rem !important;
        left: 0.5rem !important;
        z-index: 1000 !important;
    }
    
    .map-legend h4 {
        font-size: 0.7rem !important;
        margin: 0 0 0.4rem 0 !important;
        font-weight: 600 !important;
        color: #374151 !important;
        line-height: 1.2 !important;
    }
    
    .map-legend .legend-item {
        font-size: 0.6rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.15rem !important;
        padding: 0.1rem 0 !important;
    }
    
    .map-legend .legend-color {
        width: 8px !important;
        height: 8px !important;
        margin-right: 0.2rem !important;
        display: inline-block !important;
        border-radius: 1px !important;
    }
    
    /* Hide legend when filters are open - use Alpine.js conditional */
    .map-legend {
        transition: opacity 0.3s ease !important;
    }
    
    /* Hide Leaflet controls when filters are open on mobile */
    .leaflet-control-attribution {
        transition: opacity 0.3s ease !important;
    }
    
    /* Mobile Map Controls - Hide zoom controls permanently */
    .leaflet-control-zoom {
        display: none !important;
    }
    
    .leaflet-control-layers-toggle {
        transform: scale(0.7) !important;
        width: 30px !important;
        height: 30px !important;
        background-size: 20px 20px !important;
    }
    
    /* Custom map control buttons */
    .leaflet-control-custom {
        transform: scale(0.7) !important;
    }
    
    .leaflet-control-custom a {
        width: 30px !important;
        height: 30px !important;
        line-height: 30px !important;
        font-size: 12px !important;
        padding: 0 !important;
    }
    
    /* Hide map control buttons on mobile */
    .map-control-btn {
        display: none !important;
    }
    
    /* Force Leaflet controls to stay below filters */
    .leaflet-control-container {
        z-index: 1000 !important;
    }
    
    .leaflet-control-attribution {
        z-index: 1000 !important;
    }
    
    .leaflet-control-zoom {
        z-index: 1000 !important;
    }
    
    .leaflet-control-layers {
        z-index: 1000 !important;
    }
    
    /* Fix map padding issues */
    #map {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .leaflet-container {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .main-content {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Hide desktop view toggle */
    .view-toggle-group {
        display: none;
    }
}

/* Mobile Responsiveness for About Page */
@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-sidebar {
        position: static;
        order: 2;
    }
    
    .about-content {
        order: 1;
        padding: 1.5rem;
    }
    
    .about-nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .about-nav-list li {
        margin-bottom: 0;
        flex:auto;
    }

    .about-nav h3 {
        text-align:center;
    }
    
    .about-nav-link {
        padding: 0.3rem 0.5rem;
        margin: 0;
        font-size: 0.7rem;
        background-color: #ffefe0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Selected project marker styling */
.selected-project {
    transform: scale(1.2);
    z-index: 1000;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
    border: 2px solid #3b82f6;
}

.selected-project::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Advanced Category Accordion */
.advanced-category {
    margin-bottom: 1.5rem; /* More margin bottom */
    margin-top: 1rem; /* More padding above the advanced accordion */
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(241, 243, 244, 0.5); /* More transparent - 50% instead of 60% */
    overflow: hidden;
}

.advanced-category .category-header {
    background: rgba(220, 220, 220, 0.8); /* Darker grey - 10% darker */
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.advanced-category .category-header:hover {
    background: rgba(232, 234, 237, 0.9); /* Slightly darker on hover */
}

.advanced-category .category-title-section h3 {
    font-size: 1.125rem; /* Match other accordion titles (default h3 size) */
    font-weight: 600;
    color: #374151;
    margin-right: 0.5rem;
}

.advanced-category .category-content {
    padding: 0.5rem 0.75rem 0.25rem; /* Tiny bit less padding bottom */
    background: rgba(220, 220, 220, 0.5); /* Darker grey - 10% darker */
}

/* Advanced Status Section */
.advanced-status-section {
    margin-bottom: 1rem;
}

.advanced-status-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.advanced-status-container label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    white-space: nowrap;
}

.advanced-status-buttons {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    gap: 0; /* No gap between buttons */
    background: #ffffff; /* White background for unselected state */
    border-radius: 20px; /* Pill shape */
    padding: 2px; /* Small padding */
    overflow: hidden; /* Clean edges */
}

.advanced-status-buttons .status-btn {
    border-radius: 0; /* Remove individual button rounding */
    border: none; /* Remove borders */
    margin: 0; /* Remove margins */
    background: transparent; /* Transparent background */
    padding: 0.5rem 1rem; /* Horizontal padding */
    font-size: 0.8rem; /* Slightly smaller text (was 0.875rem) */
    transition: background-color 0.2s ease;
    flex: 1; /* Equal width buttons */
}

/* First button (All) - rounded left side */
.advanced-status-buttons .status-btn:first-child {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

/* Last button (Finished) - rounded right side */
.advanced-status-buttons .status-btn:last-child {
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

/* Middle button (Active) - no rounding */
.advanced-status-buttons .status-btn:nth-child(2) {
    border-radius: 0;
}

.advanced-status-buttons .status-btn:hover {
    background: #fef3e2; /* Cream hover instead of grey */
}

.advanced-status-buttons .status-btn.active {
    background: #fe7700; /* Orange active state */
    color: white;
}

/* Advanced Time Period Section */
.advanced-timeperiod-section {
    margin-bottom: 1rem;
}

.advanced-timeperiod-section .time-period-group {
    margin-bottom: 0; /* Remove extra margin since it's in Advanced section */
}
.advanced-colourby-section {
    margin-bottom: 1rem;
}

.advanced-colourby-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.advanced-colourby-container label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    white-space: nowrap;
}

.advanced-color-by-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.advanced-color-by-buttons .color-btn {
    padding: 0.2rem 0.4rem; /* Fractionally smaller buttons */
    font-size: 0.7rem; /* Even smaller text */
    text-align: center; /* Center text within buttons */
    background: #ffffff; /* White background when not selected */
    border: 1px solid #d1d5db; /* Slightly stronger grey border */
    border-radius: 4px; /* Slight rounding */
    transition: all 0.2s ease; /* Smooth transitions */
}

.advanced-color-by-buttons .color-btn.active {
    background: #fe7700; /* Orange for active state */
    color: white;
    border-color: #fe7700;
}

.advanced-color-by-buttons .color-btn:hover:not(.active) {
    background: #fef3e2; /* Light cream hover */
    border-color: #fbbf24; /* Amber border */
}

/* Time Period Container */
.time-period-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.advanced-category .advanced-timeperiod-section .time-period-group .time-period-container label {
    font-weight: 600;
    color: #374151 !important; /* Same grey as other titles, force override */
    font-size: 0.875rem;
    white-space: nowrap;
    padding-right: 0.5rem; /* Add space between title and slider */
}

.time-slider-container {
    flex: 1;
    max-width: 60%; /* Further reduce slider width */
}
.unified-search-section {
    margin: 0.25rem 0; /* Less top/bottom margins */
    padding: 0.25rem 0; /* Less padding */
    background: rgba(255, 255, 255, 0.6); /* Semi-transparent white overlay */
    border-radius: 0; /* Remove border radius */
    box-shadow: none; /* Remove shadow */
}

.unified-search-container {
    position: relative;
}

.unified-search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Space between label and input */
}

.unified-search-input-container label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    white-space: nowrap; /* Prevent label from wrapping */
}

.unified-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem; /* Reduce padding */
    border: 1px solid #d1d5db; /* Simpler border */
    border-radius: 4px; /* Smaller border radius */
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
    background: #fff;
}

.unified-search-input:focus {
    outline: none;
    border-color: #fe7700;
    box-shadow: 0 0 0 3px rgba(254, 119, 0, 0.1);
}

.unified-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #fef3e2; /* Light orange hover */
}

/* Popup Image Styles */
.popup-image {
    width: 100%;
    margin-bottom: 0.75rem;
    border-radius: 0.375rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-img {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    display: block;
}

.suggestion-item:active {
    background-color: #e5e7eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .unified-search-section {
        margin: 1rem 0;
        padding: 0.75rem;
    }
    
    .unified-search-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .suggestion-item {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
}
