/* General Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.8; /* Adjust line height for better readability */
    margin: 0;
    padding: 0;
    color: #333; /* Neutral text color */
    background-color: #f9f9f9; /* Light background */
    font-size: 18px; /* Base font size */
}

header {
    text-align: center;
    padding: 2.5rem 1rem;
    background-color: #170e78; /* Theme color */
    color: white;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
}

header p {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* Navigation Bar */
nav {
    text-align: center;
    margin: 1.5rem 0;
}

nav a {
    text-decoration: none;
    color: #170e78; /* Theme color for links */
    margin: 0 1.5rem; /* Spacing between links */
    font-weight: bold;
    font-size: 1.2rem; /* Larger link text */
}

nav a:hover {
    text-decoration: underline;
}

/* Main Container */
main {
    width: 70%; /* Main container width */
    max-width: 1200px; /* Restrict maximum width */
    margin: 2rem auto; /* Center main content */
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

h2 {
    color: #170e78; /* Theme color */
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #170e78;
    padding-bottom: 0.5rem;
}

h3 {
    color: #170e78;
    font-size: 1.8rem;
    margin-top: 1.5rem;
    font-weight: bold;
}

p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

ul, ol {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* General Grid Styling */
.grid-container {
    display: grid;
    gap: 2rem; /* Space between items */
    justify-items: center; /* Center items horizontally */
    align-items: start; /* Align items at the top */
    margin: 2rem 0;
}

.grid-item {
    text-align: center;
    width: 100%; /* Allow images to scale within the grid */
}

.grid-item img {
    width: auto; /* Maintain the original aspect ratio */
    max-width: 100%; /* Ensure images fit within their containers */
    height: auto; /* Scale height proportionally */
    border-radius: 8px; /* Optional: Rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for polish */
}

.grid-item .label {
    margin-top: 1rem; /* Space between image and label */
    font-size: 1.1rem; /* Label font size */
    font-weight: bold;
    color: #333; /* Neutral text color */
}

/* Specific Grid Layouts */
.grid-2-columns {
    grid-template-columns: repeat(2, 1fr); /* Two columns */
}

.grid-3-columns {
    grid-template-columns: repeat(3, 1fr); /* Three columns */
}

.grid-4-columns {
    grid-template-columns: repeat(4, 1fr); /* Four columns */
}

.label {
    margin-top: 0.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    justify-content: center; /* Centers the chart */
    margin: 1.5rem 0;
    overflow: hidden; /* Ensures no overflow */
}

.bar-chart img {
    width: 100%; /* Makes the image responsive */
    max-width: 800px; /* Restricts maximum width */
    height: auto; /* Maintains aspect ratio */
    border-radius: 8px; /* Adds rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Adds shadow for polish */
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.results-table th,
.results-table td {
    border: 1px solid #333;
    padding: 1rem;
    text-align: center;
    font-size: 1.3rem;
}

.results-table th {
    background-color: #170e78;
    color: white;
    font-size: 1.4rem;
    font-weight: bold;
}

.results-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

.results-table tr:hover {
    background-color: #e0e7ff; /* Light blue for hover effect */
}

/* Footer */
footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem 0;
    background: #170e78; /* Theme color */
    color: white;
    font-size: 1rem; /* Footer text size */
}

footer a {
    color: white;
    text-decoration: underline;
}

.figure-container {
    display: flex;
    justify-content: center; /* Center the figure */
    align-items: center;
    flex-direction: column; /* Stack the figure and caption */
    margin: 2rem auto; /* Add vertical spacing */
    max-width: 100%; /* Allow the container to span the full width if needed */
    text-align: center; /* Center-align the caption text */
}

.figure-container img {
    width: 90%; /* Adjust the width to make the image larger */
    max-width: 1200px; /* Restrict the maximum width */
    height: auto; /* Maintain the aspect ratio */
    border-radius: 8px; /* Optional: Rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for polish */
}

.figure-container .figure-caption {
    margin-top: 1rem; /* Space between the image and caption */
    font-size: 1.2rem; /* Caption font size */
    font-weight: bold;
    color: #333; /* Neutral text color */
}

/* Individual Figure Styling */
.figure-item {
    width: 100%; /* Take full width of the container */
    max-width: 800px; /* Restrict max width for readability */
    margin: 1rem 0; /* Add spacing between figures */
}

.figure-item img {
    max-width: 100%; /* Responsive scaling */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px; /* Optional: Rounded corners for a polished look */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
    margin-bottom: 1rem; /* Space below the image */
}

/* Caption Styling (Optional) */
.figure-item p {
    font-size: 1.1rem; /* Slightly smaller font size */
    color: #555; /* Neutral color for captions */
    margin-top: 0.5rem;
}

.references {
    list-style-type: none; /* Removes numbering or bullets */
    padding-left: 0; /* Aligns text to the left */
}

.references li {
    margin-bottom: 1rem; /* Adds spacing between references */
    font-size: 1.2rem; /* Adjust the font size if necessary */
}

/* Specific Grid Styling for the Example Images */
.example-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Four columns */
    gap: 2rem; /* Space between items */
    justify-content: center; /* Center the grid content horizontally */
    align-items: center; /* Center items vertically */
    margin: 2rem auto; /* Add vertical spacing and center the grid on the page */
    max-width: 80%; /* Restrict the container width */
    padding: 0; /* Remove any extra padding */
    text-align: center; /* Center the text inside grid items */
}

.example-grid .grid-item {
    text-align: center;
}

.example-grid .grid-item img {
    display: block; /* Ensure images are treated as block-level elements */
    margin: 0 auto; /* Center the image horizontally */
    max-width: 100%; /* Ensure images fit within their containers */
    height: auto; /* Maintain aspect ratio */
    border-radius: 8px; /* Rounded corners for the images */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for polish */
}

.example-grid .grid-item .label {
    margin-top: 0.5rem; /* Space between the image and label */
    font-size: 1.2rem; /* Slightly larger label font size */
    font-weight: bold;
    color: #333; /* Neutral text color */
}

.large-image img {
    width: 100%; /* Allow the image to fill its container */
    max-width: 1600px; /* Set a larger maximum width */
    height: auto; /* Maintain aspect ratio */
    margin: 0 auto; /* Center the image */
    border-radius: 8px; /* Optional: Rounded corners */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Emphasized shadow */
}

.large-image .figure-caption {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.2rem; /* Slightly larger font size for caption */
    color: #555; /* Neutral color for the caption text */
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 16px; /* Adjust font size for smaller screens */
    }

    main {
        width: 95%; /* Adjust main container width */
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem; /* Adjust header title size */
    }

    header p {
        font-size: 1rem; /* Adjust header subtitle size */
    }

    .grid-container {
        grid-template-columns: repeat(2, 1fr); /* Adjust grid to 2 columns */
        gap: 1.5rem; /* Reduced gap for smaller screens */
    }

    .grid-item img {
        width: 120px;
        height: 120px;
    }

    .label {
        font-size: 1rem;
    }
    .figure-item img {
        max-width: 100%; /* Full width on small screens */
        margin: 0 auto; /* Center the image */
    }

    .figure-container {
        padding: 0 1rem; /* Add padding for mobile devices */
    }

    .example-grid {
        grid-template-columns: repeat(2, 1fr); /* Adjust to 2 columns on smaller screens */
        gap: 1rem; /* Reduce gaps for smaller screens */
    }
    .example-grid .grid-item {
        width: 150px; /* Adjust width for smaller screens */
    }
    .example-grid .grid-item img {
        border-radius: 6px; /* Slightly smaller rounding for smaller images */
    }
    .example-grid .grid-item .label {
        font-size: 1.1rem; /* Reduce label font size slightly */
    }
}
