/* Maps Collection Styles */

/* Variables */
:root {
    --primary-color: #3b7ea1;
    --secondary-color: #2c3e50;
    --accent-color: #f39c12;
    --light-bg: #f5f5f5;
    --dark-bg: #333;
    --card-bg: #fff;
    --text-color: #333;
    --text-light: #777;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --header-height: 80px;
    --footer-height: 60px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Header */
.header-brand {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    height: var(--header-height);
}

.brand-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 50px;
}

/* Hero section */
.hero-section {
    height: 25vh;
    min-height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: var(--header-height);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/img/headings/heading-blur-3.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: white;
    padding: 20px;
    max-width: 800px;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Loading indicator */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-content {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sort options styling improvements */

.view-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    flex-wrap: wrap;
    gap: 15px;
}

.view-buttons {
    display: flex;
    gap: 10px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 15px;
    background-color: #f5f8fa;
    border-radius: var(--border-radius);
    border: 1px solid #e1e8ed;
}

.sort-label {
    font-weight: 600;
    color: var(--text-color);
    margin-right: 5px;
    white-space: nowrap;
}

.sort-select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background-color: white;
    min-width: 120px;
    transition: var(--transition);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 126, 161, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .view-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-options {
        width: 100%;
        justify-content: flex-start;
    }
}

/* View button improvements */
.view-btn {
    background-color: #f5f8fa;
    border: 1px solid #e1e8ed;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.view-btn:hover {
    background-color: #edf2f7;
}

.view-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}


/* Main tabs */
.main-tabs {
    margin: 30px 0;
    border-bottom: 1px solid #ddd;
}

.tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tab-item {
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-item:hover {
    color: var(--primary-color);
}

.tab-item.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-item i {
    font-size: 1.2rem;
}

/* Tab content */
.tab-content {
    margin-top: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Geographic Explorer */
.map-explorer {
    margin-bottom: 40px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    padding: 20px;
}

.map-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: var(--secondary-color);
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    min-width: 200px;
    background-color: white;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.map-container {
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.map-results {
    margin-top: 40px;
}

.map-results h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Timeline Explorer */
.timeline-explorer {
    margin-bottom: 40px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    position: relative;
}

.timeline-header {
    margin-bottom: 20px;
    text-align: center;
}

.timeline-header h3 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.timeline-controls {
    margin: 30px 0;
}

.year-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.timeline-slider {
    height: 6px;
    margin: 0 auto;
    max-width: 900px;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.timeline-eras {
    position: relative;
    height: 60px;
    margin-top: 30px;
    border-top: 1px solid #eee;
}

.era-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
}

.era-line {
    height: 20px;
    width: 1px;
    background-color: #ddd;
    margin: 0 auto;
}

.era-marker:nth-child(odd) .era-label {
    top: 25px; /* Labels below the line */
}

.era-marker:nth-child(even) .era-label {
    top: -25px; /* Labels above the line */
}

.era-label {
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-light);
    position: absolute;
    left: 0;
    transform: translateX(-50%);
}

.timeline-results {
    margin-top: 40px;
}

.timeline-results h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Advanced Search */
.advanced-search-form {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 30px;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 2px;
	aliagn-items: flex-start;
}

.search-group {
    flex: 1;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-group.full-width {
    flex-basis: 100%;
}

.search-group label {
    font-weight: 600;
    color: var(--secondary-color);
}

.search-input-wrapper {
    display: flex;
    position: relative;
}

.search-input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 0 20px;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: var(--secondary-color);
}

.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range-inputs input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.date-separator {
    color: var(--text-light);
}

.search-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
}

.secondary-btn {
    background-color: #e7e7e7;
    color: var(--text-color);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.secondary-btn:hover {
    background-color: #d7d7d7;
}

/* Search feedback and active filters */
.search-feedback {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    background-color: #e7f3fa;
    color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tag-remove {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.clear-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-all:hover {
    text-decoration: underline;
}

/* Search Results */
.search-results {
    margin-top: 30px;
}

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

.results-header h3 {
    color: var(--secondary-color);
    display: flex;
    align-items: center;
}

.results-header h3 span {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-left: 8px;
}

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

.view-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-btn:hover {
    background-color: #e7e7e7;
}

.view-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.items-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background-color: white;
}

/* Map Item Styles */
.map-item {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.map-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    background-color: #f9f9f9;
}

.map-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.map-year {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.map-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: var(--transition);
}

.map-item:hover .map-actions {
    opacity: 1;
}

.action-btn {
    background-color: rgba(0,0,0,0.6);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: var(--primary-color);
}

.map-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.map-title {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--secondary-color);
    line-height: 1.4;
}

.map-author {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.map-location {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.map-callnumber {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

/* List View */
.results-list {
    display: none;
}

.results-list.active {
    display: block;
}

.list-item {
    display: flex;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 20px;
    transition: var(--transition);
}

.list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.item-image {
    width: 200px;
    min-width: 200px;
    height: 150px;
    overflow: hidden;
    position: relative;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-content {
    flex: 1;
    padding: 15px;
}

.item-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.item-metadata {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.metadata-item {
    font-size: 0.9rem;
    color: var(--text-light);
}

.metadata-label {
    font-weight: 600;
    color: var(--primary-color);
}

.item-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 15px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 50px 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.no-results-icon {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--text-light);
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-btn {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    background-color: white;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.page-btn.disabled {
    background-color: #eee;
    color: #aaa;
    cursor: not-allowed;
    pointer-events: none;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: white;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.page-num:hover {
    background-color: #e7e7e7;
}

.page-num.active {
    background-color: var(--primary-color);
    color: white;
}

.page-ellipsis {
    color: var(--text-light);
}

/* Collection Info */
.collection-info {
    margin: 60px 0;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
}

.info-content {
    flex: 1;
    min-width: 300px;
    padding: 30px;
}

.info-content h2 {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.info-content p {
    margin-bottom: 15px;
    color: var(--text-color);
}

.info-image {
    flex: 1;
    min-width: 300px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

/* Citation */
.citation {
    text-align: center;
    margin: 40px 0 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.citation a {
    color: var(--primary-color);
    text-decoration: none;
}

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

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

.lightbox-content {
    width: 80%;
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-caption {
    color: white;
    padding: 20px;
    text-align: center;
    max-width: 800px;
}

.lightbox-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.lightbox-details {
    color: #ccc;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    text-align: left;
}

.detail-item {
    margin-bottom: 5px;
}

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1010;
    opacity: 0.7;
    transition: var(--transition);
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 1010;
    opacity: 0.7;
    transition: var(--transition);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    height: var(--footer-height);
}

/* Loading Results */
.loading-results {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
}

/* Responsive styles */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .tab-item {
        padding: 12px 15px;
    }
    
    .map-container {
        height: 400px;
    }
}

@media (max-width: 992px) {
    .hero-section {
        height: 40vh;
    }
    
    .timeline-explorer {
        padding: 15px;
    }
    
    .timeline-slider {
        max-width: 700px;
    }
    
    .era-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .tab-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .map-controls {
        flex-direction: column;
    }
    
    .map-container {
        height: 300px;
    }
    
    .search-row {
        flex-direction: column;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .list-item {
        flex-direction: column;
    }
    
    .item-image {
        width: 100%;
        min-width: 100%;
    }
    
    .item-actions {
        flex-direction: row;
        padding: 10px 15px;
        justify-content: flex-end;
    }
    
    .collection-info {
        flex-direction: column;
    }
}

#search.tab-pane.active {
    display: block !important;
    z-index: 1; /* Ensure it's above other elements */
}

@media (max-width: 576px) {
    .hero-section {
        height: 35vh;
        min-height: 300px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
    }
    
    .lightbox-content {
        width: 95%;
    }
    
    .lightbox-details {
        grid-template-columns: 1fr;
    }
}
	.search-group .date-range-slider {
		margin: 15px 0 25px; /* Reduced from 30px 0 50px */
		max-width: 400px; /* Limit the width */
		padding: 0 10px; /* Reduced padding */
	}

	.search-group .date-display {
		margin-bottom: 8px; /* Reduced from 15px */
		font-size: 0.9rem; /* Smaller font */
	}

	.search-group .date-range-labels {
		font-size: 0.8rem; /* Smaller font */
	}	

        .switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
        }
        
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: #3b7ea1;
        }
        
        input:focus + .slider {
            box-shadow: 0 0 1px #3b7ea1;
        }
        
        input:checked + .slider:before {
            transform: translateX(26px);
        }
        
        .toggle-container {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .toggle-label {
            font-weight: 600;
            color: var(--secondary-color);
        }
        /* Toggle Switch Style - Smaller Version */
        .switch {
            position: relative;
            display: inline-block;
            width: 48px; /* Reduced from 60px */
            height: 26px; /* Reduced from 34px */
        }
        
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 26px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 20px; /* Reduced from 26px */
            width: 20px; /* Reduced from 26px */
            left: 3px; /* Adjusted from 4px */
            bottom: 3px; /* Adjusted from 4px */
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: #3b7ea1;
        }
        
        input:focus + .slider {
            box-shadow: 0 0 1px #3b7ea1;
        }
        
        input:checked + .slider:before {
            transform: translateX(22px); /* Adjusted from 26px */
        }
        
        .toggle-container {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .toggle-label {
            font-weight: 600;
            color: var(--secondary-color);
        }
        
        /* Applied filters bar - common to all tabs */
        .applied-filters {
            background-color: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            padding: 15px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .filters-title {
            font-weight: 600;
            color: var(--secondary-color);
            margin-right: 15px;
        }
        
        .active-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            flex: 1;
        }
        
        /* Modified for Advanced Search */
        .date-range-slider {
            margin: 30px 0 50px;
            padding: 0 20px;
            position: relative;
        }
        
        .date-range-labels {
            display: flex;
            justify-content: space-between;
            margin-top: 10px;
            color: var(--text-light);
        }
        
        .date-display {
            margin: 0;
            font-weight: 600;
            color: var(--primary-color);
        }
		.label-inline {
    display: flex;
    align-items: center;
    gap: 10px; /* space between the label and the date range */
    margin-bottom: 10px;
}

	.label-inline label {
		margin: 0;
	}		
/* Advanced search styling improvements */

.advanced-search-form {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 30px;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.search-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-group.full-width {
    flex-basis: 100%;
}

.search-group label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.search-input-wrapper {
    display: flex;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-input-wrapper input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: var(--secondary-color);
}

.date-range-slider {
    margin: 15px 0 25px;
    padding: 0 20px;
    position: relative;
}

.date-range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.date-display {
    font-weight: 600;
    color: var(--primary-color);
    background-color: #f5f8fa;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #e1e8ed;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    width: 100%;
    appearance: none;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b7ea1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 126, 161, 0.1);
}

.search-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.primary-btn, .secondary-btn {
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
}

.secondary-btn {
    background-color: #e7e7e7;
    color: var(--text-color);
}

.secondary-btn:hover {
    background-color: #d7d7d7;
}

.label-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.label-inline label {
    margin: 0;
    white-space: nowrap;
}

/* Improve noUiSlider style */
.noUi-target {
    height: 8px;
    border: none;
    box-shadow: none;
    background-color: #e1e8ed;
}

.noUi-connects {
    border-radius: 4px;
}

.noUi-connect {
    background-color: var(--primary-color);
}

.noUi-handle {
    border: 2px solid var(--primary-color);
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    width: 20px !important;
    height: 20px !important;
    border-radius: 50%;
    top: -7px !important;
    right: -10px !important;
}

.noUi-handle:before, 
.noUi-handle:after {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
    }
    
    .search-group {
        width: 100%;
    }
    
    .label-inline {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date-display {
        margin-top: 5px;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Advanced search redesign to match Image 1 */

/* Publication Date Range layout */
.search-group .label-inline {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.search-group .label-inline label {
    margin-right: 10px;
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 180px;
}

/* Container for date range display and slider */
.date-range-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Date range display box */
.date-range-display {
    background-color: #f5f8fa;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #e1e8ed;
    display: inline-block;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 10px;
    width: fit-content;
}

/* Slider container with min and max labels */
.slider-with-labels {
    position: relative;
    padding: 0 10px;
    margin: 10px 0;
}

/* Position slider between min and max year labels */
.date-range-slider {
    margin: 0;
    padding: 0 10px;
    height: 30px;
    display: flex;
    align-items: center;
}

/* Min and max year labels */
.date-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-light);
    position: relative;
    top: -5px;
}

/* Adjust noUiSlider appearance */
.noUi-target {
    height: 6px;
    background-color: #e1e8ed;
    border: none;
    box-shadow: none;
}

.noUi-connects {
    border-radius: 3px;
}

.noUi-connect {
    background-color: var(--primary-color);
}

.noUi-handle {
    border: 2px solid var(--primary-color);
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    width: 18px !important;
    height: 18px !important;
    border-radius: 50%;
    top: -7px !important;
    right: -9px !important;
    cursor: pointer;
}

.noUi-handle:before, 
.noUi-handle:after {
    display: none;
}

/* Improve overall search form appearance */
.advanced-search-form {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 25px;
    margin-bottom: 30px;
}

.search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

/* Input styling */
.search-input-wrapper {
    display: flex;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-input-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
    outline: none;
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Select styling */
.filter-select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    width: 100%;
    appearance: none;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b7ea1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* Action buttons */
.search-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.primary-btn, .secondary-btn {
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    border: none;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-color);
}

.secondary-btn {
    background-color: #e7e7e7;
    color: var(--text-color);
}

.secondary-btn:hover {
    background-color: #d7d7d7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-row {
        flex-direction: column;
    }
    
    .search-group {
        width: 100%;
    }
    
    .label-inline {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .label-inline label {
        margin-bottom: 10px;
        min-width: auto;
    }
    
    .date-range-display {
        margin-bottom: 15px;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .primary-btn, .secondary-btn {
        width: 100%;
        justify-content: center;
    }
}
/* Improved sort options styling */

.view-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    flex-wrap: wrap;
    gap: 15px;
}

.view-buttons {
    display: flex;
    gap: 8px;
}

.view-btn {
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #f5f8fa;
    color: var(--text-color);
    border: 1px solid #e1e8ed;
    transition: var(--transition);
}

.view-btn:hover {
    background-color: #e9f0f5;
}

.view-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 15px;
    background-color: #f5f8fa;
    border-radius: var(--border-radius);
    border: 1px solid #e1e8ed;
}

.sort-label {
    font-weight: 600;
    color: var(--secondary-color);
    white-space: nowrap;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background-color: white;
    min-width: 140px;
    color: var(--text-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b7ea1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    appearance: none;
    padding-right: 30px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 126, 161, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .view-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-options {
        width: 100%;
    }
}
/* Publication Date Range improvements */

/* Main container */
.search-group .label-inline {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

/* Date range label styling */
.search-group .label-inline label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-right: 15px;
    white-space: nowrap;
    min-width: 160px;
}

/* Adjust the slider container layout */
.search-row .date-range-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    gap: 10px;
}

/* Style for the date display */
.search-row .date-range-display {
    padding: 5px 10px;
    background-color: #f5f8fa;
    border: 1px solid #e1e8ed;
    border-radius: 4px;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}

/* Slider container */
.search-row .slider-with-labels {
    flex: 1;
    margin: 0 15px;
    position: relative;
}

/* The slider itself */
.search-row .date-range-slider {
    height: 30px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Min/max labels below slider */
.search-row .date-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 3px;
}

/* Improve noUiSlider appearance */
.noUi-target {
    height: 6px;
    background-color: #e1e8ed;
    border: none;
    box-shadow: none;
}

.noUi-connects {
    border-radius: 3px;
}

.noUi-connect {
    background-color: var(--primary-color);
}

.noUi-handle {
    border: 2px solid var(--primary-color);
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    width: 18px !important;
    height: 18px !important;
    border-radius: 50%;
    top: -7px !important;
    right: -9px !important;
    cursor: pointer;
}

.noUi-handle:before, 
.noUi-handle:after {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-row .date-range-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .search-row .slider-with-labels {
        width: 100%;
        margin: 15px 0;
    }
}
/* Force horizontal layout for date range container */
.date-range-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: calc(100% - 200px) !important;
    gap: 15px !important;
}
/* The slider element */
.date-range-slider {
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

#search-date-slider {
    width: 100% !important;
}
/* Map Hierarchy Styling Additions */

/* Map markers */
.leaflet-div-icon {
    background: none;
    border: none;
}

.continent-marker-inner, 
.country-marker-inner, 
.region-marker-inner {
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.continent-marker-inner {
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    border: 2px solid white;
}

.country-marker-inner {
    width: 20px;
    height: 20px;
    background-color: var(--secondary-color);
    border: 2px solid white;
}

.region-marker-inner {
    width: 15px;
    height: 15px;
    background-color: var(--accent-color);
    border: 2px solid white;
}

/* Hover effects for markers */
.continent-marker-inner:hover,
.country-marker-inner:hover,
.region-marker-inner:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

/* World view button */
.world-view-btn {
    margin: 10px;
    background: none;
    padding: 0;
}

.world-view-btn button {
    padding: 8px 12px;
    background-color: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.world-view-btn button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Map loading indicator */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.map-loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 2s linear infinite;
}

/* Popup styling */
.leaflet-popup-content {
    text-align: center;
}

.leaflet-popup-content strong {
    display: block;
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.leaflet-popup-content p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.leaflet-popup-content a {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.leaflet-popup-content a:hover {
    background-color: var(--secondary-color);
}

/* Make map container responsive */
@media (max-width: 768px) {
    .map-container {
        height: 350px;
    }
    
    .world-view-btn button {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
    
    .continent-marker-inner {
        width: 25px;
        height: 25px;
    }
    
    .country-marker-inner {
        width: 18px;
        height: 18px;
    }
    
    .region-marker-inner {
        width: 12px;
        height: 12px;
    }
}