.map-header {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
	margin-top: 0;
	margin-bottom: 30px;
    padding: 15px;
    border-radius: 10px;
    box-sizing: border-box;

    height: 140px;            
    display: flex;
    flex-direction: column;
    justify-content: center;    
	text-align: center;
}

.map-title {
    text-align: center;
	margin-bottom: 10px;
	margin-top: 0;
    font-size: 40px;
    letter-spacing: 1px;
	color: white;	
}

.map-body {
	background: #193352;
}

.range-filter-container {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto 50px auto;
    padding: 15px;
    background: #b3d6e3;
    border-radius: 10px;
    box-sizing: border-box;

    display: flex;
    flex-wrap: nowrap;  
    align-items: center;
    gap: 10px;
    position: relative;
}

.range-filter-container input {
    flex: 1;      
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    color: #193352;
    font-size: 15px;
    min-width: 0; 

}

.range-filter-container input::placeholder {
    color: #78c1dc;
    font-weight: 200;
}

.range-filter-container button {
    padding: 12px 20px;
    background: white;
    color: #193352;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap; 
}

.range-filter-container button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.map-wrapper {
    position: relative;
    width: 100%;
    height: 1000px;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#range-map {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;
    border-radius: 6px;
    z-index: 400;
}


#drawn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 800;
}

#results-overlay {
    position: absolute;
    top: 80px;
    right: 20px;

    width: 380px;      
    height: 420px; 

    background: #ffffff;
	color: #1e3a8a;
    border-radius: 12px;
    padding: 20px; 
    overflow-y: auto;
    z-index: 900;
}

@media (max-width: 768px) {
    #results-overlay {
        top: auto;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);

        width: 95%;
        height: 320px;
        padding: 18px;

        border-radius: 12px 12px 0 0;
    }
}

.results {
	font-weight: bold;
	font-size: 20px;
	margin-bottom: 30px;
 	text-align: center;
}

.hidden {
    display: none;
}

.species-card {
    display: flex;
    flex-direction: column;  
    align-items: center;  
    background: #ffffff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;    
    box-sizing: border-box;
    border: 1px solid #1E3A8A;	
}

.species-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.species-card img {
    width: 100%; 
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

.species-info {
    text-align: center;
}

.species-info a {
    font-weight: 600;
    font-size: 16px;
    color: #1e3a8a;
    text-decoration: none;
}

.species-info a:hover {
    color: #409FE3;
}

.range-view-tabs button {
    all: unset;      
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 1;
    padding: 12px 20px;

    background: white;
    color: #1e3a8a;

    font-weight: 600;
    text-align: center;

    border-radius: 8px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.range-view-tabs button.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;

    transform: none;
    box-shadow: none;
    pointer-events: none;
}

.range-view-tabs button:not(.active):hover {
    background: #ffffff;
    color: #1e3a8a;

    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.range-view-tabs {
    width: 100%;
    max-width: 1600px;
	width: 90%;
    margin: 20px auto 30px;
	margin-top: 0px;
    padding: 15px;

    background: #b3d6e3;
    border-radius: 10px;
    box-sizing: border-box;

    display: flex;
    justify-content: center; 
}

.view-tabs-inner {
    display: flex;
    gap: 10px;
    width: 100%;
}

.grid-view-inner {
    background: #edf3f5;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    box-sizing: border-box;

    max-width: 1600px;
    width: 90%;

    display: flex;
    flex-direction: column;
    gap: 20px;
	text-align: center;
}

.grid-view-tabs {
    width: 100%;
    max-width: 1600px;
    margin: 20px auto 30px;
    padding: 15px;
    background: #b3d6e3;
    border-radius: 10px;
    box-sizing: border-box;

    display: flex;
    gap: 10px;
}
.grid-view-tabs button {
    all: unset;
    box-sizing: border-box;

    flex: 1;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;

    background: white;
    color: #1e3a8a;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #d4e7ef;
    cursor: pointer;
    text-align: center;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.grid-view-tabs button.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}

.grid-view-tabs button:hover:not(.active) {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.species-credit {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
    text-align: center;
}

.grid-sub {
    font-size: 25px;
    font-weight: 600;
    color:  #1e3a8a;
    margin: 25px;
	margin-top: 5px;
	margin-bottom: 10px;
}

.grid-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #555;
}

.grid-placeholder h3 {
    margin-bottom: 8px;
    font-weight: 600;
}

.grid-cards {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #1E3A8A;	
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.grid-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.grid-card-text {
    padding: 12px;
    text-align: center;
}

.grid-card-text a {
    font-weight: 600;
    font-size: 16px;
    color: #1e3a8a;
    text-decoration: none;
}

.grid-card-text a:hover {
    color: #409FE3;
}

@media (max-width: 1200px) {
    .grid-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 800px) {
    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-cards {
        grid-template-columns: 1fr;
    }
}

.hidden {
    display: none !important;
}

.grid-view-tabs button.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
