/* project.css */

/* Hero section for projects */
.project-hero {
    background: var(--color-primary-dark, #10331E);
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.project-title {
    color: var(--color-white, #fff) !important;
    font-size: 3.5rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.project-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
}

/* Projects Grid */
.project-gallery {
    padding: 60px 0 100px;
    background: var(--color-white, #fff);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

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

@media (max-width: 576px) {
    .projects-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
    }
}

/* Card Styling */
.project-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
    aspect-ratio: 1 / 1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.08); /* Zoom effect */
    filter: brightness(0.65); /* Dimming effect */
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 25px 20px;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-card-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    transform: translateY(15px);
    transition: transform 0.3s ease;
    font-family: var(--font-sans, sans-serif);
}

.project-card:hover .project-card-title {
    transform: translateY(0);
}


/* Lightbox Modal (Fullscreen Overlay) */
.project-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    z-index: 4000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.project-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.project-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 45px;
    cursor: pointer;
    z-index: 4010;
    transition: color 0.3s ease;
    line-height: 1;
}

.project-lightbox-close:hover {
    color: #fff;
}

.project-lightbox-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Lightbox Slider container */
.project-lightbox-slider {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.project-lightbox-img-wrapper {
    position: relative;
    max-width: 100%;
}

/* Image restrictions */
.project-lightbox-slider img {
    max-width: 100%;
    max-height: 65vh; /* Keep it nicely within viewport taking info into account */
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    display: block;
}

.project-lightbox-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    pointer-events: none;
    font-weight: 500;
    letter-spacing: 1px;
}

/* Buttons (Arrows) */
.project-lightbox-prev,
.project-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 4010;
    backdrop-filter: blur(4px);
}

.project-lightbox-prev:hover,
.project-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Position arrows safely inside bounds on mobile, outside on desktop */
.project-lightbox-prev { left: -70px; }
.project-lightbox-next { right: -70px; }

@media (max-width: 900px) {
    .project-lightbox-prev { left: -10px; }
    .project-lightbox-next { right: -10px; }
    .project-lightbox-content { padding: 0 15px; }
}

/* Lightbox Info container (Strictly below image) */
.project-lightbox-info {
    text-align: center;
    color: #fff;
    margin-top: 30px;
    max-width: 800px;
    width: 100%;
}

.project-lightbox-info h3 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 12px;
    font-family: var(--font-sans, sans-serif);
    font-weight: 600;
}

.project-lightbox-info p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Maximum 4 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-lightbox-video {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 12px 28px;
    font-size: 0.95rem;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
}

.project-lightbox-video:hover {
    background: #fff;
    color: #000;
    transform: translateY(-2px);
}

/* Video Player Modal */
.video-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 50px;
    cursor: pointer;
    z-index: 5010;
    transition: color 0.3s ease;
    line-height: 1;
}

.video-modal-close:hover {
    color: #E8DFCA;
}

.video-modal-player {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    outline: none;
    background: #000;
}
