/* ===========================
   General Body and Page Styling
   =========================== */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 20px;
    background-color: #fafafa;
    color: #333;
}

/* ===========================
   Header and Navigation Styling
   =========================== */
header nav {
    background-color: #0055aa;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-right: 15px;
    font-weight: bold;
}

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

/* Navigation bar with 3 evenly spaced buttons at the top */
nav {
    display: flex;
    justify-content: space-around; /* evenly spaced */
    background-color: #004080; /* dark blue background */
    padding: 15px 0;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: bold;
}

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

/* ===========================
   Footer Styling
   =========================== */
footer {
    margin-top: 50px;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    font-size: 0.9em;
    color: #666;
}

/* ===========================
   Home Page Layout (index.html)
   =========================== */
.main-flex {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.main-flex .left {
    flex: 1;
}

.main-flex .right {
    flex: 2;
}

.main-flex img {
    max-width: 100%;
    height: auto;
}

/* Top third blue section with image and intro text */
.top-section {
    display: flex;
    background-color: #0073e6; /* lighter blue */
    height: 33vh; /* about one third viewport height */
    padding: 20px 40px;
    box-sizing: border-box;
}

.left-image {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 20px;
}

.left-image img {
    max-height: 100%;
    max-width: 90%;
    object-fit: contain;
}

.intro-text {
    flex: 2;
    color: white;
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Bottom two-thirds white background */
.bottom-section {
    display: flex;
    background-color: white;
    height: 67vh; /* rest of the screen */
    padding: 20px 40px;
    box-sizing: border-box;
}

.latest-project-info {
    margin-left: 30px;
    flex: 2;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.latest-project-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.latest-project-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}


/* ===========================
   Project List Page Styling
   =========================== */

/* Form styling for search and filters */
form {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.search-form input[type="text"] {
    flex: 1 1 250px;
    padding: 6px;
    font-size: 1em;
    min-width: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.checkbox-group {
    flex: 1 1 200px;
}

.checkbox-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 8px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.checkbox-list label {
    display: block;
    margin-bottom: 5px;
    cursor: pointer;
    user-select: none;
}

form select {
    padding: 5px 8px;
    font-size: 1em;
    min-width: 150px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

form button {
    padding: 8px 16px;
    background-color: #0055aa;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 22px;
}

form button:hover {
    background-color: #003f7f;
}

/* Project list items */
.project-list {
    list-style: none;
    padding: 0;
}

.project-item {
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.project-thumbnail {
    width: 100px;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

/* ===========================
   Project Detail Page Styling
   =========================== */
.project-image {
    max-width: 600px;
    height: auto;
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #0055aa;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

/* ===========================
   Techniques Page Styling
   =========================== */
.tech-section {
    margin-bottom: 30px;
}

.tech-section h2 {
    color: #004488;
    border-bottom: 2px solid #004488;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.tech-section ul {
    list-style-type: disc;
    margin-left: 20px;
}

/* ===========================
   Utility Classes
   =========================== */
.text-center {
    text-align: center;
}
