/* ==========================================================================
   Portfolio gallery + lightbox
   Self-contained; driven by data/portfolio.json via js/portfolio.js
   ========================================================================== */

.portfolio {
    padding: var(--spacing-3xl, 6rem) 0;
    background-color: #fafafa;
}

/* Filter buttons */
.portfolio-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.portfolio-filter .filter-btn {
    border: 1px solid #d8d8d8;
    background: #fff;
    color: #444;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.portfolio-filter .filter-btn:hover {
    border-color: #b08d57;
    color: #b08d57;
}

.portfolio-filter .filter-btn.active {
    background: #b08d57;
    border-color: #b08d57;
    color: #fff;
}

/* Project card grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.project-card {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0) 70%);
}

.project-card-title {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.25;
}

.project-card-meta {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

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

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

/* Masonry-style grid using CSS columns (legacy, unused) */
.portfolio-grid {
    column-count: 3;
    column-gap: 1rem;
}

.portfolio-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.portfolio-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}

.portfolio-item img {
    display: block;
    width: 100%;
    height: auto;
}

.portfolio-item .portfolio-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 55%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item .portfolio-caption {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.portfolio-item .portfolio-room {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

.portfolio-empty {
    text-align: center;
    color: #888;
    padding: 3rem 0;
}

.portfolio-toggle-wrap {
    text-align: center;
    margin-top: 2.25rem;
}

#portfolio-toggle {
    cursor: pointer;
}

/* Floating WhatsApp click-to-chat button */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2500;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: #fff;
}

@media (max-width: 600px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
        right: 16px;
        bottom: 16px;
    }
}

/* Brand logo mark (nav + footer) */
.nav-logo a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

.nav-mark {
    width: 40px;
    height: 40px;
    display: block;
    flex-shrink: 0;
}

.logo-textwrap {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.footer-brandline {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.footer-brandline h3 {
    margin: 0;
}

.footer-mark {
    width: 52px;
    height: 52px;
    display: block;
    flex-shrink: 0;
}

/* "Currently on site" variant */
.ongoing {
    padding: var(--spacing-3xl, 6rem) 0;
    background-color: #fff;
}

.stage-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    background: var(--secondary, #b08d57);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.stage-badge::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    margin-right: 0.4rem;
    vertical-align: middle;
    animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(4px);
}

.lightbox.open {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 82vh;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    position: absolute;
    bottom: 4%;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 1rem;
    padding: 0 1rem;
}

.lightbox-caption .lb-room {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.28);
}

.lightbox-close {
    top: 4%;
    right: 4%;
}

.lightbox-prev {
    left: 3%;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 3%;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 992px) {
    .portfolio-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .portfolio-grid {
        column-count: 1;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}
