body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin-right: 1rem;
}

h2 {
    text-align: center;
}

nav button {
    padding: 0.5rem 1rem;
    border: none;
    background-color: #555;
    color: white;
    cursor: pointer;
    margin: 0 0.5rem;
}

nav button:hover {
    background-color: #777;
}

nav button.active {
    background-color: #007bff;
    color: white;
}

main {
    padding: 2rem;
}

#content-container {
    display: grid; /* Enable CSS Grid */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    grid-gap: 2rem; /* Spacing between grid items */
    position: relative; /*  Good practice */
}

.card {
    background-color: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0; /* Remove bottom margin */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.card p {
    margin-bottom: 0.5rem;
}

/* Style to make it even bigger*/
.card.images-zoom-in:not(:has(.image-grid)) img{
    width: 400px; /* Each image takes up full width of its cell */
    max-height: 400px;
    border: solid;
}

/*Override the card style when it does not have .image-grid, this forces the single image to be big*/
.card:not(:has(.image-grid)) img{
    display: block;
    margin: 0 auto;
    width: 100%; /* Each image takes up full width of its cell */
    height: auto;
    object-fit: cover; /* Fill the cell, may crop */
    border-radius: 5px; /* Optional: Rounded corners for images */
}

/* Override previous image style for single images*/
.card img {
    display: block;
    margin: 0 auto;

    width: 200px; /* Set a fixed width for all images */
    height: auto;   /* Maintain aspect ratio */

    object-fit: contain; /* This ensures the entire image is visible */
}

/* New styles for the image grid */
.card .image-grid {
    display: grid; /* Enable CSS Grid for images */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive image columns */
    grid-gap: 1rem; /* Spacing between images */
}

.card .image-grid img {
    width: 100%; /* Each image takes up full width of its cell */
    height: auto;
    object-fit: cover; /* Fill the cell, may crop */
    border-radius: 5px; /* Optional: Rounded corners for images */
}

.card .references-container {
    margin-top: 1rem;
}

.card .references-container strong {
    display: block;
    margin-bottom: 0.5rem;
}

.card .references-container ul {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0;
}

.card .references-container ul li {
    margin-bottom: 0.3rem;
}

.card .references-container ul li a {
    text-decoration: none;
    color: #007bff;
}

.card .references-container ul li a:hover {
    text-decoration: underline;
}

/* Search Input Styling */
#searchInput {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-left: 1rem;
    margin-right: 0.5rem;
    font-size: 1rem;
    flex: 1;
    max-width: 300px;
}

#searchInput:focus {
    outline: none;
    border-color: #555;
    box-shadow: 0 0 5px rgba(85, 85, 85, 0.5);
}
