/* Portfolio Page Styles */

/* --- Hero Section --- */
.portfolio-hero {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.85) 0%, rgba(45, 74, 124, 0.80) 100%), url('../assets/images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 60vh;
    min-height: 500px;
    max-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 60px 20px;
    position: relative;
    margin: 0;
}

.portfolio-hero-content {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.portfolio-hero-label {
    display: block;
    font-size: 14px;
    color: #d4af37;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.portfolio-hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
    color: white;
}

.portfolio-hero p {
    font-size: 19px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* --- Portfolio Grid Section --- */
.portfolio-section {
    padding: 100px 20px;
    background: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    grid-auto-rows: 1fr;
}

.portfolio-grid .project-card {
    width: 100%;
}

.project-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 58, 138, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.project-info {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-info h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #1e3a8a;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px;
    line-clamp: 2;
}

.project-meta {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}

.project-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #d4af37 0%, #bf953f 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.project-featured {
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.project-badge {
    display: inline-block;
    background: #f0f9ff;
    color: #1e3a8a;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.project-architect {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    margin-bottom: 4px;
    margin-top: 4px;
    min-height: 20px;
}

.project-partner {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
    margin-bottom: 12px;
    min-height: 18px;
}

.project-architect:empty,
.project-partner:empty {
    display: block;
    margin-bottom: 4px;
}

.photo-count {
    font-size: 13px;
    color: #d4af37;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Lightbox / Gallery Modal --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-main-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 40px;
    right: 40px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.photo-counter {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 16px;
    backdrop-filter: blur(4px);
    z-index: 10001;
}

.thumbnail-strip {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    height: 80px;
    overflow-x: auto;
    padding: 10px;
    z-index: 10001;
    /* Custom scrollbar styling for webkit */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.thumbnail-container {
    display: flex;
    gap: 12px;
}

.thumbnail {
    width: 100px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0.4;
    cursor: pointer;
    transition: 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail:hover {
    opacity: 0.8;
}

.thumbnail.active {
    opacity: 1;
    border-color: #d4af37;
    transform: scale(1.05);
}

.lightbox-info {
    position: fixed;
    bottom: 40px;
    left: 40px;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 24px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    z-index: 10001;
    max-width: 300px;
}

.lightbox-info h3 {
    font-size: 18px;
    color: white;
    font-weight: 700;
    margin-bottom: 4px;
}

.lightbox-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.lightbox-project-info .architect-credit,
.lightbox-project-info .partner-credit {
    font-size: 14px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

.lightbox-project-info .partner-credit {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}


/* --- Responsive --- */
@media (max-width: 1100px) {

    /* Tablet */
    .portfolio-hero {
        height: 55vh;
        min-height: 450px;
    }

    .portfolio-hero h1 {
        font-size: 40px;
    }

    .portfolio-hero p {
        font-size: 18px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 1000px;
        gap: 24px;
    }

    .project-image {
        height: 240px;
    }

    .lightbox-arrow {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 768px) {

    /* Mobile */
    .portfolio-hero {
        height: 60vh;
        min-height: 400px;
        padding: 40px 20px;
    }

    .portfolio-hero h1 {
        font-size: 32px;
    }

    .portfolio-hero p {
        font-size: 16px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .portfolio-section {
        padding: 60px 20px;
    }

    .lightbox-arrow {
        width: 48px;
        height: 48px;
        background: rgba(0, 0, 0, 0.5);
        /* Better visibility on mobile */
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
    }

    .photo-counter {
        top: 20px;
    }

    .lightbox-info {
        display: none;
        /* Hide info on small screens to save space */
    }

    .thumbnail-strip {
        display: none;
        /* Hide thumbnails on mobile for cleaner UX */
    }

    .lightbox-main-image {
        max-width: 100vw;
        max-height: 70vh;
    }
}