/* General Body and Font Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    line-height: 1.6;
}

/* Navigation Bar */
.nav-bar {
    text-align: center;
    padding: 10px 0;
    margin-bottom: 20px;
    background-color: #eee;
    border-bottom: 1px solid #ccc;
}

.nav-bar a {
    color: #00008b;
    text-decoration: none;
    font-weight: bold;
    padding: 0 5px;
}

.nav-bar a:hover {
    color: #0000ff;
}

.logout-form {
    display: inline;
}

.logout-button {
    background: none;
    border: none;
    font-size: 1em;
    font-weight: bold;
    color: #00008b;
    cursor: pointer;
    text-decoration: underline;
    padding: 0 5px;
}

.logout-button:hover {
    color: #0000ff;
    text-decoration: none;
}

/* Main Content Container */
.content {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: Georgia, serif;
    color: #00008b;
    border-bottom: 2px solid #00008b;
    padding-bottom: 5px;
    margin-top: 20px;
    margin-bottom: 15px;
}

/* Links */
a {
    color: #00008b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.8em;
    color: #666;
}

/* Styling for links that act as buttons */
.plain-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #00008b;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.plain-link:hover {
    background-color: #0000ff;
}

/* Form and button styling */
form p {
    margin-bottom: 15px;
}

form input, form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

button[type="submit"] {
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

button[type="submit"]:hover {
    background-color: #218838;
}


/* --- Global Image Fix to prevent overflow --- */
.content img {
    max-width: 50%;
    height: auto; /* Ensures aspect ratio is maintained */
}
/* ------------------------------------------- */

/* Gallery Grid Styling for the minimalist look */
.gallery-grid {
    display: grid;
    /* Create a responsive grid with 3 columns, minimum 250px wide each */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; /* Space between grid items */
    margin-top: 20px;
    text-align: center;
}

.gallery-item {
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}


.gallery-img {
    /* FIX: Prevents images from exceeding the container width */
    max-width: 40%;
    height: auto;
    display: block; /* Removes any extra space below the image */
    margin:10px 50px;
    padding:0px 30px;
    
}

.image-description {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 10px;
}

.gallery-actions a {
    color: #00008b;
    text-decoration: underline;
    padding: 05px;
}