

/* ===== Project detail (image + meta overlay, scope, sidebar) ===== */
@media only screen and (min-width: 0rem) {
    #project-detail-1600 {
        padding: var(--sectionPadding);
    }

    #project-detail-1600 .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        gap: clamp(2.5rem, 5vw, 3.5rem);
    }

    #project-detail-1600 .cs-hero {
        position: relative;
        width: 100%;
    }

    #project-detail-1600 .cs-hero-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        border-radius: 0.75rem;
        background-color: var(--secondaryShade);
        display: block;
    }

    #project-detail-1600 .cs-meta {
        margin-top: -3rem;
        margin-left: 1rem;
        margin-right: 1rem;
        position: relative;
        background-color: #fff;
        border-radius: 0.75rem;
        box-shadow: rgba(149, 157, 165, 0.25) 0 8px 24px;
        padding: 1.5rem 1.75rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    #project-detail-1600 .cs-meta-label {
        font-size: 0.8125rem;
        color: var(--bodyTextColor);
        display: block;
        margin-bottom: 0.15rem;
    }

    #project-detail-1600 .cs-meta-value {
        font-family: "Archivo", Arial, sans-serif;
        font-size: 1.0625rem;
        font-weight: 700;
        color: var(--headerColor);
        text-decoration: none;
        display: inline-block;
    }

    #project-detail-1600 a.cs-meta-value {
        color: var(--primary);
    }

    #project-detail-1600 a.cs-meta-value:hover {
        text-decoration: underline;
    }

    #project-detail-1600 .cs-layout {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
    }

    #project-detail-1600 .cs-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    #project-detail-1600 .cs-content p {
        font-size: 1rem;
        line-height: 1.6em;
        color: var(--bodyTextColor);
        margin: 0 0 1.25rem 0;
    }

    #project-detail-1600 .cs-content h2 {
        font-size: clamp(1.5rem, 3vw, 2rem);
        font-weight: 700;
        color: var(--headerColor);
        margin: 1.5rem 0 1.25rem;
    }

    #project-detail-1600 .cs-scope {
        list-style: none;
        width: 100%;
        margin: 0 0 2rem;
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    #project-detail-1600 .cs-scope li {
        position: relative;
        padding-left: 2.25rem;
    }

    #project-detail-1600 .cs-scope li:before {
        content: "";
        position: absolute;
        top: 0.1rem;
        left: 0;
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 50%;
        background-color: var(--secondaryShade);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2301a62a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
    }

    #project-detail-1600 .cs-scope-link {
        font-family: "Archivo", Arial, sans-serif;
        font-size: 1.0625rem;
        font-weight: 700;
        line-height: 1.3;
        color: var(--primary);
        text-decoration: none;
    }

    #project-detail-1600 .cs-scope-link:hover {
        text-decoration: underline;
    }

    #project-detail-1600 .cs-scope p {
        font-size: 0.875rem;
        line-height: 1.5;
        color: var(--bodyTextColor);
        margin: 0.25rem 0 0;
    }

    #project-detail-1600 .cs-cta-card {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #d7dcda;
        border-radius: 0.75rem;
        padding: 2rem 1.5rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    #project-detail-1600 .cs-cta-title {
        font-size: 1.25rem;
        font-weight: 700;
        line-height: 1.3;
        color: var(--headerColor);
        max-width: 16ch;
        margin: 0;
    }

    #project-detail-1600 .cs-cta-phone {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 700;
        color: var(--headerColor);
        text-decoration: none;
    }

    #project-detail-1600 .cs-cta-phone svg {
        color: var(--primary);
        flex: none;
    }

    #project-detail-1600 .cs-cta-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background-color: var(--primary);
        color: #fff;
        font-family: "Oswald", Arial, sans-serif;
        font-size: 0.8125rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        text-decoration: none;
        padding: 0.85rem 1.75rem;
        border-radius: 3rem;
        transition: background-color 0.2s;
    }

    #project-detail-1600 .cs-cta-btn:hover {
        background-color: var(--secondary);
    }
}

@media only screen and (min-width: 64rem) {
    #project-detail-1600 .cs-meta {
        position: absolute;
        bottom: 2rem;
        left: 2rem;
        margin: 0;
        min-width: 18rem;
        max-width: 22rem;
    }

    #project-detail-1600 .cs-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 3.5rem;
    }

    #project-detail-1600 .cs-content {
        flex: 1;
    }

    #project-detail-1600 .cs-sidebar {
        width: 20rem;
        flex: none;
        position: sticky;
        top: 7rem;
    }
}

/* ===== Project detail gallery (small thumbnails, mixed orientation) ===== */
@media only screen and (min-width: 0rem) {
    #project-detail-1600 .cs-gallery {
        width: 100%;
        margin-top: clamp(1.5rem, 4vw, 2.5rem);
    }

    #project-detail-1600 .cs-gallery-title {
        font-size: clamp(1.5rem, 3vw, 2rem);
        font-weight: 700;
        color: var(--headerColor);
        margin: 0 0 1.25rem;
    }

    #project-detail-1600 .cs-gallery-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: clamp(0.75rem, 2vw, 1.25rem);
    }

    #project-detail-1600 .cs-gallery-grid img {
        width: 100%;
        height: clamp(9rem, 20vw, 18rem);
        object-fit: cover;
        border-radius: 0.5rem;
        background-color: var(--secondaryShade);
        display: block;
    }

    /* Orientation modifiers — add class="landscape" or class="portrait" to a gallery <img> */
    #project-detail-1600 .cs-gallery-grid img.landscape {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    #project-detail-1600 .cs-gallery-grid img.portrait {
        height: auto;
        aspect-ratio: 3 / 4;
    }
}

@media only screen and (min-width: 48rem) {
    #project-detail-1600 .cs-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}