/* --- V2 Spheres Portfolio: Front-end Styles --- */
.v2-portfolio-container {
    background-color: var( --v2sp-bg, #0b132b );
    color: var( --v2sp-body, #ffffff );
    padding: 60px 20px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    border-radius: 12px;
}

/* Full-width variant: breaks the container out of the theme's boxed
   page-content width so it stretches edge-to-edge with the browser
   window, no matter which page/theme it's placed in. Toggled from
   Portfolio -> Layout & Colors ("Full-width layout"). */
.v2-portfolio-container.v2-full-bleed {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-radius: 0;
    box-sizing: border-box;
    padding-left: max(20px, calc((100vw - 1300px) / 2 + 20px));
    padding-right: max(20px, calc((100vw - 1300px) / 2 + 20px));
}

.v2-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.v2-logo-wrapper {
    margin-bottom: 15px;
}

.v2-brand-logo {
    max-height: 65px;
    width: auto;
    object-fit: contain;
}

.v2-subtitle {
    display: block;
    color: var( --v2sp-accent, #ff7b00 );
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 10px;
}

.v2-main-title {
    font-size: 36px;
    font-weight: 800;
    color: var( --v2sp-heading, #ffffff );
    margin: 0;
}

/* Filter Tabs */
.v2-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.v2-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var( --v2sp-body, #cbd5e0 );
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.v2-filter-btn:hover {
    border-color: var( --v2sp-accent, #ff7b00 );
    color: var( --v2sp-heading, #ffffff );
}

.v2-filter-btn.is-active {
    background-color: var( --v2sp-accent, #ff7b00 );
    border-color: var( --v2sp-accent, #ff7b00 );
    color: #ffffff;
}

.v2-projects-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* [v2_portfolio] grid listing — compact preview cards that link through
   to each project's own full single page. */
.v2-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
    max-width: 1300px;
    margin: 0 auto;
}

.v2-project-grid-item {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.v2-project-grid-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 123, 0, 0.4);
}

.v2-project-grid-item.v2-is-hidden {
    display: none;
}

.v2-grid-item-image {
    position: relative;
    height: 210px;
    background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    overflow: hidden;
}

.v2-grid-item-image.v2-grid-item-noimage::after {
    content: '\1F3D7';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    opacity: 0.25;
}

.v2-grid-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.v2-project-grid-item:hover .v2-grid-item-image img {
    transform: scale(1.08);
}

.v2-grid-badge {
    position: absolute;
    top: 14px;
    left: 14px;
}

.v2-grid-item-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.v2-grid-item-title {
    font-size: 21px;
    font-weight: 700;
    color: var( --v2sp-heading, #ffffff );
    margin: 0;
    transition: color 0.3s ease;
}

.v2-project-grid-item:hover .v2-grid-item-title {
    color: var( --v2sp-accent, #ff7b00 );
}

.v2-grid-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0;
}

.v2-grid-item-nature {
    color: var( --v2sp-muted, #a0aec0 );
    font-size: 14px;
}

.v2-grid-item-cta {
    margin-top: auto;
    padding-top: 10px;
    color: var( --v2sp-accent, #ff7b00 );
    font-size: 14px;
    font-weight: 700;
}

.v2-no-projects {
    text-align: center;
    color: var( --v2sp-muted, #a0aec0 );
}

/* Project Card */
.v2-project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.25s ease;
}

.v2-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 123, 0, 0.4);
}

.v2-project-card.v2-is-hidden {
    display: none;
}

.v2-badge-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.v2-badge {
    background-color: var( --v2sp-accent, #ff7b00 );
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.v2-badge-ongoing {
    background-color: var( --v2sp-ongoing, #b8860b );
}

.v2-badge-completed {
    background-color: var( --v2sp-completed, #0a7a2f );
}

.v2-location {
    color: var( --v2sp-muted, #a0aec0 );
    font-size: 14px;
    font-weight: 600;
}

.v2-project-title {
    font-size: 30px;
    font-weight: 700;
    color: var( --v2sp-heading, #ffffff );
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    cursor: default;
    transition: color 0.3s ease;
}

.v2-project-card:hover .v2-project-title {
    color: var( --v2sp-accent, #ff7b00 );
}

.v2-project-title a {
    color: inherit;
    text-decoration: none;
}

.v2-project-title a:hover {
    color: var( --v2sp-accent, #ff7b00 );
}

/* Single project page: back-to-portfolio link */
.v2-back-link {
    display: inline-block;
    margin-bottom: 25px;
    color: var( --v2sp-body, #cbd5e0 );
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.v2-back-link:hover {
    color: var( --v2sp-accent, #ff7b00 );
}

.v2-project-desc {
    color: var( --v2sp-body, #cbd5e0 );
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.v2-project-desc p:last-child {
    margin-bottom: 0;
}

.v2-project-desc strong {
    color: var( --v2sp-heading, #ffffff );
}

/* Specs Layout */
.v2-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.v2-spec-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 3px solid var( --v2sp-accent, #ff7b00 );
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.v2-spec-item:hover {
    transform: translateY(-4px);
    background: rgba(0, 0, 0, 0.32);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.v2-spec-label {
    display: block;
    color: var( --v2sp-muted, #a0aec0 );
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.v2-spec-value {
    color: var( --v2sp-heading, #ffffff );
    font-size: 18px;
    font-weight: 700;
}

/* Gallery Layout & Hover Zoom Effects */
.v2-project-gallery {
    margin-top: 30px;
}

/* Project Views & Elevations — styled as a distinct "technical drawing"
   panel (bordered frame, squared corners, static images) so it reads
   differently from the photo Gallery below it. Fixed 2-column (2x2)
   grid, images shown in full (uncropped). Click still opens the
   shared lightbox at full resolution. */
.v2-project-views {
    margin-top: 30px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var( --v2sp-accent, #ff7b00 );
    border-radius: 6px;
}

.v2-views-eyebrow {
    display: block;
    color: var( --v2sp-accent, #ff7b00 );
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 6px;
}

.v2-views-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
    color: var( --v2sp-heading, #ffffff );
    font-family: 'Courier New', Courier, monospace;
}

.v2-gallery-grid.v2-views-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.v2-gallery-item.v2-view-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 260px;
    background-color: #12182f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    transition: border-color 0.25s ease;
}

.v2-gallery-item.v2-view-item:hover {
    border-color: var( --v2sp-accent, #ff7b00 );
}

.v2-gallery-item.v2-view-item img {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: #12182f;
    transition: none;
}

/* Cancel the photo-gallery hover zoom for views — these are static
   reference drawings, not photos. */
.v2-gallery-item.v2-view-item:hover img {
    transform: none;
}

.v2-view-caption {
    position: relative;
    width: 100%;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: var( --v2sp-accent, #ff7b00 );
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
}

@media (max-width: 600px) {
    .v2-project-views {
        padding: 16px;
    }
    .v2-gallery-grid.v2-views-grid {
        grid-template-columns: 1fr;
    }
    .v2-gallery-item.v2-view-item {
        height: 220px;
    }
}

.v2-gallery-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var( --v2sp-heading, #ffffff );
}

.v2-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.v2-gallery-item {
    border-radius: 10px;
    overflow: hidden;
    height: 180px;
    background-color: #1a202c;
    position: relative;
    cursor: pointer;
}

.v2-gallery-item:focus-visible {
    outline: 3px solid var( --v2sp-accent, #ff7b00 );
    outline-offset: 2px;
}

.v2-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.v2-gallery-item:hover img {
    transform: scale(1.1);
}

/* Lightbox / slider overlay */
body.v2-lightbox-open {
    overflow: hidden;
}

.v2-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(5, 8, 20, 0.92);
    align-items: center;
    justify-content: center;
}

.v2-lightbox.is-open {
    display: flex;
}

.v2-lightbox-stage {
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.v2-lightbox-img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.v2-lightbox-counter {
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0.8;
}

.v2-lightbox-close,
.v2-lightbox-prev,
.v2-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.v2-lightbox-close:hover,
.v2-lightbox-prev:hover,
.v2-lightbox-next:hover {
    background: var( --v2sp-accent, #ff7b00 );
    border-color: var( --v2sp-accent, #ff7b00 );
}

.v2-lightbox-close {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 26px;
    line-height: 1;
}

.v2-lightbox-prev,
.v2-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    font-size: 30px;
    line-height: 1;
}

.v2-lightbox-prev {
    left: 20px;
}

.v2-lightbox-next {
    right: 20px;
}

@media (max-width: 600px) {
    .v2-lightbox-prev,
    .v2-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    .v2-lightbox-close {
        top: 12px;
        right: 12px;
    }
    .v2-lightbox-prev {
        left: 8px;
    }
    .v2-lightbox-next {
        right: 8px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .v2-project-card {
        padding: 20px;
    }
    .v2-main-title {
        font-size: 28px;
    }
    .v2-project-title {
        font-size: 24px;
    }
}
