﻿/* =====================================================
   PROJECT DETAIL - SG ENERGY 2026
   pd- = project-detail namespace
===================================================== */

/* ===== SECTION WRAPPER ===== */
.pd-section {
    padding: 2.5rem 0 4rem;
    background: #fff;
}

.pd-container {
    max-width: 1200px;
}

/* ===== BREADCRUMB ===== */
.pd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

    .pd-breadcrumb a {
        color: var(--primary-color);
        font-weight: 500;
        transition: color var(--transition-fast);
    }

        .pd-breadcrumb a:hover {
            color: var(--primary-dark);
        }

    .pd-breadcrumb i.fa-chevron-right {
        font-size: 10px;
        color: var(--border-color);
    }

    .pd-breadcrumb span {
        color: var(--text-dark);
        font-weight: 500;
        max-width: 300px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* ===== HERO LAYOUT ===== */
.pd-hero {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 3rem;
}

/* ===== GALLERY ===== */
.pd-main-img {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f0f4f8;
    aspect-ratio: 4 / 3;
    box-shadow: 0 8px 32px rgba(21, 101, 192, 0.12);
}

    .pd-main-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.5s ease;
    }

    .pd-main-img:hover img {
        transform: scale(1.03);
    }

/* Zoom button */
.pd-zoom-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    color: var(--primary-color);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: all var(--transition-smooth);
    z-index: 2;
}

    .pd-zoom-btn:hover {
        background: var(--primary-color);
        color: #fff;
        transform: scale(1.1);
    }

/* Counter badge */
.pd-img-counter {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    z-index: 2;
}

/* Thumbnails strip */
.pd-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

    .pd-thumbs::-webkit-scrollbar {
        height: 4px;
    }

    .pd-thumbs::-webkit-scrollbar-track {
        background: transparent;
    }

    .pd-thumbs::-webkit-scrollbar-thumb {
        background: var(--primary-light);
        border-radius: 4px;
    }

.pd-thumb {
    flex-shrink: 0;
    width: 76px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2.5px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: all var(--transition-smooth);
    opacity: 0.7;
}

    .pd-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .pd-thumb:hover,
    .pd-thumb.is-active {
        border-color: var(--primary-color);
        opacity: 1;
        box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
    }

/* ===== INFO SIDEBAR ===== */
.pd-info {
    background: linear-gradient(160deg, #f8fbff 0%, #fff 100%);
    border: 2px solid var(--border-light, #e8edf5);
    border-radius: 20px;
    padding: 2rem;
    position: sticky;
    top: 100px;
}

.pd-info__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: linear-gradient(135deg, rgba(21,101,192,0.08) 0%, rgba(0,172,193,0.12) 100%);
    color: var(--primary-color);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    border: 1px solid rgba(21,101,192,0.15);
}

.pd-info__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.35;
    margin-bottom: 1rem;
}

.pd-info__summary {
    font-size: 14px;
    color: var(--text-medium, #555);
    line-height: 1.7;
    margin-bottom: 0;
}

.pd-info__divider {
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    border-radius: 2px;
    margin: 1.25rem 0;
    opacity: 0.25;
}

/* Info list */
.pd-info__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .pd-info__list li {
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

.pd-info__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color, #00acc1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(21, 101, 192, 0.25);
}

.pd-info__key {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-lighter, #999);
    margin-bottom: 2px;
}

.pd-info__val {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

.pd-info__val--featured {
    color: var(--accent-color, #f57c00);
}

/* CTA Buttons */
.pd-info__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.pd-btn--primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color, #00acc1) 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.35);
}

    .pd-btn--primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(21, 101, 192, 0.45);
        color: #fff;
    }

.pd-btn--ghost {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-light, #e8edf5);
}

    .pd-btn--ghost:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: rgba(21, 101, 192, 0.04);
    }

/* ===== SECTION LABEL ===== */
.pd-section-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light, #e8edf5);
    position: relative;
}

    .pd-section-label::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 60px;
        height: 2px;
        background: var(--gradient-primary, linear-gradient(135deg, #1565c0, #00acc1));
        border-radius: 2px;
    }

    .pd-section-label i {
        font-size: 16px;
    }

/* ===== DESCRIPTION ===== */
.pd-description {
    background: linear-gradient(135deg, #f8fbff 0%, #fff 100%);
    border: 2px solid var(--border-light, #e8edf5);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-bottom: 3rem;
}

.pd-description__body {
    font-size: 15px;
    color: var(--text-medium, #555);
    line-height: 1.85;
}

    .pd-description__body p {
        margin-bottom: 1em;
    }

    .pd-description__body strong {
        color: var(--text-dark);
    }

/* ===== PHOTO ALBUM GRID ===== */
.pd-album {
    margin-bottom: 3rem;
}

.pd-album__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

    /* First item spans 2 cols + 2 rows (feature) */
    .pd-album__grid .pd-album__item:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }

.pd-album__item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: #f0f4f8;
    margin: 0;
}

    .pd-album__item:first-child {
        aspect-ratio: auto; /* controlled by grid */
    }

    .pd-album__item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.45s ease, filter 0.35s ease;
    }

    .pd-album__item:hover img {
        transform: scale(1.06);
        filter: brightness(0.75);
    }

/* Zoom icon on hover */
.pd-album__zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .pd-album__zoom i {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        font-size: 18px;
        box-shadow: 0 4px 16px rgba(0,0,0,0.2);
        transform: scale(0.7);
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

.pd-album__item:hover .pd-album__zoom {
    opacity: 1;
}

    .pd-album__item:hover .pd-album__zoom i {
        transform: scale(1);
    }

/* Caption */
.pd-album__item figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.3s ease;
    line-height: 1.4;
}

.pd-album__item:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

/* ===== BACK CTA ===== */
.pd-back-cta {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(21,101,192,0.04) 0%, rgba(0,172,193,0.06) 100%);
    border-radius: 20px;
    border: 2px dashed rgba(21,101,192,0.15);
}

    .pd-back-cta p {
        font-size: 16px;
        color: var(--text-medium, #555);
        margin-bottom: 1.25rem;
    }

    .pd-back-cta .pd-btn {
        padding: 14px 36px;
        font-size: 15px;
    }

/* ===== LIGHTBOX ===== */
.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    .pd-lightbox.is-open {
        opacity: 1;
        pointer-events: all;
    }

.pd-lb-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

    .pd-lb-content img {
        max-width: 100%;
        max-height: 82vh;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 24px 80px rgba(0,0,0,0.6);
        display: block;
    }

.pd-lb-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

    .pd-lb-caption #pdLbCount {
        flex-shrink: 0;
        color: rgba(255,255,255,0.5);
        font-size: 12px;
    }

/* Lightbox controls */
.pd-lb-close,
.pd-lb-prev,
.pd-lb-next {
    position: fixed;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    z-index: 2;
}

.pd-lb-close {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.pd-lb-prev,
.pd-lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    font-size: 18px;
}

.pd-lb-prev {
    left: 20px;
}

.pd-lb-next {
    right: 20px;
}

    .pd-lb-close:hover,
    .pd-lb-prev:hover,
    .pd-lb-next:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .pd-hero {
        grid-template-columns: 1fr;
    }

    .pd-info {
        position: static;
    }

    .pd-album__grid {
        grid-template-columns: repeat(3, 1fr);
    }

        .pd-album__grid .pd-album__item:first-child {
            grid-column: span 2;
            grid-row: span 1;
        }
}

@media (max-width: 768px) {
    .pd-section {
        padding: 1.5rem 0 3rem;
    }

    .pd-info {
        padding: 1.5rem;
    }

    .pd-info__title {
        font-size: 1.2rem;
    }

    .pd-description {
        padding: 1.5rem;
    }

    .pd-album__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

        .pd-album__grid .pd-album__item:first-child {
            grid-column: span 2;
        }

    /* Always show caption on mobile */
    .pd-album__item figcaption {
        opacity: 1;
        transform: none;
    }

    .pd-lb-prev {
        left: 8px;
    }

    .pd-lb-next {
        right: 8px;
    }

    .pd-lb-prev, .pd-lb-next {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .pd-back-cta {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .pd-album__grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

        .pd-album__grid .pd-album__item:first-child {
            grid-column: span 2;
        }

    .pd-thumb {
        width: 62px;
        height: 50px;
    }

    .pd-info__actions {
        flex-direction: column;
    }

    .pd-breadcrumb span {
        max-width: 160px;
    }
}
