body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background: #f9f9f9;
    text-align: center;
}

header h1 {
    margin-bottom: 20px;
    font-size: 32px;
	text-align: center;
}


body {
    font-family: 'Roboto', sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 0;
	padding-top: 0px;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
	min-height: 104px;
	height: auto;
    background: white;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    box-sizing: border-box;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-shrink: 0;       /* 👈 important on tablets */
}

.header-logo {
    height: 60px;
    width: auto;
    max-width: 100%;
    flex-shrink: 0;
}

.header-title {
    font-size: 24px;
    font-weight: 700;
    color: #062d6b;
    white-space: nowrap;
    line-height: 1.2;
}

.header-nav {
    display: flex;
    gap: 34px;
    align-items: center;
}
.header-nav a {
    color: #062d6b;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: transform 0.18s ease, color 0.18s ease;
    white-space: nowrap; 
}
.header-nav a:hover {
    transform: translateY(-3px);
    color: #69e0d1;
}

.header-spacer {
    background: red;
}

.hamburger {
    display: none;
    font-size: 30px;
    color: #062d6b;
    cursor: pointer;
    user-select: none;
}
.mobile-menu {
    position: absolute;  /* instead of fixed */
    top: 100%;           /* sits BELOW the header */
    left: 0;
    width: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
    box-sizing: border-box;
    padding: 0;
    z-index: 9999;
}

.mobile-menu.open {
    padding: 16px 0;
    max-height: 380px;
    pointer-events: auto;  /* clickable only when open */
}

.mobile-menu a {
    color: #062d6b;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 6px 12px;
}

.mobile-menu a:hover {
    color: #69e0d1;
}
/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .header-nav {
        display: none;   /* hide desktop links on mobile */
    }
    .hamburger {
        display: block;  /* show hamburger on mobile */
    }
    /* make header allow space for wrapped layout if needed */
    .site-header {
        padding: 16px 18px;
        align-items: center;
    }
}

/* HEADER SPACER: JS will set exact height; keep transition for smooth animation */
.header-spacer {
  width: 100%;
  height: 0;
  transition: height 0.32s ease;
}


.species-body,
.index-body,
.other-body,
.index-class {
	background: #193352;
}

/* TITLE */
.main-title {
    text-align: center;
	margin-bottom: 10px;
	margin-top: 130px;
    font-size: 40px;
    letter-spacing: 1px;
	color: white;
	
}
.sub-title {
	text-align: center;
	margin-top: 10px;
	margin-bottom: 50px;
	font-size: 25px;
	letter-spacing: 1px;
	color: white;

}
/*BACKGROUND IMAGE*/
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

.main-bg {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    position: relative; /* allows page-content to overlay hero */
    display: flex;
    flex-direction: column;
}

/* HERO BACKGROUND IMAGE */
.hero-bg {
    position: fixed; /* stays behind content */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/uma_mezzanotte/aa_background_1920.jpg');
    background-size: cover;
    background-position: center top;
    z-index: -1;       /* behind all content */
    pointer-events: none;
}

/* Responsive hero images */
@media (max-width: 1280px) {
    .hero-bg {
        background-image: url('images/uma_mezzanotte/aa_background_1280.jpg');
    }
}

@media (max-width: 768px) {
    .hero-bg {
        background-image: url('images/uma_mezzanotte/aa_background_768.jpg');
        background-position: center center;
    }
}

/* PAGE CONTENT sits above hero */
.page-content {
    flex: 1;
    padding-top: 10px;
    position: relative;
    z-index: 1;
}


/* FAMILY BUTTON ROW */
.family-row {
    display: flex;
    flex-wrap: wrap;        
    justify-content: center;
    gap: 10px;
	width: 90%;
    max-width: 900px;   
    margin: 0 auto;  
}

.family-box {
    flex: 1 1 calc(16.66% - 10px);
    min-width: 120px;  
    background: white;
    text-align: center;
    border-radius: 15px;
    padding: 10px;
    text-decoration: none;
    color: #1e3a8a;
    box-sizing: border-box;    
}

.family-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
/*SEARCH MAIN PAGE*/
.search-main {
    width: 90%;        
    max-width: 900px;   
    margin: 30px auto;
    background: auto;
    border-radius: 10px;

    display: flex;    
    flex-wrap: wrap;  
    gap: 10px;  

}
/* Input boxes */
.search-main input {
    flex: 1;    
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-weight: 600;
    color: #193352;
}

/* Placeholder text */
.search-main input::placeholder {
    color: #60b1d6;
    font-weight: 500;
}

/* Search button */
.search-main button {
    padding: 12px 20px;
    background: #89c0f0;
    color: #143ca3;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.search-main button:hover {
	transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* SEARCH BOX */
.search-container {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
	margin-bottom: 20px;
    padding: 15px;
    background: #b3d6e3;
    border-radius: 10px;
    box-sizing: border-box;

    display: flex;
    flex-wrap: wrap;
    gap: 10px;              
	
}
.search-container input {
    flex: 1;    
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-weight: 600;
    color: #083973;
	font-size: 15px;
}

.search-container button {
    padding: 12px 20px;
    background: white;
    color: #083973;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.search-container button:hover{
	transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.search-container input::placeholder {
    color: #78c1dc;
    font-weight: 500;
}

/* WESBITEB DESCRIPTION*/
.description {
    height: 60px;
}

/* FOOTER */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

/* Footer styling */
.site-footer {
    background: #193352;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between; /* pushes left and right to edges */
    align-items: center; /* vertically center links */
    gap: 20px;
}

.footer-left a,
.footer-right a {
    text-decoration: none;
    color: #b3d6e3;
    font-weight: 400;
    margin-right: 15px; /* spacing between links */
}

.footer-left a:last-child,
.footer-right a:last-child {
    margin-right: 0; /* remove margin after last link */
}

.footer-left a:hover,
.footer-right a:hover {
	color: #d9ebf1;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, 150px);
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

/* FAMILY BUTTON GRID */
.family-grid {
    display: grid;
    grid-template-columns: repeat(2, 200px); 
    gap: 15px;
    justify-content: center;
    margin: 20px 0 40px 0;
}

.family-btn {
    display: block;
    padding: 12px;
    background: #bcd4ff;
    border-radius: 15px;
    text-decoration: none;
    color: #003366;
    font-weight: bold;
    transition: 0.2s;
    border: 1px solid #7aa4e8;
}

footer {
    margin-top: 40px;
    padding: 20px;
    background: #ddd;
    display: flex;
    justify-content: space-between; 
    align-items: center;
}

.dis-title,
.other-title,
.species-title,
.family-title {
    font-size: 45px;
    font-weight: 600;
    margin: 25px;
	margin-top: 30px;
	margin-bottom: 10px;
}

.other-title,
.family-title {
    color: white;
}

.species-title {
    color: white;
	font-style: italic;
}
.species-subtitle {
    font-size: 25px;
    font-weight: 600;
    color:  white;
    margin: 25px;
	margin-top: 5px;
	margin-bottom: 10px;
}

/*BREADCRUMB (ORDER / FAMILy / GENUS)*/
.info-box {
    width: 90%;  
    max-width: 1600px;   
    margin: 20px auto;  
	margin-bottom: 5px;
    padding: 15px;
    background: #b3d6e3;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 22px;
    color: #1e3a8a;
    font-weight: 400;
	
    display: flex; 
    justify-content: space-between;
    align-items: center; 
}

.breadcrumb a {
    color: #1e3a8a;
    text-decoration: none;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.breadcrumb a:hover {
    color: #4689bc;
}

/*FAMILY*/

img {
	width: 100%;
}
/*SPECIES-GENERA-SIMILAR*/
.family-links-box {
    width: 90%;        
    max-width: 1600px;
    margin: 20px auto;
	margin-bottom: 30px;
    padding: 15px;
    background: #b3d6e3;
    border-radius: 10px;
    box-sizing: border-box;
}

.family-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.family-button {
    flex: 1;    
    padding: 12px 20px;
    background: white;
    color: #1e3a8a;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #d4e7ef;
    box-sizing: border-box;
}


.family-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
/*DESCRIPTION*/
.family-info {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 20px;
    background: #edf3f5; 
    border-radius: 10px;
    box-sizing: border-box;
}

.family-info p {
    color: #003366;   
    font-size: 18px;
    line-height: 1.6;
    text-align: left;
    margin: 0;
}

.image-row {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    gap: 20px;   
}

.image-box {
    flex: 1;           /* equal width */
    display: flex;
    align-items: stretch;
	height: 100%;;
}

.map-box {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
}

.species-map-box {
    width: 100%;
    height: 80vh;
    min-height: 550px;
    max-height: 1000px;
}

.image-box img {
    width: 100%; 
    height: 100%;      
    object-fit: cover; 
    border-radius: 12px;
    display: block;
}

/* Outer container: participates in flex layout */
.species-map {
    flex: 1;
    display: flex;
    align-items: stretch;
    height: 100%;
}

/* Inner Leaflet map: fills container */
#species-map {
    width: 100%;
    height: 100%;
    border-radius: 12px;

    /* IMPORTANT: clips Leaflet tiles to rounded corners */
    overflow: hidden;
}


/* GALLERY GRID */
.gallery {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* WRAPPER FOR EACH ITEM */
.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* TEXT ABOVE IMAGE */
.gallery-text {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #1e3a8a;
    text-decoration: none;
}

.gallery-text:hover {
    text-decoration: underline;
}

/* IMAGE STYLING */
.gallery-item img {
    width: 100%;
    border-radius: 10px;
    transition: 0.25s ease;
}

/* HOVER EFFECT */
.gallery-item img:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

/* IMAGE STYLING */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;  
    gap: 15px;     
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;        
    box-sizing: border-box;
}

.gallery-box {
    flex: 1 1 calc(33.333% - 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.gallery-box img {
    width: 100%;   
    height: auto;
    border-radius: 10px;
}

.gallery-link {
    margin-bottom: 10px;
    text-decoration: none;
    font-weight: 600;
    color: #003366;
    text-align: center;
    width: 100%;
}

/* MATCH INFO-BOX STYLE */
.species-top-box,
.similar-species-box,
.species-images-box {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 15px;
    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;
}

/* TOP SPLIT BOX (layout only, no visual styling now) */
.species-top-box {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
	margin-top: 10px;
}

/* LEFT DESCRIPTION */
.species-description {
    flex: 1 1 600px;
}
.species-description {
    text-align: left;
}

.species-description h2 {
    margin-top: 0;
    text-align: left;
}

.species-description h3 {
    margin-top: 16px;
    margin-bottom: 6px;
    font-size: 20px;
    color: #1e3a8a;
}

.species-description p {
    margin: 0;
    line-height: 1.6;
	text-align: left;
	margin-bottom: 27px;
}

/* RIGHT MAP */
.species-map {
    flex: 1 1 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.species-map img {
    width: 100%;
    max-width: 420px;
    border-radius: 10px;
    transition: 0.25s ease;
}

.species-map:hover img {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.species-images-box h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #1e3a8a;
}
/* Description: ~60% */
.species-description {
    flex: 2;
}

/* Map: ~40% */
.species-map {
    flex: 2;
    display: flex;
}

/*ABOUT ME*/
.about-me-box {  
    padding: 15px;             
    border-radius: 12px;
    max-width: 900px;     
    margin: 20px auto;      
    background-color: auto;
}

.about-me {
	font-size: 20px;
    font-weight: 100;
    color: #333;
	text-align: left;
	
}

/* Make GLightbox title + description left-aligned */
.glightbox-container .gslide-title,
.glightbox-container .gslide-desc {
    text-align: left !important;
}

.image-box img {
    transition: all 0.25s ease;
    border-radius: 8px;     /* optional — keeps edges smooth */
}

/* Hover effect */
.image-box:hover img {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
    position: absolute;
    background: white;
    border: 1px solid #b3d6e3;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 11000;
    max-height: 200px;
    overflow-y: auto;
    font-size: 16px;
    color: #1e3a8a;
 }

/* Individual items in dropdown */
.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hover effect for items */
.autocomplete-item:hover {
    background-color: #edf3f5;
    color: #1e3a8a;
}

/* Filter Bar Container */
.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;      /* Stay on one line */
    align-items: center;
    gap: 10px;
    position: relative;
}

/* Inputs (Family + Genus) */
.range-filter-container input {
    flex: 1;                /* Expand to fill available space */
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-weight: 600;
    color: #193352;
    font-size: 15px;
    min-width: 0;           /* Prevent overflow */

}

/* Placeholder style */
.range-filter-container input::placeholder {
    color: #78c1dc;
    font-weight: 200;
}

/* Buttons */
.range-filter-container button {
    padding: 12px 20px;
    background: white;
    color: #193352;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;    /* Prevent shrinking */
}

.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;
}

#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;
}

/* Default: right side overlay */
#results-overlay {
    position: absolute;
    top: 80px;
    right: 20px;

    width: 380px;      /* ⬅ wider */
    height: 420px;     /* ⬅ taller */

    background: #ffffff;
	color: 1e3a8a;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    padding: 20px;     /* ⬅ more breathing room */
    overflow-y: auto;
    z-index: 900;
}

/* Mobile / small screen */
@media (max-width: 768px) {
    #results-overlay {
        top: auto;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);

        width: 95%;
        height: 320px;  /* ⬅ taller on mobile */
        padding: 18px;

        border-radius: 12px 12px 0 0;
    }
}


.hidden {
    display: none;
}
/* Species card container */
.species-card {
    display: flex;
    flex-direction: column;       /* stack image on top, text below */
    align-items: center;          /* center everything horizontally */
    background: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;                  /* take full width of popup */
    box-sizing: border-box;
}

/* Hover effect */
.species-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Image */
.species-card img {
    width: 100%; 
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Species link text */
.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;
}

.map-header {
    position: relative;
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    text-align: center; 
}

.map-title {
    font-size: 40px; 
    color: #1e3a8a;
    font-family: 'Roboto', sans-serif;
    margin: 0;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ---------- Gallery (your rules, unchanged) ---------- */
.species-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .species-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .species-gallery {
        grid-template-columns: 1fr;
    }
}

.species-gallery .image-box {
    overflow: hidden;
    border-radius: 10px;
}

.species-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.species-gallery .image-box:hover img {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* ---------- Similar species extras ---------- */
.similar-header {
    margin-bottom: 6px;
}

.similar-diff p {
    font-weight: 500;
    font-size: 16px;
    color: #1e3a8a;
    margin-top: 6px;
}

/* ---------- Similar species card layout ---------- */
.similar-species {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Force image to stay centered in the card */

.similar-header {
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
}

.similar-header a {
    color: #1e3a8a;
    text-decoration: none;
}

.similar-header a:hover {
    text-decoration: underline;
}


/* Differences text BELOW image */
.similar-diff {
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 15px;
    color: #374151;
    text-align: center;
	font-weight: 400;
}

.similar-species .image-box,
.similar-species a {
    border-radius: 8px;
    overflow: hidden;

}

/* ---------- Top layout ---------- */
.species-top-box {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* ---------- Gallery cards ---------- */
.list-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .list-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .list-gallery {
        grid-template-columns: 1fr;
    }
}

/* ---------- Individual cards ---------- */
.list-item {
    background: #b3d6e3;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.list-item-header {
    background: white;
    border-radius: 8px;
    padding: 6px 8px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #d4e7ef;
}

/* Image box styling */
.list-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.list-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-item a:hover img {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
/* ---------- List wrapper ---------- */
.list-wrapper {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 15px;
    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;
}
.species-header-box {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    margin-top: 120px;
    padding: 15px;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;

    height: 140px;                 /* ← pick your value */
    display: flex;
    flex-direction: column;
    justify-content: center;       /* vertically center text */
}

.about-me-box {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;

    height: 140px;                 /* ← pick your value */
    display: flex;
    flex-direction: column;
    justify-content: center;       /* vertically center text */
}

.about-me {
	color: #1e3a8a;
	font-weight: 400;
	text-align: left;
}
/* ---------- List Wrapper ---------- */
.list-wrapper {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 15px;
    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;
}

/* ---------- Tab Panels ---------- */
.list-tab-panel {
    display: none;
}

.list-tab-panel.active {
    display: block;
}

/* ---------- Gallery Grid ---------- */
.list-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .list-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .list-gallery {
        grid-template-columns: 1fr;
    }
}

/* ---------- Individual Cards ---------- */
.list-item {
    background: white;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-sizing: border-box;
}

/* Card Header */
.list-item-header {
    background: white;
    border-radius: 8px;
    padding: 6px 8px;
    text-align: center;
    font-weight: 600;
}

/* Image Styling */
.list-item a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.list-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list-item a:hover img {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.list-item-header {
    border: none !important;
}
.list-of-genera-tabs .list-tab-btn {
    cursor: default;
}
.list-of-genera-tabs .list-tab-btn:hover {
    background: inherit;
}
/* Visual-only tab: completely non-interactive */
.is-static-tab {
    pointer-events: none;
}

/* ================================
   TAB CONTAINERS
================================ */
.species-tabs,
.list-of-genera-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;
}

/* ================================
   HARD RESET BUTTONS
   (THIS IS THE KEY PART)
================================ */
.species-tabs button,
.list-of-genera-tabs button {
    all: unset;                 /* nukes browser + theme styles */
    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;
    border: 1px solid #d4e7ef;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

/* ================================
   ACTIVE STATE
================================ */
.species-tabs button.active,
.list-of-genera-tabs button.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;

    transform: none;
    box-shadow: none;
    pointer-events: none;
}

/* ================================
   HOVER STATE
================================ */
.species-tabs button:not(.active):hover,
.list-of-genera-tabs button:not(.active):hover {
    background: #ffffff;
    color: #1e3a8a;

    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* ================================
   PANELS
================================ */
.tab-panel,
.list-tab-panel {
    display: none;
}

.tab-panel.active,
.list-tab-panel.active {
    display: block;
}

.header-home-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

/* Base link appearance (everywhere) */
a {
    color: #357dc5;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Hover / focus effect */
a:hover,
a:focus {
    color: #7abbe3;
    transform: translateY(-3px);
}

/* Prevent layout shift for inline links */
a {
    display: inline-block;
}

/* ================================
   DEVELOPMENT PAGE WRAPPER
================================ */

.development-outer {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto 40px;
    padding: 20px;
	margin-bottom: 10px;

    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;
}

/* ================================
   MAIN SPLIT LAYOUT
================================ */

.development-container {
    display: flex;
    gap: 20px;
}

/* LEFT / RIGHT COLUMNS */
.development-left {
    width: 40%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.development-right {
    width: 60%;
}

/* ================================
   SHARED INNER BOX STYLE
================================ */

.development-box {
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;
}

/* ================================
   UPDATE LOG
================================ */

.development-log {
    height: 520px;           /* controls scroll area */
    overflow-y: auto;
}

.development-log ul {
    list-style: none;
    padding: 0;
    margin: 0;
	text-align: left;
}

.development-log li {
    padding: 8px 0;
    font-size: 0.95rem;
}

/* ================================
   TABS (MATCHING YOUR TAB SYSTEM)
================================ */
.dev-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(6px, 1vw, 10px);

    background: #b3d6e3;
    padding: clamp(8px, 1.2vw, 10px);
    border-radius: 10px;

    box-sizing: border-box;
    overflow: hidden;
	margin-bottom: 20px;
}


.dev-tab {
    all: unset;
    box-sizing: border-box;

    flex: 1 1 calc(33.333% - 10px);
    min-width: 140px;
    max-width: 100%;

    /* PHYSICAL SCALING */
    font-size: clamp(0.8rem, 1.1vw, 1rem);
    padding: clamp(8px, 1.2vw, 12px) clamp(10px, 1.5vw, 20px);

    background: white;
    color: #1e3a8a;
    font-weight: 600;
    text-align: center;

    border-radius: clamp(6px, 1vw, 8px);
    border: 1px solid #d4e7ef;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

/* ACTIVE */
.dev-tab.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
    pointer-events: none;
}

/* HOVER */
.dev-tab:not(.active):hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* ================================
   TAB CONTENT
================================ */
/* ================================
   SPECIES LIST SCROLL LIMIT
================================ */

/* Tab content area */
.dev-tab-content {
    display: none;

    /* scrolling after ~10 lines */
    max-height: calc(10 * 1.6em);   /* 10 lines */
    overflow-y: auto;

    padding-right: 6px;             /* space for scrollbar */
    box-sizing: border-box;
}

.dev-tab-content.active {
    display: block;
}

/* List styling */
.dev-tab-content ul {
    margin: 0;
    padding-left: 20px;
}

.dev-tab-content li {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ================================
   CURRENT WORK (BULLET LIST)
================================ */

.development-current ul {
    padding-left: 20px;
    margin: 0;
	text-align: left;
}

.development-current li {
    padding: 6px 0;
    font-size: 0.95rem;
}

/* =====================
   UPDATE LOG SCROLLING
===================== */

.development-log {
    height: 520px;              /* adjust as needed */
    overflow-y: auto;
}

/* ================================
   PAGE PROGRESS BAR
================================ */

.progress-section {
    display: flex;
    justify-content: center;
    margin: 20px 0 30px;
}

.progress-bar-wrapper {
    width: 100%;
    height: 30px;

    background: white;
    border-radius: 10px;
    overflow: hidden;

    position: relative;
}

/* Filled portion */
.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: #B3D6E3;
    transition: width 0.6s ease;
}

/* Centered text */
.progress-bar-text {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 0.9rem;
    font-weight: 600;
    color: #1e3a8a;
    pointer-events: none;
}

.progress-outer {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto 40px;
    padding: 0px;
	margin-bottom: 10px;

    border-radius: 10px;
    box-sizing: border-box;

    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;
}

/* Flex layout: left description, right map */
.species-top-box {
    display: flex;
    flex-direction: row;
    gap: 20px;              /* space between text and map */
    align-items: flex-start; /* align top edges */
}

/* Left: ~60% width */
.species-description {
    flex: 3;                /* 3 parts out of 5 */
}

/* Right: ~40% width */
.species-map {
    flex: 2;                /* 2 parts out of 5 */
    display: flex;
    flex-direction: column; /* stack map and range sources */
}

/* Inner map: fills available width but fixed height */
#species-map {
    width: 100%;
    height: 500px;           /* adjust as needed */
    border-radius: 12px;
    overflow: hidden;
}

/* Range sources below map */
.range-data-sources {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
	margin-bottom: 0px;
    padding: 15px;
    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 15px;
    color: #1e3a8a;
    font-weight: 400;
	text-align: center;
}
/* Info box under map on genus page */
.genus-range-box {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
	margin-bottom: 0px;
    padding: 15px;
    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 15px;
    color: #1e3a8a;
    font-weight: 400;
	text-align: center;
}

/* GRID LAYOUT */
#disambiguation-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;

    width: 90%;
    max-width: 1600px;
    margin: 0 auto 40px;
}

/* STACK ON SMALL SCREENS */
@media (max-width: 900px) {
    #disambiguation-list {
        grid-template-columns: 1fr;
    }
}

/* CARD */
.disambiguation-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;

    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* HEADER */
.disambiguation-header {
    text-align: center;
    margin-bottom: 12px;
}

.disambiguation-header a {
    text-decoration: none;
    color: #1e3a8a;
    font-size: 20px;
    font-weight: 600;
}

.disambiguation-header em {
    font-weight: 400;
}

/* IMAGE */
.disambiguation-card img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.disambiguation-box {
	width: 90%;
    max-width: 1600px;
    margin: 20px auto;
	margin-top: 100px;
    padding: 15px;
    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;
}

/* =========================
   CARD HEADERS (GLOBAL FIX)
   ========================= */

.list-item-header,
.similar-header {
    width: 100%;
    padding: 10px 12px;
    text-align: center;
    box-sizing: border-box;
}

/* Links inside card headers */
.list-item-header a,
.similar-header a {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* Species names */
.list-item-header strong,
.similar-header strong {
    display: block;
    font-style: italic;      /* consistent with species pages */
    font-weight: 600;

    /* 🔑 prevents overflow */
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;

    line-height: 1.3;
}

.dis-title {
    color: #1e3a8a;
}

/* ================================
   TOP RANGE VIEW TABS (Map / Grid)
================================ */
.range-view-tabs button {
    all: unset;                /* reset */
    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;
    border: 1px solid #d4e7ef;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

/* ================================
   ACTIVE STATE
================================ */
.range-view-tabs button.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;

    transform: none;
    box-shadow: none;
    pointer-events: none;
}

/* ================================
   HOVER STATE
================================ */
.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);
}

/* ================================
   CONTAINER / OUTER BOX
================================ */
.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; /* center the inner buttons */
}

.view-tabs-inner {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* ================================
   GRID VIEW OUTER BOX
================================ */
.grid-view-inner {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    box-sizing: border-box;

    max-width: 1600px;
    width: 90%;

    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* ================================
   GRID VIEW TOP OPTIONS BOX
================================ */
.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 VIEW CARD LAYOUT
   =============================== */

.grid-cards {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Card */
.grid-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    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);
}

/* Image */
.grid-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* Text */
.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;
}

/* ===============================
   RESPONSIVE BREAKPOINTS
   =============================== */

@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;
}

body {
    padding-top: var(--header-height, 0px);
}

.species-body,
.index-body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.index-class {
	margin-top: 0px;
}

.other-title {
	margin-top: 70px;
}

.material-symbols-outlined {
  font-size: 20px;
  color: inherit;   /* 🔑 this is the important bit */
  user-select: none;
}

.other-container {
	margin-top: 50px;
}

.autocomplete-item.active {
    background-color: #edf3f5;
    color: #1e3a8a;
}

/* =========================
   IMAGE CARDS
========================= */
.contributor-image-card{
    display:flex;
    flex-direction:column;
    align-items:center;
    width:100%;
    padding:12px;
    margin-bottom:12px;
    background:#fff;
    border:1px solid #d0d7de;
    border-radius:10px;
    box-sizing:border-box;
    box-shadow:0 2px 6px rgba(0,0,0,.08);
    transition:transform .2s,box-shadow .2s;
}

.contributor-image-card img{
    width:100%;
    height:auto;
    margin-bottom:10px;
    border-radius:6px;
}

/* =========================
   OUTER LAYOUT
========================= */
.contributors-outer{
    width:90%;
    max-width:1600px;
    margin:20px auto;
}
.contributors-layout{
    display:flex;
    gap:20px;
    height:70vh; /* KEY: caps both columns */
}

/* =========================
   LEFT: TABS
========================= */
.contributors-tabs{
    width:25%;
    padding:15px;
    background:#edf3f5;
    border-radius:10px;
    box-sizing:border-box;
    font-size:20px;
    color:#1e3a8a;

    display:flex;
    flex-direction:column;
    gap:10px;

    overflow-y:auto; /* INTERNAL SCROLL */
}

/* tab buttons */
.contributor-tabs button{
    all:unset;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:12px 20px;
    background:#fff;
    color:#1e3a8a;
    font-weight:600;
    text-align:center;
    border:1px solid #d4e7ef;
    border-radius:8px;
    cursor:pointer;
    transition:transform .2s,box-shadow .2s,background .2s,color .2s;
}
.contributor-tabs button.active{
    background:#1e3a8a;
    color:#fff;
    border-color:#1e3a8a;
    pointer-events:none;
}
.contributor-tabs button:not(.active):hover{
    transform:translateY(-3px);
    box-shadow:0 4px 10px rgba(0,0,0,.25);
}

/* =========================
   RIGHT: PROFILE
========================= */
.contributors-content{
    width:75%;
    padding:15px;
    background:#edf3f5;
    border-radius:10px;
    box-sizing:border-box;
    font-size:20px;
    color:#1e3a8a;
    overflow:hidden; /* contains internal scroll */
}

/* profile visibility */
.contributor-profile{
    display:none;
    height:100%;
}
.contributor-profile.active{
    display:flex;
    flex-direction:column;
}

/* =========================
   IMAGE GRID (SCROLL AREA)
========================= */
.contributor-image-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    flex:1;              /* fills remaining height */
    overflow-y:auto;     /* INTERNAL SCROLL */
    padding-right:5px;
	align-content:start;
    align-items:start;
    grid-auto-rows:auto;
}

.contributor-header{
    display:flex;
    gap:12px;
    margin-bottom:16px;
    align-items:stretch;
}

.contributor-meta-box{
    flex:1;                 /* ← FORCE equal width */
    min-width:0;            /* ← prevents overflow stretching */

    background:#fff;
    border:1px solid #d0d7de;
    border-radius:8px;
    padding:10px 14px;
    box-sizing:border-box;

    font-weight:600;
    color:#1e3a8a;
    font-size:18px;

    display:flex;
    align-items:center;
    justify-content:center; /* visually balanced */
    text-align:center;

    white-space:nowrap;     /* prevent height differences */
    overflow:hidden;
    text-overflow:ellipsis; /* long names don't resize box */
}

/* links inside boxes */
.contributor-meta-box a{
    color:#1e3a8a;
    text-decoration:none;
}

.contributor-meta-box a:hover{
    text-decoration:underline;
}

.contributors-intro{
    display:none;
    height:100%;
}

.contributors-intro.active{
    display:flex;
    flex-direction:column;
    justify-content:flex-start; /* TOP */
    text-align:left;
	padding-top: 20px;
    font-size:22px;
    color:#1e3a8a;
}

.contact-box {
    width: 90%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 15px;
    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: 20px;
    color: #1e3a8a;
    font-weight: 400;
}

.contact {
	color: #1e3a8a;
	font-weight: 400;
	text-align: left;
}

.references-box {
    width: 90%;
    max-width: 1600px; /* slightly smaller for better readability */
    margin: 20px auto;
    padding: 15px;

    background: #edf3f5;
    border-radius: 10px;
    box-sizing: border-box;

    font-size: clamp(16px, 2vw, 20px); /* responsive font size */
    color: #1e3a8a;
    font-weight: 400;
    text-align: left;

    overflow-wrap: break-word; /* ensures long URLs or text break */
    word-break: break-word; /* helps with very long words */
}

.reference-species {
	margin-bottom: 30px;
}

.reference-list, .reference-sublist {
    padding-left: 1.5em; /* keep indentation but not too much */
    margin: 0.5em 0;
}

.reference-sublist {
	font-size: 17px;
}

.reference-sublist li a {
    word-break: break-all; /* breaks long URLs */
}

.ref-link {
    color: #1e3a8a;
    text-decoration: none;
}

.collapsible-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.collapsible-content {
    max-height: 1000px; /* initial expanded height */
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-header.collapsed + .collapsible-content {
    max-height: 0;
}

.arrow {
    font-size: 0.8em;
    margin-left: 0.5em;
    transition: transform 0.3s ease;
}

.collapsible-header.collapsed .arrow {
    transform: rotate(-90deg);
}

.contributor-image-species{
    margin-top:8px;
    font-size:16px;
    font-weight:500;
    text-align:center;
}

.contributor-image-species a{
    color:#1e3a8a;
    text-decoration:none;
}

.contributor-image-species a:hover{
    text-decoration:underline;
}

@media (max-width: 770px) {
    #results-overlay {
        display: none !important;
    }
}

a.disabled-link {
    cursor: not-allowed;
}

a.disabled-link:hover {
    text-decoration: none;
    transform: none;
    color: #1e3a8a;
    cursor: not-allowed;
}
