/* --- Global Styles --- */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #eaeaea; 
    margin: 0;
    padding: 40px 20px;
    box-sizing: border-box;
    background-color: #121212; 
}

/* --- Premium Header --- */
.main-header {
    margin-bottom: 40px;
    padding-top: 20px;
    max-width: 1400px; /* Aligns perfectly with your gallery edges */
    margin-left: auto;
    margin-right: auto;
}

.header-content {
    display: flex;
    flex-direction: row; /* Places items side-by-side */
    justify-content: space-between; /* Pushes branding left and button right */
    align-items: center;
    position: relative;
}

.branding {
    text-align: left; /* Aligns your title and tagline to the left */
}

.branding h1 {
    font-size: 2.2rem; /* Slightly smaller to fit nicely side-by-side */
    font-weight: 300; 
    margin: 0 0 5px 0;
    letter-spacing: 2px; 
    text-transform: uppercase;
}

.branding h1 strong {
    font-weight: 800; 
}

.tagline {
    font-size: 0.95rem;
    color: #aaa; 
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Call to Action Button */
.header-cta {
    display: inline-block;
    padding: 10px 24px;
    background-color: #eaeaea;
    color: #111;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.header-cta:hover {
    background-color: #fff;
    transform: translateY(-2px); 
}

.mobile-menu-icon {
    display: none; 
    font-size: 1.8rem;
    cursor: pointer;
    color: #eaeaea;
    position: absolute;
    left: 0;
    top: 5px;
}

/* --- Navigation / Filters --- */
.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filters .filter-btn {
    background-color: transparent;
    color: #666; /* Greyed out text */
    border: 1px solid #333; /* Dark grey border */
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 30px; /* Modern pill shape */
    cursor: pointer;
    transition: all 0.3s ease;
}

.filters .filter-btn:hover {
    background-color: #222;
    color: #ccc;
}

/* When the button is clicked/active */
.filters .filter-btn.active {
    background-color: #eaeaea; 
    color: #111;
    border-color: #eaeaea;
}

/* Hides images that don't match the active filters */
.gallery-item.hidden {
    display: none !important;
}

/* --- Dense Grid Gallery (Desktop) --- */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-auto-rows: 250px; 
    grid-auto-flow: dense; 
    gap: 15px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.gallery-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.03); 
}

/* Default behavior (Saves heads in group shots) */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center 15%; 
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* Override 1: Forces a perfectly centered crop */
.gallery-item.crop-center img {
    object-position: center;
}

/* Override 2: Forces a bottom-heavy crop (Good for wide landscapes) */
.gallery-item.crop-bottom img {
    object-position: bottom;
}

/* --- Priority Override --- */
.gallery-item.priority-first {
    order: -1; 
}

/* --- Grid Variation Classes --- */
.gallery-item.wide { grid-column: span 2; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item.large { grid-column: span 2; grid-row: span 2; }
.gallery-item.small { grid-column: span 1; grid-row: span 1; }

/* --- Contact Section --- */
.contact-section {
    max-width: 1400px; /* Matches the gallery width */
    width: 100%; /* Ensures it stretches out to the edges */
    margin: 60px auto 20px auto;
    padding-top: 40px;
    border-top: 1px solid #333; 
}

.contact-section h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-transform: uppercase;
}

/* Flexbox container to place them side-by-side */
.contact-container {
    display: flex;
    gap: 60px;
    justify-content: space-between;
}

.contact-form {
    flex: 1; /* Takes up exactly half the space */
    display: flex;
    flex-direction: column;
    gap: 24px; 
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #eaeaea;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #444; 
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #1e1e1e; 
    color: #eaeaea;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #eaeaea; 
}

.submit-btn {
    padding: 14px 24px;
    background-color: #eaeaea; 
    color: #111; 
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: flex-start; 
}

.submit-btn:hover {
    background-color: #ccc;
}

/* --- Direct Contact Info Card --- */
.contact-info {
    flex: 1; /* Takes up exactly half the space */
    background-color: #181818; /* Slightly lighter than the background to make it pop */
    padding: 30px 40px;
    border-radius: 8px;
    border: 1px solid #333;
    height: fit-content; /* Prevents the card from stretching vertically if the form is long */
}

.contact-info h3 {
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-info p {
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.contact-details p {
    color: #eaeaea;
    margin-bottom: 12px;
    font-size: 1rem;
}

.contact-details strong {
    color: #fff;
    margin-right: 8px;
}

/* --- Lightbox Modal --- */
.lightbox {
    display: none; 
    position: fixed;
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95); 
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    object-fit: contain; 
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
}

.close-lightbox:hover {
    color: #aaa;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 1001; 
    transition: background-color 0.3s ease;
    border-radius: 4px;
}

.lightbox-arrow:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.left-arrow { left: 20px; }
.right-arrow { right: 20px; }

/* --- Mobile View Adjustments --- */
@media (max-width: 768px) {
    
    /* Keep header side-by-side on mobile */
    .header-content {
        flex-direction: row; 
        justify-content: space-between;
        padding: 10px 0 20px 0;
        border-bottom: 1px solid #333; 
        margin-bottom: 20px;
    }

    .branding {
        text-align: left; 
    }

    /* Shrink logo slightly to fit next to the button */
    .branding h1 {
        font-size: 1.2rem;
    }

    /* Shrink the contact button slightly */
    .header-cta {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    /* Bring the filter buttons back! */
    .filters {
        display: flex; 
        gap: 8px;
        margin-bottom: 25px;
    }

    /* Make filter buttons smaller so they fit side-by-side */
    .filters .filter-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* Dense Grid mobile adjustments */
    .gallery {
        grid-template-columns: repeat(2, 1fr); 
        grid-auto-rows: 150px; 
        gap: 8px; 
    }

    /* Force wide and large items to span fully on small screens */
    .gallery-item.wide, 
    .gallery-item.large {
        grid-column: span 2; 
    }

    .submit-btn {
        align-self: stretch; 
    }

    /* Stack the contact section columns on mobile */
    .contact-container {
        flex-direction: column; 
        gap: 40px;
    }
    
    .contact-info {
        padding: 25px; 
    }
}

@media (max-width: 600px) {
    .lightbox-arrow {
        padding: 10px 15px;
        font-size: 1.5rem;
    }
}