/* =========================================================
   OUR PROJECTS
   Scoped with .op- prefix to avoid theme conflicts.
   ========================================================= */

.op-projects-page,
.op-single-project {
    width: 100%;
}

.op-projects-container,
.op-single-container {
    width: min(100% - 40px, 1200px);
    margin: 0 auto;
}

.op-projects-page {
    padding: 48px 0 80px;
}

.op-projects-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 56px;
}

.op-categories-button {
    height: 40px;
    padding: 0 17px 0 20px;
    border: 0;
    border-radius: 30px;
    background: #e9e7e8;
    color: #171717;
    display: inline-flex;
    align-items: center;
    gap: 24px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    cursor: pointer;
}

.op-plus {
    font-size: 18px;
    line-height: 1;
    font-weight: 300;
    transition: transform .3s ease;
}

.op-categories-button.is-open .op-plus {
    transform: rotate(45deg);
}

.op-search-box {
    width: 235px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 0 17px;
    gap: 10px;
}

.op-search-box svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    stroke: #aaa;
}

.op-search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #222;
    font-size: 11px;
}

.op-search-box input::placeholder {
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.op-category-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .4s ease, opacity .3s ease;
    margin-top: -35px;
}

.op-category-panel.is-open {
    max-height: 150px;
    opacity: 1;
    margin-bottom: 35px;
}

.op-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.op-category-filter {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 30px;
    padding: 8px 15px;
    font-size: 11px;
    cursor: pointer;
    transition: .25s ease;
}

.op-category-filter:hover,
.op-category-filter.is-active {
    background: #222;
    color: #fff;
    border-color: #222;
}

.op-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 0;
}

.op-project-item {
    position: relative;
    padding-bottom: 68px;
}

.op-project-item:nth-child(odd)::after {
    content: "";
    position: absolute;
    left: 0;
    right: -6px;
    bottom: 34px;
    height: 1px;
    background: #cfcfcf;
}

.op-project-item:nth-child(even)::after {
    content: "";
    position: absolute;
    left: -6px;
    right: 0;
    bottom: 34px;
    height: 1px;
    background: #cfcfcf;
}

.op-project-card {
    position: relative;
    height: 390px;
    overflow: hidden;
    background: #ddd;
}

.op-project-link {
    position: absolute;
    inset: 0;
    display: block;
    color: inherit;
    text-decoration: none;
}

.op-project-image,
.op-project-image img,
.op-no-image {
    width: 100%;
    height: 100%;
}

.op-project-image img {
    object-fit: cover;
    display: block;
    transition: transform .7s cubic-bezier(.2,.7,.2,1);
}

.op-no-image {
    background: #d8d8d8;
}

.op-project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 26px 18px 22px;
    color: #fff;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.65) 0%,
        rgba(0,0,0,.20) 35%,
        rgba(0,0,0,0) 65%
    );
    transition: opacity .3s ease, visibility .3s ease;
}

.op-project-title,
.op-project-info-title {
    margin: 0;
    font-weight: 400;
    letter-spacing: -.7px;
}

.op-project-title {
    max-width: 80%;
    font-size: 21px;
    line-height: 1.02;
}

.op-project-info {
    position: absolute;
    inset: 0;
    padding: 20px 18px;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.58) 0%,
        rgba(0,0,0,.35) 45%,
        rgba(0,0,0,.48) 100%
    );
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
}

.op-project-info-title {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,.45);
    font-size: 21px;
    line-height: 1.05;
}

.op-project-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px 40px;
    padding-top: 24px;
}

.op-project-detail {
    min-width: 0;
}

.op-detail-label {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    line-height: 1;
    opacity: .85;
}

.op-detail-value {
    display: block;
    font-size: 11px;
    line-height: 1.35;
    font-weight: 400;
}

.op-project-arrow {
    position: absolute;
    right: 17px;
    bottom: 17px;
    width: 47px;
    height: 47px;
    border-radius: 50%;
    background: rgba(205,205,205,.72);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    z-index: 5;
    transition: .3s ease;
}

.op-project-link:hover .op-project-info,
.op-project-link:focus-visible .op-project-info,
.op-project-card.is-active .op-project-info {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.op-project-link:hover .op-project-image img,
.op-project-card.is-active .op-project-image img {
    transform: scale(1.035);
}

.op-project-link:hover .op-project-overlay,
.op-project-link:focus-visible .op-project-overlay,
.op-project-card.is-active .op-project-overlay {
    opacity: 0;
    visibility: hidden;
}

.op-project-link:hover .op-project-arrow,
.op-project-link:focus-visible .op-project-arrow,
.op-project-card.is-active .op-project-arrow {
    background: rgba(255,255,255,.9);
    color: #333;
}

.op-filter-no-results,
.op-no-results {
    padding: 70px 20px;
    text-align: center;
    font-size: 14px;
    color: #777;
}

/* =========================================================
   SINGLE PROJECT
   Simple temporary layout until the final single design
   is provided.
   ========================================================= */

.op-single-project {
    padding: 60px 0 100px;
}

.op-back-projects {
    display: inline-block;
    margin-bottom: 35px;
    color: #222;
    font-size: 13px;
    text-decoration: none;
}

.op-back-projects:hover {
    text-decoration: underline;
}

.op-single-header {
    margin-bottom: 35px;
}

.op-single-header h1 {
    margin: 0;
    font-size: clamp(36px, 5vw, 70px);
    line-height: .98;
    font-weight: 400;
    letter-spacing: -2px;
}

.op-single-featured-image {
    width: 100%;
    margin-bottom: 50px;
}

.op-single-featured-image img {
    display: block;
    width: 100%;
    height: auto;
}

.op-single-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 70px;
}

.op-single-details {
    display: grid;
    align-content: start;
    gap: 25px;
}

.op-single-details div {
    border-top: 1px solid #ddd;
    padding-top: 12px;
}

.op-single-details span {
    display: block;
    margin-bottom: 6px;
    color: #777;
    font-size: 11px;
}

.op-single-details strong {
    display: block;
    font-size: 14px;
    font-weight: 400;
}

.op-single-content {
    max-width: 750px;
    font-size: 17px;
    line-height: 1.65;
}

.op-single-content img {
    max-width: 100%;
    height: auto;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 767px) {

    .op-projects-container,
    .op-single-container {
        width: min(100% - 30px, 600px);
    }

    .op-projects-page {
        padding: 30px 0 50px;
    }

    .op-projects-toolbar {
        margin-bottom: 35px;
        align-items: stretch;
    }

    .op-search-box {
        width: 170px;
    }

    .op-projects-grid {
        grid-template-columns: 1fr;
    }

    .op-project-item {
        padding: 0 0 45px;
    }

    .op-project-item::after,
    .op-project-item:nth-child(odd)::after,
    .op-project-item:nth-child(even)::after {
        left: 0;
        right: 0;
        bottom: 22px;
    }

    .op-project-card {
        height: 330px;
    }

    .op-project-title,
    .op-project-info-title {
        font-size: 20px;
    }

    .op-single-project {
        padding: 40px 0 70px;
    }

    .op-single-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {

    .op-projects-toolbar {
        flex-direction: column;
    }

    .op-search-box {
        width: 100%;
    }

    .op-categories-button {
        align-self: flex-start;
    }

    .op-project-card {
        height: 300px;
    }

    .op-project-info {
        padding: 18px 16px;
    }

    .op-project-info-title {
        font-size: 18px;
        padding-bottom: 16px;
    }

    .op-project-details {
        gap: 18px 15px;
        padding-top: 18px;
    }

    .op-detail-label {
        font-size: 9px;
    }

    .op-detail-value {
        font-size: 10px;
    }

    .op-project-arrow {
        width: 42px;
        height: 42px;
        right: 13px;
        bottom: 13px;
    }

    .op-single-header h1 {
        letter-spacing: -1px;
    }
}
