:root {
    --re-text: #101214;
    --re-muted: #6a717b;
    --re-border: #e7ebef;
    --re-surface: #ffffff;
    --re-bg: #f6f8fa;
    --re-shadow: 0 12px 34px rgba(16, 18, 20, 0.08);
    --re-radius-lg: 24px;
    --re-radius-md: 18px;
    --re-radius-sm: 14px;
}

.re-block-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 44px 20px;
}

.re-projects-wrap,
.re-single-project-wrap {
    color: var(--re-text);
}

.re-projects-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 24px;
}

.re-section-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--re-muted);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 12px;
    font-weight: 700;
}

.re-section-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
}

.re-project-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.re-filter-btn {
    border: 1px solid var(--re-border);
    background: var(--re-surface);
    color: var(--re-text);
    padding: 11px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: all .22s ease;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 0 rgba(16,18,20,.03);
}

.re-filter-btn.active,
.re-filter-btn:hover {
    background: var(--re-text);
    color: #fff;
    border-color: var(--re-text);
    transform: translateY(-1px);
}

.re-project-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.re-project-card {
    min-width: 0;
    border-radius: var(--re-radius-lg);
    overflow: hidden;
    background: var(--re-surface);
    box-shadow: var(--re-shadow);
    border: 1px solid rgba(231,235,239,.7);
    transition: transform .28s ease, box-shadow .28s ease;
}

.re-project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 42px rgba(16, 18, 20, 0.12);
}

.re-project-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
    height: 100%;
}

.re-project-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #eef2f5, #dfe6ec);
}

.re-project-media img,
.re-project-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.re-project-media img {
    transition: transform .45s ease;
}

.re-project-card:hover .re-project-media img {
    transform: scale(1.04);
}

.re-project-card-body {
    padding: 18px 18px 20px;
}

.re-project-cats {
    color: var(--re-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.re-project-title {
    margin: 0 0 14px;
    font-size: 22px;
    line-height: 1.25;
}

.re-project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

.re-project-link::after {
    content: '→';
}

.re-empty-state {
    padding: 32px 0;
    color: var(--re-muted);
    font-size: 15px;
}

.re-single-banner {
    position: relative;
    min-height: 350px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--re-shadow);
}

.re-single-banner img {
    width: 100%;
    min-height: 350px;
    object-fit: cover;
    display: block;
}

.re-single-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.16) 0%, rgba(0,0,0,.46) 100%);
}

.re-single-banner-content {
    position: absolute;
    left: 34px;
    right: 34px;
    bottom: 32px;
    z-index: 2;
    color: #fff;
}

.re-single-meta {
    margin-bottom: 12px;
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .95;
}

.re-single-title {
    margin: 0;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1.04;
}

.re-single-title-inner {
    color: var(--re-text);
    margin-bottom: 18px;
}

.re-single-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 30px;
    margin-top: 30px;
    align-items: start;
}

.re-single-description,
.re-single-gallery {
    background: var(--re-surface);
    border-radius: 28px;
    box-shadow: var(--re-shadow);
    padding: 28px;
    border: 1px solid rgba(231,235,239,.7);
}

.re-single-text {
    color: #252a31;
    font-size: 16px;
    line-height: 1.9;
}

.re-single-text p:first-child {
    margin-top: 0;
}

.re-side-title {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 700;
}

.re-slider {
    position: relative;
}

.re-slider-track-wrap {
    overflow: hidden;
    border-radius: 22px;
    background: #edf2f6;
}

.re-slider-track {
    display: flex;
    transition: transform .32s ease;
    will-change: transform;
}

.re-slide {
    min-width: 100%;
}

.re-slide img {
    display: block;
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.re-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(16,18,20,.74);
    color: #fff;
    cursor: pointer;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease;
}

.re-slider-nav:hover {
    background: rgba(16,18,20,.92);
}

.re-slider-prev {
    left: 14px;
}

.re-slider-next {
    right: 14px;
}

.re-slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.re-slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: 0;
    background: #d0d6dd;
    cursor: pointer;
    padding: 0;
    transition: transform .2s ease, background .2s ease;
}

.re-slider-dot.is-active {
    background: var(--re-text);
    transform: scale(1.2);
}

@media (max-width: 1280px) {
    .re-project-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .re-project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .re-single-content {
        grid-template-columns: 1fr;
    }

    .re-slide img {
        height: 350px;
    }
}

@media (max-width: 640px) {
    .re-block-shell {
        padding: 28px 16px;
    }

    .re-project-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .re-single-banner,
    .re-single-banner img {
        min-height: 350px;
    }

    .re-single-banner-content {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .re-single-description,
    .re-single-gallery {
        padding: 20px;
        border-radius: 22px;
    }

    .re-slide img {
        height: 320px;
    }

    .re-slider-nav {
        width: 40px;
        height: 40px;
    }
}


/* v2.1 Hero Banner Improvements */
.re-project-hero,
.re-portfolio-single-hero,
.re-single-project-hero,
.project-single-hero {
    position: relative;
    min-height: 350px;
    height: 350px;
    max-height: 350px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.re-project-hero img,
.re-portfolio-single-hero img,
.re-single-project-hero img,
.project-single-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.re-project-hero::before,
.re-portfolio-single-hero::before,
.re-single-project-hero::before,
.project-single-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.62));
    z-index: 1;
    pointer-events: none;
}

.re-project-hero .re-project-hero-content,
.re-portfolio-single-hero .re-project-hero-content,
.re-single-project-hero .re-project-hero-content,
.project-single-hero .re-project-hero-content,
.re-project-hero .hero-content,
.re-portfolio-single-hero .hero-content,
.re-single-project-hero .hero-content,
.project-single-hero .hero-content,
.re-project-hero h1,
.re-portfolio-single-hero h1,
.re-single-project-hero h1,
.project-single-hero h1 {
    position: relative;
    z-index: 2;
    color: #ffffff !important;
}

.re-project-hero h1,
.re-portfolio-single-hero h1,
.re-single-project-hero h1,
.project-single-hero h1 {
    margin: 0;
    padding: 32px;
    text-shadow: 0 2px 18px rgba(0,0,0,.35);
}

@media (max-width: 768px) {
    .re-project-hero,
    .re-portfolio-single-hero,
    .re-single-project-hero,
    .project-single-hero {
        height: 300px;
        min-height: 300px;
        max-height: 300px;
    }

    .re-project-hero h1,
    .re-portfolio-single-hero h1,
    .re-single-project-hero h1,
    .project-single-hero h1 {
        padding: 22px;
    }
}


/* v2.2 Archive controls */
.re-archive-shell .re-section-eyebrow:empty,
.re-archive-shell .re-section-title:empty {
    display: none;
}

.re-archive-shell {
    padding-top: 32px;
}

.re-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}


/* v2.3.1 archive advanced controls */
.re-project-grid.re-project-grid-columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.re-project-grid.re-project-grid-columns-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.re-project-grid.re-project-grid-columns-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.re-project-filter a.re-filter-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.re-pagination-wrap {
    margin-top: 34px;
}
.re-pagination-wrap ul {
    list-style: none;
    display: flex;
    gap: 8px;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.re-pagination-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--re-border);
    background: #fff;
    color: var(--re-text);
    text-decoration: none;
    font-weight: 600;
}
.re-pagination-wrap .page-numbers.current,
.re-pagination-wrap .page-numbers:hover {
    background: var(--re-text);
    color: #fff;
    border-color: var(--re-text);
}

.re-load-more-wrap {
    margin-top: 34px;
    text-align: center;
}
.re-load-more-btn {
    border: 1px solid var(--re-text);
    background: var(--re-text);
    color: #fff;
    padding: 14px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}
.re-load-more-btn.is-loading,
.re-load-more-btn:disabled {
    opacity: .7;
    cursor: wait;
}

@media (max-width: 1280px) {
    .re-project-grid.re-project-grid-columns-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 991px) {
    .re-project-grid.re-project-grid-columns-4,
    .re-project-grid.re-project-grid-columns-3,
    .re-project-grid.re-project-grid-columns-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    .re-project-grid.re-project-grid-columns-4,
    .re-project-grid.re-project-grid-columns-3,
    .re-project-grid.re-project-grid-columns-2 {
        grid-template-columns: 1fr;
    }
}


.re-archive-shell.is-loading {
    opacity: .75;
    transition: opacity .2s ease;
}
\n
/* v2.4.0 final stability fixes */
.post-type-archive-re_project .archive-title,
.post-type-archive-re_project .page-title,
.post-type-archive-re_project .entry-title,
.post-type-archive-re_project .page-header,
.post-type-archive-re_project .archive-header,
.post-type-archive-re_project .archive-description {
    display: none !important;
}

.re-archive-shell.is-loading {
    opacity: .72;
    transition: opacity .2s ease;
}


/* v2.4.4 Terrano-inspired refinement */
:root{
    --re-terrano-bg:#f3f1ee;
    --re-terrano-card:#f7f5f2;
    --re-terrano-line:rgba(16,16,16,.08);
    --re-terrano-text:#1b1b1b;
    --re-terrano-muted:#6f6a64;
}

.terrano-project-single,
.re-archive-shell,
[data-re-projects="shortcode"]{
    background: var(--re-terrano-bg);
    color: var(--re-terrano-text);
}

.re-single-project-container,
.re-archive-container,
.re-projects-wrap{
    max-width: 1460px;
    margin: 0 auto;
}

.re-project-card,
.terrano-panel{
    background: var(--re-terrano-card);
    border: 1px solid var(--re-terrano-line);
    border-radius: 28px;
    box-shadow: none;
}

.re-project-card-image-wrap,
.re-project-media{
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.re-project-card{
    transition: transform .25s ease, border-color .25s ease;
}
.re-project-card:hover{
    transform: translateY(-2px);
    border-color: rgba(16,16,16,.18);
}

.re-project-card-body{
    padding: 20px 20px 24px;
}
.re-project-cats{
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--re-terrano-muted);
    text-transform: uppercase;
}
.re-project-title,
.re-project-card-title{
    font-size: 24px;
    line-height: 1.06;
    letter-spacing: -.03em;
    color: var(--re-terrano-text);
}
.re-project-link{
    font-weight: 700;
}

.re-single-hero{
    position: relative;
    min-height: 480px;
    border-radius: 32px;
    overflow: hidden;
    margin: 0 24px 28px;
}
.re-single-hero-media,
.re-single-hero-image{
    width: 100%;
    height: 100%;
}
.re-single-hero-image{
    display:block;
    object-fit: cover;
}
.re-single-hero-overlay{
    position:absolute;
    inset:0;
    background: linear-gradient(90deg, rgba(0,0,0,.54) 0%, rgba(0,0,0,.18) 36%, rgba(0,0,0,0) 64%);
    pointer-events:none;
}
.re-single-hero-content{
    position:absolute;
    z-index:3;
    max-width: 520px;
}
.re-single-hero-content-left{
    left: 44px;
    bottom: 38px;
    right: auto;
}
.re-single-hero-cats{
    color: rgba(255,255,255,.72);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .08em;
    margin-bottom: 10px;
}
.re-single-hero-title{
    color:#fff;
    font-size: 64px;
    line-height: .96;
    letter-spacing: -.05em;
    margin:0;
    max-width: 420px;
    text-wrap: balance;
}

.re-single-project-body{
    padding: 0 24px 60px;
}
.re-single-project-grid{
    display:grid;
    grid-template-columns: minmax(0,1.3fr) minmax(360px,.95fr);
    gap: 28px;
    align-items:start;
}
.re-single-project-description,
.re-single-project-gallery{
    padding: 26px 28px;
}
.re-single-project-description p{
    font-size: 17px;
    line-height: 1.9;
    color: #2d2c2a;
}
.re-side-title{
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin: 0 0 18px;
}

.re-slider-viewport{
    overflow:hidden;
    border-radius: 24px;
}
.re-slider-track{
    display:flex;
    transition: transform .35s ease;
    will-change: transform;
}
.re-slide{
    min-width:100%;
    flex:0 0 100%;
}
.re-slide img{
    display:block;
    width:100%;
    height:430px;
    object-fit:cover;
    border-radius:24px;
}
.re-slider-prev,
.re-slider-next{
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(24,24,24,.72);
    color:#fff;
    font-size: 34px;
    line-height: 1;
    display:flex;
    align-items:center;
    justify-content:center;
}
.re-slider-dots{
    margin-top: 16px;
}
.re-slider-dot{
    width:10px;
    height:10px;
}

.post-type-archive-re_project .archive-title,
.post-type-archive-re_project .page-title,
.post-type-archive-re_project .entry-title,
.post-type-archive-re_project .page-header,
.post-type-archive-re_project .archive-header,
.post-type-archive-re_project .archive-description,
.single-re_project .page-title,
.single-re_project .entry-title,
.single-re_project .page-header,
.single-re_project .entry-header{
    display:none !important;
}

@media (max-width: 1024px){
    .re-single-project-grid{
        grid-template-columns:1fr;
    }
    .re-single-hero-title{
        font-size: 48px;
    }
    .re-slide img{
        height:360px;
    }
}
@media (max-width: 767px){
    .re-single-hero{
        min-height: 360px;
        margin: 0 16px 20px;
        border-radius:24px;
    }
    .re-single-hero-content-left{
        left: 22px;
        bottom: 22px;
    }
    .re-single-hero-title{
        font-size: 38px;
        max-width: 280px;
    }
    .re-single-project-body{
        padding: 0 16px 40px;
    }
    .re-single-project-description,
    .re-single-project-gallery{
        padding: 20px;
        border-radius: 22px;
    }
    .re-slide img{
        height:280px;
    }
}


/* v2.4.5 refined terrano styling */
html, body,
.terrano-project-single,
.re-archive-shell,
[data-re-projects="shortcode"],
.post-type-archive-re_project,
.single-re_project{
    background:#efede9 !important;
}

.re-projects-wrap,
.re-single-project,
.re-single-project-container,
.re-single-project-body,
.re-archive-container{
    background:transparent !important;
}

.re-single-hero{
    width:100%;
    max-width:none;
    margin:0 0 34px;
    min-height:520px;
    border-radius:0 !important;
}
.re-single-hero-media,
.re-single-hero-image{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
}
.re-single-hero-image{
    object-fit:cover !important;
}
.re-single-hero-overlay{
    background:linear-gradient(90deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.24) 34%, rgba(0,0,0,0) 66%) !important;
}
.re-single-hero-content-left{
    left:58px;
    bottom:48px;
}
.re-single-hero-title{
    font-weight:500;
    font-size:72px;
    letter-spacing:-.055em;
}
.re-single-hero-cats{
    font-weight:600;
    font-size:14px;
    letter-spacing:.09em;
}

.re-single-project-container{
    max-width:1460px;
    padding:0 24px 48px;
}
.re-single-project-body{
    padding:0;
}
.re-single-project-grid{
    display:grid;
    grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);
    gap:26px;
    align-items:start;
}
.terrano-panel,
.re-project-card{
    border-radius:0 !important;
    border:1px solid rgba(23,23,23,.08);
    background:#f6f4f1;
}
.re-single-project-description,
.re-single-project-gallery{
    padding:26px 28px;
}
.re-single-project-description p{
    font-size:18px;
    line-height:1.82;
    font-weight:400;
}
.re-side-title{
    font-size:22px;
    font-weight:600;
    margin-bottom:16px;
    letter-spacing:-.03em;
}

.re-slider{
    position:relative;
}
.re-slider-viewport{
    overflow:hidden;
    border-radius:0 !important;
}
.re-slider-track{
    display:flex !important;
    width:100%;
    transform:translate3d(0,0,0);
}
.re-slide{
    min-width:100%;
    flex:0 0 100%;
}
.re-slide img{
    width:100%;
    height:470px;
    object-fit:cover;
    border-radius:0 !important;
    display:block;
}
.re-slider-prev,
.re-slider-next{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:54px;
    height:54px;
    border-radius:999px;
    background:rgba(40,40,40,.76);
    color:#fff;
    border:none;
    z-index:5;
    cursor:pointer;
}
.re-slider-prev{ left:18px; }
.re-slider-next{ right:18px; }
.re-slider-dots{
    display:flex;
    gap:10px;
    justify-content:center;
    margin-top:18px;
}
.re-slider-dot{
    width:11px;
    height:11px;
    border-radius:999px;
    background:#c5c8cc;
    border:none;
    cursor:pointer;
}
.re-slider-dot.is-active{
    background:#101114;
}

.re-archive-container,
.re-projects-wrap{
    max-width:1404px;
}
.re-project-grid{
    gap:26px;
}
.re-project-card{
    overflow:hidden;
}
.re-project-media{
    aspect-ratio:1 / 1.05;
    overflow:hidden;
    border-radius:0 !important;
}
.re-project-media img,
.re-project-card-image,
.re-project-card-image-wrap img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.re-project-card-body{
    padding:18px 20px 20px;
}
.re-project-cats{
    font-size:12px;
    text-transform:uppercase;
    font-weight:600;
    letter-spacing:.06em;
    color:#7a766f;
    margin-bottom:8px;
}
.re-project-title,
.re-project-card-title{
    font-size:21px;
    line-height:1.1;
    font-weight:500;
    letter-spacing:-.04em;
    margin:0 0 14px;
}
.re-project-link{
    font-size:14px;
    font-weight:700;
    letter-spacing:-.01em;
}
.re-project-link:after{
    content:' →';
}

@media (max-width: 1200px){
    .re-single-project-grid{
        grid-template-columns:1fr;
    }
}
@media (max-width: 767px){
    .re-single-hero{
        min-height:360px;
    }
    .re-single-hero-content-left{
        left:24px;
        bottom:24px;
    }
    .re-single-hero-title{
        font-size:42px;
    }
    .re-single-project-container{
        padding:0 16px 36px;
    }
    .re-slide img{
        height:300px;
    }
}


.re-lightbox-link{
    display:block;
}
.re-lightbox-open{
    overflow:hidden;
}
.re-lightbox-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.88);
    z-index:99999;
    display:flex;
    align-items:center;
    justify-content:center;
}
.re-lightbox-stage{
    width:min(92vw, 1400px);
    height:min(88vh, 900px);
    display:flex;
    align-items:center;
    justify-content:center;
}
.re-lightbox-image{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    display:block;
}
.re-lightbox-close,
.re-lightbox-nav{
    position:absolute;
    border:none;
    background:rgba(255,255,255,.12);
    color:#fff;
    cursor:pointer;
}
.re-lightbox-close{
    top:22px;
    right:22px;
    width:48px;
    height:48px;
    border-radius:999px;
    font-size:32px;
    line-height:48px;
}
.re-lightbox-nav{
    top:50%;
    transform:translateY(-50%);
    width:54px;
    height:54px;
    border-radius:999px;
    font-size:34px;
    line-height:54px;
}
.re-lightbox-prev{ left:22px; }
.re-lightbox-next{ right:22px; }
