
/* ----------------------------------------------------------- */
/* WORK PAGE (GRID & FILTERS)                                  */
/* ----------------------------------------------------------- */

/* Work Page Container */
.work-container {
    padding-top: 140px; /* Header + spacing */
    padding-bottom: var(--spacing-xl);
    min-height: 100vh;
}

/* Page Header */
.work-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.work-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.work-header p {
    color: var(--color-ui-muted);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Filters */
.filters-container {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; /* Single line */
    overflow-x: auto; /* Allow scroll if needed */
    gap: 10px; /* Reduced gap from 16px */
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-md);
    border-bottom: 1px solid #333;
    padding-bottom: 200px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filters-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-secondary);
    padding: 8px 16px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    white-space: nowrap; /* Prevent text wrap */
    flex-shrink: 0;
}

.filter-btn:hover {
    color: var(--color-text-primary);
}

.filter-btn.active {
    color: var(--color-accent);
    border: 1px solid var(--color-accent); /* Boxed active state */
}

/* Project Grid (4 Columns) */
.project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Changed from 5 to 4 */
    gap: 20px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.project-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1; /* Square box */
    overflow: hidden;
    background-color: #1a1a1a;
    border: none; /* Removed border for clean gap look */
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.4s ease;
}

/* Hover Effects */
.project-card:hover {
    z-index: 2; /* Bring to top */
    /* box-shadow: 0 0 20px rgba(0,0,0,0.5); Highlight shadow removed as per minimalist request if needed, but keeping for now */
}

.project-card:hover img {
    filter: grayscale(0%);
    /* transform: scale(1.05); Removed zoom for stricter grid alignment */
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4); /* Lighter overlay to see image */
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.3s ease;
    width: 100%;
}

.project-card:hover .project-info {
    transform: translateY(0);
}

.project-title {
    font-size: 1.2rem;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.4;
    text-align: center;
}

.project-location {
    display: none; /* Hide location on grid as per instruction "PROJECT NAME DISPLAY ONLY" */
}

/* Utility */
.hidden {
    display: none !important;
}
@media (max-width: 1600px) {
    /* Maintain 5 columns on large screens */
}

@media (max-width: 1400px) {
    .project-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .work-container {
        padding-top: 100px;
    }
    .project-card {
        border: none;
        margin-bottom: 2px;
    }
}

@media (max-width: 480px) {
    .project-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* ----------------------------------------------------------- */
/* PROJECT PAGE (WIREFRAME LAYOUT)                             */
/* ----------------------------------------------------------- */

/* Specifications Section Layout */
.specs-section {
    background-color: transparent;
    padding: 0;
    min-height: 100vh; /* Force full screen height */
    display: flex;
    align-items: center;
    justify-content: center; /* Center content vertically */
    scroll-snap-align: start; /* Snap to start */
}

.specs-layout {
    display: grid;
    grid-template-columns: 1.3fr 1.7fr; /* Specs wider, text narrower */
    gap: var(--spacing-xl);
    align-items: start;
    margin: 0 var(--spacing-md);
}

.specs-section .container {
    max-width: 1200px;
}

/* Left Column: Specs Box */
.specs-box {
    background-color: #2a2a2a; /* Distinct background as per wireframe note (blue/dark) */
    border: 1px solid #333;
    padding: var(--spacing-lg);
    position: sticky;
    top: 100px; /* Sticky scroll */
}

.specs-box h3 {
    font-size: 1.1rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.spec-row {
    margin-bottom: var(--spacing-sm);
    border-bottom: 1px solid #3a3a3a;
    padding-bottom: 8px;
}

.spec-row:last-child {
    border-bottom: none;
}

.spec-key {
    display: block;
    font-size: 0.75rem;
    color: var(--color-ui-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.spec-val {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
}

/* Right Column: Overview & Client Speak */
.project-text-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.overview-box h2 {
    font-size: 1.5rem;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none;
}

.overview-text {
    font-size: 1.1rem;
    color: #ddd;
    line-height: 1.8;
    text-align: justify;
}

.client-speak-box {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-lg);
    border-top: 1px solid #333;
}

.client-speak-box h3 {
    font-size: 1.2rem;
    color: var(--color-ui-muted);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
}

.quote-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-text-secondary);
    border-left: 3px solid var(--color-accent);
    padding-left: var(--spacing-md);
}

/* Visual Carousel Updates */
.visual-carousel-section {
    padding-top: 0;
    margin-top: var(--header-offset);
}

.visual-carousel-container {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-offset));
    overflow: hidden;
}

.visual-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.visual-slide {
    min-width: 100%;
    height: 100%;
}

.visual-slide img {
    width: 100%;
    height: 110%;
    object-fit: cover;
    display: block;
    margin-top: -2px;
}

.visual-nav-btn,
.technical-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: radial-gradient(closest-side, rgba(0,0,0,0.2) 0%, transparent 70%);
    border: none !important;
    outline: none;
    color: #ffffff;
    width: 80px;
    height: 80px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, color 0.3s ease, background 0.3s ease;
    z-index: 10;
    border-radius: 50%;
}

.visual-carousel-container:hover .visual-nav-btn {
    opacity: 1;
}

.visual-nav-btn:hover,
.technical-nav-btn:hover {
    color: var(--color-accent);
    background: radial-gradient(closest-side, rgba(0,0,0,0.4) 0%, transparent 70%);
}

/* Responsive Project Page */
@media (max-width: 992px) {
    .specs-layout {
        grid-template-columns: 1fr;
    }
    .specs-box {
        position: static;
        margin-bottom: var(--spacing-lg);
    }
}

/* Related Projects Carousel */
.related-carousel-container {
    overflow: hidden;
    width: 100%;
}

.related-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.5s ease;
}

.related-carousel-container .carousel-item {
    min-width: calc(25% - 15px); /* 4 items per row (100% / 4 minus gap) */
    width: calc(25% - 15px);
    aspect-ratio: 1/1; /* Square */
    position: relative;
    cursor: pointer;
}

@media (max-width: 992px) {
    .related-carousel-container .carousel-item {
        min-width: calc(50% - 10px); /* 2 items per row */
        width: calc(50% - 10px);
    }
}

@media (max-width: 576px) {
    .related-carousel-container .carousel-item {
        min-width: 100%; /* 1 item per row */
        width: 100%;
    }
}

.related-carousel-container .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.related-carousel-container .carousel-item:hover img {
    filter: grayscale(0%);
}

/* Combined Footer Section */
.combined-footer-section {
    min-height: calc(100vh - var(--header-offset));
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Spread content out */
    padding-top: var(--spacing-lg);
    scroll-snap-align: start;
    position: relative;
    background: var(--color-bg-primary); /* Ensure background covers */
}

/* Adjust children spacing */
.combined-footer-section .related-section {
    flex-grow: 1; /* Allow related section to expand */
    display: flex;
    align-items: center; /* Center related carousel vertically if space allows */
}

.combined-footer-section .site-footer {
    margin-top: auto; /* Push footer to bottom */
}

/* Remove separate scroll snap from children if present */
.combined-footer-section > * {
    scroll-snap-align: none;
}
