@import url('normalize.css');

/* ===== SECTION: GALLERY / FEATURES ===== */
.gallery-section {
    background-color: #1f1f1f;
    /* Matches the end of architecture gradient */
    padding: 80px 0;
    color: #fff;
    font-family: 'Manrope', sans-serif;
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-header {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
    text-transform: none;
    letter-spacing: 1px;
}

/* TABS */
.gallery-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.gallery-tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 24px;
    font-size: 14px;
    text-transform: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    font-weight: 500;
}

.gallery-tab:hover,
.gallery-tab.active {
    background-color: #f0f0f0;
    color: #333;
    border-color: #f0f0f0;
}

/* GRID */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    position: relative;
    height: 300px;
    /* Fixed height for uniformity */
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background-color: #1a1a1a;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.gallery-icon {
    width: 40px;
    height: 40px;
    color: #fff;
    opacity: 0.8;
}

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

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

    .gallery-tabs {
        flex-direction: column;
        /* Stack tabs on specific requirement, but row usually works better for tabs */
        flex-direction: row;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        white-space: nowrap;
    }

    .gallery-tab {
        flex: 0 0 auto;
    }
}

/* LIGHTBOX - Updated for Split Layout */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content-wrapper {
    display: flex;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    flex: 0 0 350px;
    /* Fixed width sidebar */
    padding: 40px;
    background-color: #e0e0e0;
    /* Light gray #e0e0e0 */
    color: #222;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Align top */
}

.lightbox-info::-webkit-scrollbar {
    width: 5px;
}

.lightbox-info::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.lightbox-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000;
}

.lightbox-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    white-space: pre-wrap;
    /* allow newlines in desc */
}

.lightbox-image-container {
    flex: 1;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* RESPONSIVE LIGHTBOX */
@media (max-width: 900px) {
    .lightbox-content-wrapper {
        flex-direction: column-reverse;
        /* Info bottom, Image top */
        height: 90vh;
        width: 100%;
    }

    .lightbox-info {
        flex: 0 0 auto;
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
        max-height: 40%;
        justify-content: flex-start;
    }

    .lightbox-image-container {
        flex: 1;
    }

    .lightbox-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .lightbox-desc {
        font-size: 14px;
    }
}