/* Color Variables */
:root {
    --primary-color: #000000; /* #34495e;   Dark Blue */
    --secondary-color: #CFB991; /* #2c3e50;   Lighter Dark Blue */
    --accent-color: #daaa00; /* #95a5a6;   Light Gray */
    --background-color: #CFB991; /* #f4f4f9;  Off White */
    --text-color: #000000;  /* #333;  Dark Gray */
    --text-light-color: #555960; /* #7f8c8d;  Lighter Text Gray */
    --footer-text-color: black;  /* Footer Text Color */
    --footer-background-color: #c4bfc0; /* var(--primary-color);  Same as primary color */
    --hover-background-color: var(--secondary-color);  /* On hover for nav links */
    --box-shadow-color: rgba(0, 0, 0, 0.1);  /* Box shadow color */
}

/* General Styling */
body {
    /* font-family: Arial, sans-serif; */
    font-family: acumin-pro, "Franklin Gothic", sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}
/* Header Section */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0px 4px 10px var(--box-shadow-color);
    flex-wrap: wrap; /* Ensures content wraps for smaller screens */
}

/* Logo Styling */
.logo img {
    height: 2rem; /*auto; Adjust the size of the logo */
    width: auto; /*10rem; */
    margin: 0 0;
}

.logo a {
    text-decoration: none;
    display: block;
}

.logo {
    margin-right: 0.5rem; 
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    float: left;
}

/* Header Content */
.header-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.header-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}


header h1 {
    color: white;  /* Set title color to white */
    font-size: 2.5rem;  /* Increase font size */
    font-weight: bold;  /* Make font bold */
    margin: 0;  /* Remove margin */
    text-align: center;  /* Center align the title */
}

nav {
    margin: 0.5rem 0; /* Space between title and navigation */
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    border-width: 2px;
    border-style: solid;
    border-radius: 10px;
    border-color: var(--accent-color); 
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    padding: 0.5rem 1rem;
    display: flex; /* Flexbox for icon alignment */
    align-items: center; /* Center icon vertically */
}

nav ul li a:hover {
    background-color: var(--hover-background-color);
    border-radius: 10px;
}

/* Navigation Icon Styling */
.nav-icon {
    height: 30px; /* Adjust icon size */
    margin: 0 15px;
}


/* Main Content */
main {
    padding: 2rem;
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--box-shadow-color);
}

h1 {
    color: var(--accent-color);
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-style: italic;
}


/* Main image with family and genus links */
.image-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.image-links img {
	max-height: 20rem;

}

.image-meta {
    margin-top: 1rem;
}

.image-meta p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.image-meta a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.image-meta a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
}

/* Content Layout */
.content-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.content-sections {
    flex: 3;
}

.side-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.side-images img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--box-shadow-color);
}

.content-section {
    margin: 2rem 0;
    text-align: left;
}

.content-section h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light-color);
}

/* Footer */
footer {
    background-color: var(--footer-background-color);
    color: var(--footer-text-color);
    padding: 2rem 0;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.footer-container .sponsor img {
    height: 4rem;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.footer-container .sponsor img:hover {
    filter: none;
}


/* Container for the species gallery */
.species-gallery {
    display: flex;
    flex-wrap: wrap;   /* Ensures the items wrap if there's not enough space */
    justify-content: space-between; /* Adds space between the items */
}

/* Individual gallery item */
.gallery-item {
    flex: 1 1 calc(20% - 20px); /* Each gallery item takes 20% of the container width minus some space */
    box-sizing: border-box; /* Ensures padding and borders are included in the width */
    margin: 10px;           /* Adds some space around each item */
    text-align: center;      /* Center-aligns text within the item */
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 10px;
    /* max-height: 17rem; */
    transition: transform 0.3s ease; /* Adds a hover effect */
}

/* Image inside the gallery item */
.gallery-item img {
    width: 100%;            /* Ensures the image fits the gallery item's width */
    height: auto;           /* Keeps the image aspect ratio */
    /* max-height: 10rem; */
    border-radius: 8px;
}

/* Text below the image */
.gallery-item p {
    margin-top: 8px;
    font-size: 1.1em;
    color: #333;
}

/* Hover effect to scale up the gallery item slightly */
.gallery-item:hover {
    transform: scale(1.05);
}

/* Family section */
.family-section {
    margin-bottom: 40px; /* Adds spacing between family sections */
}

.family-section h2 {
    margin-bottom: 20px; /* Adds spacing between family name and gallery */
    font-size: 1.5em;
    color: #333;
}

/* Responsive behavior for smaller screens */
@media (max-width: 768px) {
    .gallery-item {
        flex: 1 1 calc(33.33% - 20px); /* Make gallery items fit three per row on smaller screens */
    }
    /* Stacking elements for smaller screens */
    header {
        flex-direction: column;
        padding: 1rem;
    }

    .logo {
        margin-bottom: 1rem;
        width: 6rem;
        justify-content: center;
        align-self: center; /* Center the logo above the title */
    }
    
    .logo img {
    margin: 0 0;
    }

    .header-container {
        flex-direction: column;
    }

    .header-content {
        align-items: center;
        text-align: center;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .content-layout {
        flex-direction: column;
        align-items: center;
    }

    .footer-container {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        flex: 1 1 100%; /* Make gallery items full width on very small screens */
    }
    header h1 {
        font-size: 1.5rem; /* Make the title smaller for small screens */
    }

    nav ul {
        gap: 0.5rem;
    }

    .logo img {
        height: 50px; /* Smaller logo size for mobile screens */
    }
}
