/* General Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0; /* Ensures no default browser padding */
    background-color: #fdfdf7; /* Very light cream/beige */
    color: #5c4033; /* Dark brown for text */
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    overflow: hidden; /* Clears floats within the container */
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background: #fdfdf7; /* Consistent with body background */
    color: #5c4033; /* Dark brown for header text */
    padding-top: 20px;
    min-height: 70px;
    border-bottom: #b08968 3px solid; /* Muted warm brown/beige for accent */
    text-align: center;
}

header h1 {
    margin: 0;
    padding-bottom: 10px;
}

header nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

header nav li {
    display: block; /* Stacks links on mobile */
    padding: 5px 0;
}

header nav a {
    color: #5c4033; /* Dark brown for links */
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
    padding: 5px 10px;
    transition: color 0.3s ease;
    white-space: nowrap;
}
/* Active and hover states for navigation links */
header nav a:hover,
header nav a.active {
    color: #b08968; /* Muted warm brown/beige for active/hover */
    font-weight: bold;
}

/* Main Content */
main {
    padding: 20px 0;
}

.welcome img {
    max-width: 100%;
    height: auto;
    margin-top: 20px;
    border-radius: 5px;
}

/* Footer */
footer {
    padding: 20px;
    margin-top: 20px;
    color: #fdfdf7; /* Light cream for footer text */
    background-color: #D8D3C7; /* Specified light gray/beige for footer background */
    text-align: center;
}

/* --- Portfolio Grid --- */
.portfolio-grid {
    display: grid;
    /* Creates a responsive grid that adjusts the number of columns */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.grid-item {
    position: relative;
    overflow: hidden; /* Hides parts of the image that go outside the container on zoom */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background: #fff;
    cursor: pointer;
}

.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.grid-item:hover img {
    transform: scale(1.1); /* Zoom effect on hover */
}

.grid-item-caption {
    padding: 15px;
    font-size: 0.9em;
    color: #5c4033;
    text-align: center;
}


/* Contact Form Styles */
.contact-form .form-group {
    margin-bottom: 15px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.contact-form button {
    padding: 10px 20px;
    border: none;
    background-color: #5c4033; /* Dark brown */
    color: white;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #7a5c4a; /* A slightly lighter brown for hover */
}


/* --- Lightbox Modal Styles --- */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.lightbox-close:hover {
    color: #b08968;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Mobile optimizations */
@media (max-width: 767px) {
    .lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
        padding: 10px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 85vh;
    }
}

/* Prevent body scroll when modal is open */
body.no-scroll {
    overflow: hidden;
}

/* --- Media Query for Larger Screens (Desktop) --- */
@media(min-width: 768px) {
    header {
        text-align: left;
    }

    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    header nav ul {
        display: flex;
    }

    header nav li {
        display: inline; /* Puts links side-by-side */
        padding: 0 10px;
    }
}
