/* General Page Styling */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #2d2d2d;
    color: #ffffff;
    text-align: center;
}

/* Page Wrapper for Main Content */
.page-wrapper {
    flex: 1;
}

/* Header Styling */
header {
    background-color: #444;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

header img {
    max-height: 100%;
    width: auto;
}

/* Footer Styling */
footer {
    background-color: #333;
    color: #ffffff;
    text-align: center;
    padding: 10px 0;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.2);
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* Paragraph Styling */
p {
    margin: 10px 0;
    line-height: 1.6;
}

/* Navigation Bar Styling */
nav {
    background-color: #333;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Style individual nav links */
nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 20px;
    font-size: 1.2em;
    padding: 5px 10px;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
    display: inline-block;
    font-family: Arial, sans-serif;
}

/* Hover effect for nav links */
nav a:hover {
    color: #55a5e7;
    background-color: rgba(85, 165, 231, 0.2);
}

/* Active menu item styling */
nav a.active {
    color: #55a5e7;
    border-bottom: 3px solid #55a5e7;
}

/* Page Content Styling */
.page-content {
    background-color: #444;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Centering and Styling for Page Titles */
.page-content h1 {
    font-size: 2em;
    margin: 10px 0;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    nav {
        flex-direction: column;
        padding: 10px;
    }
    nav a {
        margin: 10px 0;
    }
    .page-content {
        padding: 15px;
    }
}

/* Contact Form Styling */
.contact-form {
    max-width: 600px;
    margin: 20px auto;
    text-align: left;
}

/* Form Group Styling */
.form-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.form-group label {
    width: 100px;
    text-align: right;
    margin-right: 15px;
    padding-top: 5px;
    color: #ffffff;
}

.form-group input,
.form-group textarea {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #555;
    color: #ffffff;
    font-family: Arial, sans-serif;
}

.form-group input {
    height: 30px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Grid Container for Images */
.container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
}

.container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Grid for Smaller Screens */
@media (max-width: 600px) {
    .container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .container img {
        height: auto;
        max-height: 300px;
    }
}

/* Responsive Iframes */
.page-content iframe {
    width: 100%;
    max-width: 780px;
    height: auto;
    aspect-ratio: 16 / 9;
    display: block;
    margin: 0 auto;
}

/* Specific styling for Passed Away page iframe */
.passed-away-iframe {
    max-width: 960px; /* Wider than default for readability */
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* Maintain aspect ratio */
    display: block;
    margin: 0 auto;
}

/* Send Button Styling */
.contact-form button {
    display: block;
    margin: 20px auto 0;
    padding: 10px 20px;
    background-color: #55a5e7;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
}

.contact-form button:disabled {
    background-color: #a5a8aa;
    cursor: not-allowed;
}

.contact-form button:hover:not(:disabled) {
    background-color: #1a8be7;
}

/* Reset default ul styles and left-align within page-content */
.page-content ul {
    text-align: left !important;
    margin: 10px 0;
    padding-left: 20px;
    list-style-type: disc;
}

/* Ensure nested lists are also left-aligned */
.page-content ul ul {
    text-align: left !important;
    margin: 5px 0;
    padding-left: 20px;
    list-style-type: circle;
}

/* Style links within page-content */
.page-content a {
    color: #55a5e7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-content a:hover {
    color: #1a8be7;
}

/* Upload Form */
#dropZone {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin-top: 10px;
    transition: border-color 0.3s;
}

#dropZone.dragover {
    border-color: #55a5e7;
    background-color: #f0f8ff;
}

.upload-btn {
    background-color: #55a5e7;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin: 5px;
}

.upload-btn:hover {
    background-color: #1a8be7;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.gallery-grid a {
    display: block;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.gallery-grid a:hover {
    transform: scale(1.05);
}

.gallery-grid img {
    width: 100%;
    height: auto;
    display: block;
}

/* Image Header */
.image-header {
    margin-bottom: 20px;
}

.image-header h1 {
    margin: 0;
    text-align: center;
}

/* Nav Section */
.nav-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.nav-section button {
    background-color: #55a5e7;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-section button:hover:not(:disabled) {
    background-color: #1a8be7;
}

.nav-section button:disabled {
    background-color: #a5a8aa;
    cursor: not-allowed;
}

.nav-section a {
    color: #55a5e7;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-section a:hover {
    color: #1a8be7;
}

/* Image Container */
.image-container {
    text-align: center;
    margin: 20px 0;
}

.image-container img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

/* Mobile adjustments for gallery */
@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .nav-section button {
        padding: 8px 12px;
        font-size: 14px;
    }
    .nav-section a {
        font-size: 14px;
    }
}
