/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #333333; /* Dark gray */
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
nav {
    background-color: #355E3B; /* Dark green */
    padding: 1rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}

nav a:hover {
    color: #cccccc;
}

/* Header */
header {
    background-color: #355E3B; /* Dark green */
    text-align: center;
    padding: 1.5rem;
}

header h1 {
    font-size: 2rem; /* Slightly smaller for mobile readiness */
}

/* Main Image */
.main-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

/* Content */
.content {
    max-width: 800px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    text-align: center;
    flex-grow: 1;
}

.content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Round Photo for About Page */
.about-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 1rem auto;
    display: block;
}

/* Reference Images */
.reference-images {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.reference-photo {
    width: 150px; /* Small size */
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.reference-photo:hover {
    transform: scale(1.05);
}

/* Full-Screen Overlay */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

#fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

/* Projects Section */
.projects {
    max-width: 800px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem; /* Reduced gap for mobile */
    margin-top: 1rem;
}

.project-item {
    text-decoration: none;
    color: #ffffff;
}

.project-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.project-item p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.project-item:hover p {
    color: #cccccc;
}

/* Project Photos (for project pages) */
.project-photos {
    margin-top: 1rem;
}

.project-photos img {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin: 0.5rem auto;
    display: block;
    border-radius: 8px;
}

/* Contact Button */
.contact-button {
    text-align: center;
    margin: 1.5rem 0;
}

.btn {
    display: inline-block;
    background-color: #355E3B;
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
}

.btn:hover {
    background-color: #4a7a4f;
}

/* Map Container */
.map-container {
    margin-top: 1.5rem;
    text-align: center;
}

.map-container h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.map-container iframe {
    width: 100%;
    max-width: 600px;
    height: 300px;
    border-radius: 8px;
}

/* Footer */
footer {
    background-color: #355E3B; /* Dark green */
    text-align: center;
    padding: 1rem;
    width: 100%;
}

/* Photo Credit */
.photo-credit {
    font-size: 0.6rem; /* Very small text */
    color: #cccccc; /* Light gray for subtlety */
    text-align: center;
    margin-top: 0.5rem; /* Space above the credit */
    margin-bottom: 1rem; /* Space below if more content follows */
}

/* Spacer Class for Space Between Sections */
.spacer {
    height: 2rem; /* Consistent gap between elements */
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Navigation */
    nav ul {
        flex-direction: column; /* Stack nav items vertically */
        gap: 1rem;
        padding: 0;
    }

    nav a {
        font-size: 1rem; /* Slightly smaller for mobile */
    }

    /* Header */
    header {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem; /* Smaller on mobile */
    }

    /* Content */
    .content {
        margin: 1rem auto;
    }

    .content h2 {
        font-size: 1.25rem;
    }

    .content p {
        font-size: 0.9rem;
    }

    /* About Photo */
    .about-photo {
        width: 150px; /* Smaller on mobile */
        height: 150px;
    }

    /* Reference Images */
    .reference-images {
        flex-direction: column; /* Stack vertically on small screens */
        align-items: center;
    }

    .reference-photo {
        width: 120px; /* Smaller on mobile */
    }

    /* Projects Section */
    .projects {
        margin: 1rem auto;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Smaller columns */
        gap: 0.75rem;
    }

    .project-item img {
        height: 120px; /* Reduced height for mobile */
    }

    .project-item p {
        font-size: 0.85rem;
    }

    /* Project Photos */
    .project-photos img {
        max-width: 100%; /* Full width on mobile */
    }

    /* Contact Button */
    .contact-button {
        margin: 1rem 0;
    }

    .btn {
        padding: 0.6rem 1.2rem; /* Slightly smaller button */
        font-size: 0.9rem;
    }

    /* Map Container */
    .map-container iframe {
        height: 250px; /* Reduced height for mobile */
    }
}

@media (max-width: 480px) {
    /* Further adjustments for very small screens */
    header h1 {
        font-size: 1.2rem;
    }

    .content h2 {
        font-size: 1.1rem;
    }

    .content p {
        font-size: 0.85rem;
    }

    .about-photo {
        width: 120px;
        height: 120px;
    }

    .reference-photo {
        width: 100px;
    }

    .project-grid {
        grid-template-columns: 1fr; /* Single column on tiny screens */
    }

    .project-item img {
        height: 100px;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .map-container iframe {
        height: 200px;
    }
}