/* THE ARCHIVE STUDIO — PROJECT ARCHIVE 1.1
   Scoped to this plugin's template, leaving Shop/other pages unchanged. */

/* The plugin renders the heading itself, so suppress any Moderno-generated
   default blog page header that might be injected by get_header(). */
body.tas-project-archive-active .c-page-header {
    display: none !important;
}

body.tas-project-archive-active .tas-project-archive {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: none;
    margin: 0 !important;
    padding: 40px 24px 64px;
    box-sizing: border-box;
    background: #fff;
    color: #171717;
    overflow: visible;
    font-family: inherit;
}

body.tas-project-archive-active .tas-project-archive *,
body.tas-project-archive-active .tas-project-archive *::before,
body.tas-project-archive-active .tas-project-archive *::after {
    box-sizing: border-box;
}

/* Introduction matches the Shop page's editorial type and gutter. */
body.tas-project-archive-active .tas-project-archive__intro {
    margin: 0 0 42px;
    padding: 0;
    text-align: left;
}

body.tas-project-archive-active .tas-project-archive__eyebrow {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    letter-spacing: 3px;
    line-height: 1.5;
    color: #171717;
}

body.tas-project-archive-active .tas-project-archive__heading {
    margin: 0 0 8px !important;
    padding: 0 !important;
    font-size: 56px !important;
    font-weight: 400 !important;
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-transform: lowercase;
    text-align: left;
    color: #171717 !important;
}

body.tas-project-archive-active .tas-project-archive__description {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 17px !important;
    line-height: 1.5;
    font-weight: 400;
    color: #171717;
}

/* All projects left; Residential + Commercial right, like the reference. */
body.tas-project-archive-active .tas-project-archive__tabs {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    gap: 30px;
    width: 100%;
    margin: 0 0 16px;
    padding: 0;
    border-bottom: 1px solid #d8d8d8;
}

body.tas-project-archive-active .tas-project-archive__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 36px;
    margin: 0;
    padding: 0 0 12px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: lowercase;
    white-space: nowrap;
    text-decoration: none !important;
    color: #171717 !important;
    transition: opacity 0.2s ease;
}

body.tas-project-archive-active .tas-project-archive__tab:first-child {
    margin-right: auto;
}

body.tas-project-archive-active .tas-project-archive__tab:hover {
    opacity: 0.6;
}

body.tas-project-archive-active .tas-project-archive__tab.is-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #171717;
}

/* Full-width project cards on mobile; a balanced two-column grid on desktop. */
body.tas-project-archive-active .tas-project-archive__list {
    width: 100%;
}

body.tas-project-archive-active .tas-project-card {
    width: 100%;
    margin: 0 0 22px;
    padding: 0 0 26px;
    border-bottom: 1px solid #d8d8d8;
}

body.tas-project-archive-active .tas-project-card__photo {
    display: block;
    width: 100%;
    aspect-ratio: 1.9 / 1;
    overflow: hidden;
    background: #f4f2ef;
    text-decoration: none !important;
}

body.tas-project-archive-active .tas-project-card__image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center;
    border: none !important;
    border-radius: 0 !important;
    transition: transform 0.35s ease;
}

body.tas-project-archive-active .tas-project-card__photo:hover .tas-project-card__image {
    transform: scale(1.025);
}

body.tas-project-archive-active .tas-project-card__missing-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 13px;
    color: #777;
}

body.tas-project-archive-active .tas-project-card__headline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin-top: 15px;
}

body.tas-project-archive-active .tas-project-card__title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 27px !important;
    line-height: 1.25 !important;
    font-weight: 400 !important;
    letter-spacing: -.4px;
    color: #171717 !important;
}

body.tas-project-archive-active .tas-project-card__title a {
    color: inherit !important;
    text-decoration: none !important;
}

body.tas-project-archive-active .tas-project-card__number {
    color: #777;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

body.tas-project-archive-active .tas-project-card__details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

body.tas-project-archive-active .tas-project-card__meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
    color: #171717;
    font-size: 11px !important;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 2.2px;
    text-transform: uppercase;
}

body.tas-project-archive-active .tas-project-card__meta span:not(:last-child)::after {
    content: '·';
    margin-left: 8px;
}

body.tas-project-archive-active .tas-project-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    color: #171717 !important;
    text-decoration: none !important;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* Draw the thin, black diagonal arrow from the client's reference.
   An SVG path avoids iOS rendering the character as a blue emoji. */
body.tas-project-archive-active .tas-project-card__arrow svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: square;
    stroke-linejoin: miter;
}

body.tas-project-archive-active .tas-project-card__arrow:hover {
    transform: translate(3px, -3px);
}

body.tas-project-archive-active .tas-project-archive__empty {
    font-size: 15px;
    padding: 30px 0;
}

body.tas-project-archive-active .tas-project-archive__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 0;
    font-size: 14px;
}

body.tas-project-archive-active .tas-project-archive__pagination a,
body.tas-project-archive-active .tas-project-archive__pagination span {
    color: #171717 !important;
    padding: 8px 11px;
    text-decoration: none !important;
}

body.tas-project-archive-active .tas-project-archive__pagination .current {
    border-bottom: 1px solid #171717;
}

body.tas-project-archive-active .tas-project-archive a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* DESKTOP — two project cards per row; mobile stays one per row. */
@media (min-width: 900px) {
    body.tas-project-archive-active .tas-project-archive__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
        row-gap: 30px;
        align-items: stretch;
    }

    body.tas-project-archive-active .tas-project-card {
        min-width: 0;
        width: 100%;
        margin: 0;
        padding-bottom: 22px;
    }

    body.tas-project-archive-active .tas-project-card__photo {
        aspect-ratio: 1.75 / 1;
    }

    body.tas-project-archive-active .tas-project-card__title {
        font-size: 24px !important;
    }
}

@media (max-width: 767px) {
    body.tas-project-archive-active .tas-project-archive {
        padding: 28px 20px 45px;
    }

    body.tas-project-archive-active .tas-project-archive__intro {
        margin-bottom: 34px;
    }

    body.tas-project-archive-active .tas-project-archive__eyebrow {
        font-size: 12px !important;
        letter-spacing: 2.6px;
    }

    body.tas-project-archive-active .tas-project-archive__heading {
        font-size: 44px !important;
    }

    body.tas-project-archive-active .tas-project-archive__description {
        font-size: 15px !important;
    }

    body.tas-project-archive-active .tas-project-archive__tabs {
        gap: clamp(9px, 3.5vw, 18px);
        margin-bottom: 12px;
    }

    body.tas-project-archive-active .tas-project-archive__tab {
        font-size: 14px;
        min-height: 34px;
        padding-bottom: 12px;
    }

    body.tas-project-archive-active .tas-project-card {
        margin-bottom: 20px;
        padding-bottom: 19px;
    }

    body.tas-project-archive-active .tas-project-card__headline {
        margin-top: 12px;
        gap: 12px;
    }

    body.tas-project-archive-active .tas-project-card__title {
        font-size: 20px !important;
        letter-spacing: -0.2px;
    }

    body.tas-project-archive-active .tas-project-card__number {
        font-size: 14px;
    }

    body.tas-project-archive-active .tas-project-card__details {
        margin-top: 8px;
    }

    body.tas-project-archive-active .tas-project-card__meta {
        font-size: 10px !important;
        letter-spacing: 1.7px;
        gap: 6px;
    }

    body.tas-project-archive-active .tas-project-card__meta span:not(:last-child)::after {
        margin-left: 6px;
    }

    body.tas-project-archive-active .tas-project-card__arrow {
        flex-basis: 26px;
        width: 26px;
        height: 26px;
    }

    body.tas-project-archive-active .tas-project-card__arrow svg {
        width: 23px;
        height: 23px;
    }
}
