﻿/* -------------------------------------------------
   RECENT PROJECTS
   ------------------------------------------------- */

.projects-section {
    padding: 64px 0 80px;
    background: #f9f9f9;
}

.projects-container {
    max-width: 1100px;
}

.projects-intro {
    margin-bottom: 40px;
    text-align: center;
}

.projects-heading {
    margin: 0;
    font-family: "Outfit", "Inter", Arial, sans-serif;
    font-size: 2.8rem;
    font-weight: 600;
    line-height: 1.2;
}

.projects-subheading {
    max-width: 720px;
    margin: 12px auto 0;
    font-size: 1.05rem;
}

.projects-status {
    margin: 0 0 24px;
    text-align: center;
    color: #666666;
}

.project-card {
    margin-bottom: 30px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.project-card:last-child {
    margin-bottom: 0;
}

.project-title {
    margin: 0;
    font-family: "Outfit", "Inter", Arial, sans-serif;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.25;
}

.project-tap-note {
    margin: 5px 0 0;
    color: #666666;
    font-size: 0.9rem;
}

.project-description {
    max-width: 900px;
    margin: 20px 0 28px;
    font-size: 1.05rem;
}

.project-photo-group-title {
    margin: 28px 0 10px;
    font-size: 1rem;
    font-weight: 600;
}

.project-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.project-photos.single {
    grid-template-columns: minmax(
        0,
        calc((100% - 28px) / 3)
    );
    justify-content: center;
}

.project-photos.two {
    grid-template-columns: repeat(
        2,
        minmax(0, calc((100% - 28px) / 3))
    );
    justify-content: center;
}

.project-photos img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #eeeeee;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.project-photos img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.projects-message {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    text-align: center;
}

.projects-error {
    border-color: #e6b8b8;
    color: #8a1f1f;
    background: #fff5f5;
}

/* -------------------------------------------------
   PROJECT PHOTO LIGHTBOX
   ------------------------------------------------- */

body.project-lightbox-open {
    overflow: hidden;
}

.project-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.86);
}

.project-lightbox.open {
    display: flex;
}

.project-lightbox img {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    background: #111111;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.project-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-family: Arial, sans-serif;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.project-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.26);
}

/* -------------------------------------------------
   TABLET / MOBILE
   ------------------------------------------------- */

@media (max-width: 900px) {

    .projects-section {
        padding: 52px 0 68px;
    }

    .projects-heading {
        font-size: 2.3rem;
    }

    .project-card {
        padding: 26px;
    }

    .project-photos,
    .project-photos.two {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }

    .project-photos.single {
        grid-template-columns: minmax(0, 1fr);
        max-width: 500px;
        margin-inline: auto;
    }
}

@media (max-width: 640px) {

    .projects-section {
        padding: 42px 0 56px;
    }

    .projects-intro {
        margin-bottom: 30px;
    }

    .projects-heading {
        font-size: 2rem;
    }

    .projects-subheading {
        font-size: 1rem;
    }

    .project-card {
        padding: 20px 16px;
    }

    .project-title {
        font-size: 1.6rem;
    }

    .project-description {
        margin: 18px 0 24px;
        font-size: 1rem;
    }

    .project-photos,
    .project-photos.single,
    .project-photos.two {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .project-photos img {
        max-height: 420px;
    }

    .project-lightbox {
        padding: 12px;
    }

    .project-lightbox-close {
        top: 10px;
        right: 10px;
    }
}
