/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f5f5f5;
}

/* Header Styles */
.header {
    background-image: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
    text-align: center;
    padding: 3em 1em;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 0.3em;
}

.header p {
    font-size: 1.2em;
    margin-bottom: 1.5em;
}

.header nav a {
    color: white;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: color 0.3s;
}

.header nav a:hover {
    color: #ffd700;
}

/* Container for Content */
.container {
    max-width: 80%; /* Increased width to take 80% of the page */
    margin: 2em auto;
    padding: 2em;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Form Heading */
.container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5em;
}

/* Blog Upload Form */
.blog-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1em;
    align-items: center;
}
/* Centering the Upload Form */
.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 2em auto;
    max-width: 600px; /* Restrict width to make it centered and tidy */
}

.upload-container h2 {
    margin-bottom: 1em;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1em; /* Space between elements */
    align-items: center;
    width: 100%;
}

.upload-form label {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5em;
}

.upload-form input[type="file"] {
    margin-bottom: 1em;
}

.upload-form button {
    background-color: #2575fc;
    color: #fff;
    padding: 0.6em 1.5em;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.upload-form button:hover {
    background-color: #1a5dc2;
}
/* Form Group (Label and Input Alignment) */
.form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    text-align: left;
    margin-bottom: 0.5em; /* Reduced spacing */
}

.form-group label {
    font-weight: bold;
    color: #333;
    margin-bottom: 0.2em; /* Tight space between label and input */
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 0.4em;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

/* Textarea Styling */
textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
}

/* Button Group Styling */
.button-group {
    display: flex;
    gap: 10px; /* Smaller gap between buttons */
    justify-content: center; /* Center buttons horizontally */
    align-items: center; /* Align buttons vertically */
    margin-top: 1em;
}

.btn-submit, .btn-clear {
    background-color: #2575fc;
    color: #fff;
    padding: 0.6em 1.2em;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    height: 45px; /* Uniform button height */
    width: 100px; /* Uniform button width */
    text-align: center;
}

.btn-clear {
    background-color: #f44336;
}

.btn-submit:hover {
    background-color: #1a5dc2;
}

.btn-clear:hover {
    background-color: #d32f2f;
}

/* Blog Full Content Box */
.blog-full {
    margin: 2em auto;
    padding: 1.5em;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 100%; /* Allows full width within container */
    overflow: hidden; /* Prevent text overflow */
}

.blog-full-image img {
    width: 100%;
    max-width: 100%;
    max-height: 300px; /* Restrict image height */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1em;
}

.blog-content {
    font-size: 1.1em;
    line-height: 1.6;
    text-align: justify;
    padding: 1em; /* Add padding around the content */
    max-height: 500px; /* Optional: Restrict max height for better layout */
    overflow-y: auto; /* Enable scroll if content exceeds max height */
    margin-bottom: 1em;
}

/* Back Link Styling */
.back-link {
    display: inline-block;
    margin-top: 1em;
    color: #2575fc;
    text-decoration: none;
    font-size: 1em;
}

.back-link:hover {
    text-decoration: underline;
}

/* Gallery Section */
#gallery h2 {
    font-size: 2em;
    text-align: center;
    margin-bottom: 1em;
    color: #333;
}

/* Gallery Grid Layout */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.gallery-item {
    width: 30%;
    min-width: 200px;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        max-width: 90%; /* Slightly narrower on smaller screens */
    }
    .gallery-item {
        width: 45%;
    }
    .button-group {
        flex-direction: column;
    }
    .btn-submit, .btn-clear {
        width: 100%;
    }
}

@media (max-width: 500px) {
    .container {
        max-width: 95%;
    }
    .gallery-item {
        width: 100%;
    }
    .blog-post {
        padding: 1em;
    }
}
