﻿/* PAGE LAYOUT */

/* PAGE LAYOUT */

.portfolio-page {
    background: #f5f7fb;
    padding: 2.5rem 1.2rem 3rem;
}

.portfolio-inner {
    max-width: 1320px;
    margin: 0 auto;
}

/* HEADER */

.portfolio-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 1.9rem;
}

.portfolio-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.portfolio-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
}

/* FILTERS */

.portfolio-filters-wrap {
    position: relative;
    margin-bottom: 1.6rem;
}

/* fade hint on the right so users know it scrolls */
.portfolio-filters-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 100%;
    background: linear-gradient(to right, transparent, #f5f7fb);
    pointer-events: none;
    border-radius: 0 999px 999px 0;
}

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.filter-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-right: 0.5rem;
}

.filter-chip {
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.3rem 0.9rem;
    font-size: 0.84rem;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

    .filter-chip:hover {
        border-color: rgba(148, 163, 184, 0.7);
        background: #ffffff;
        box-shadow: 0 3px 10px rgba(148, 163, 184, 0.25);
    }

    .filter-chip.active {
        background: #10b981;
        border-color: #10b981;
        color: #f9fafb;
        box-shadow: 0 6px 18px rgba(16, 185, 129, 0.55);
    }

/* GRID & CARDS */

/* 🔧 This is the important change */
.portfolio-grid {
    display: grid;
    /* fixed-ish card width, just like your “All” view */
    grid-template-columns: repeat(auto-fit, minmax(260px, 300px));
    justify-content: center; /* center columns when there are 1–2 items */
    gap: 20px;
}

.project-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 10px 10px 14px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .project-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    }

.project-image-wrapper {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #e5e7eb;
    aspect-ratio: 4 / 3;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tags on image */

.project-tags {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag-chip {
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #f9fafb;
    font-size: 0.7rem;
    padding: 2px 8px;
    white-space: nowrap;
}

/* Clickable garden-type tag chip (on cards and in modal) */

.tag-chip-btn {
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

    .tag-chip-btn:hover {
        background: rgba(16, 185, 129, 0.85);
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(15, 23, 42, 0.4);
    }

/* Card content */

.project-body {
    padding: 10px 4px 2px;
}

.project-title {
    margin: 0 0 2px;
    font-size: 1rem;
    font-weight: 600;
}

.project-subtitle {
    margin: 0 0 4px;
    font-size: 0.86rem;
    color: #6b7280;
}

.project-meta {
    margin: 0;
    font-size: 0.78rem;
    color: #9ca3af;
}

.no-projects {
    grid-column: 1 / -1;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* MODAL */

.project-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem 1rem 1.5rem;
    z-index: 150;
    overflow-y: auto;
}

.project-modal {
    background: #ffffff;
    border-radius: 20px;
    max-width: 980px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.35);
    padding: 1.4rem 1.6rem 1.6rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    border: none;
    background: rgba(15, 23, 42, 0.07);
    border-radius: 999px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.15s, color 0.15s;
}

    .modal-close:hover {
        color: #111827;
    }

.modal-header {
    margin-top: 0.3rem;
}

.modal-title {
    margin: 0 0 2px;
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-subtitle {
    margin: 0 0 4px;
    font-size: 0.92rem;
    color: #6b7280;
}

.modal-meta {
    margin: 0;
    font-size: 0.8rem;
    color: #9ca3af;
}

.modal-tag-row {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Main layout: hero + story */

.modal-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
    gap: 1.2rem;
    align-items: flex-start;
}

.modal-hero-wrapper {
    border-radius: 16px;
    overflow: hidden;
    background: #e5e7eb;
    max-height: 300px;
}

.modal-hero-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.modal-story h3,
.modal-story h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
}

.modal-story p {
    margin: 0 0 6px;
    font-size: 0.88rem;
    color: #4b5563;
}

.modal-story ul {
    margin: 0 0 6px 1.1rem;
    padding: 0;
    font-size: 0.86rem;
    color: #4b5563;
}

/* Before / After */

.modal-before-after {
    margin-top: 0.4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.before-after-item {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: #e5e7eb;
}

    .before-after-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .before-after-item figcaption {
        padding: 4px 8px 6px;
        font-size: 0.78rem;
        color: #374151;
    }

/* Gallery */

.modal-gallery {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
}

.gallery-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* Services */

.modal-services {
    margin-top: 0.3rem;
}

    .modal-services h4 {
        margin: 0 0 4px;
        font-size: 0.95rem;
    }

    .modal-services ul {
        margin: 0;
        padding: 0;
        list-style: none;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .modal-services li {
        background: rgba(16, 185, 129, 0.1);
        color: #065f46;
        border-radius: 999px;
        padding: 0.2rem 0.75rem;
        font-size: 0.82rem;
        white-space: nowrap;
    }

/* RESPONSIVE */

@media (max-width: 900px) {
    .modal-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .project-modal-backdrop {
        padding: 1.5rem 0.6rem;
    }

    .project-modal {
        padding-inline: 1.1rem;
    }
}

@media (max-width: 640px) {
    .portfolio-page {
        padding-top: 2rem;
    }

    .portfolio-header {
        margin-bottom: 1.2rem;
    }

    .portfolio-title {
        font-size: 1.6rem;
    }

    /* 2 cards per row on mobile */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .project-card {
        padding: 7px 7px 10px;
        border-radius: 14px;
    }

    .project-title {
        font-size: 0.88rem;
    }

    .project-subtitle {
        font-size: 0.78rem;
    }

    .project-meta {
        font-size: 0.72rem;
    }

    /* Scroll horizontally on mobile instead of wrapping */
    .portfolio-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0.25rem 0.25rem 0.5rem;
        /* hide scrollbar visually */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .portfolio-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-label {
        display: none; /* label takes too much room; active chip makes it obvious */
    }

    .filter-chip {
        flex-shrink: 0; /* chips must not shrink */
    }
}

/* Make images feel clickable */
.modal-hero-image,
.before-after-item img,
.gallery-thumb {
    cursor: zoom-in;
}

/* Lightbox styles are in lightbox.css */
