/* 
 * Cali Home Build - Project Pages Stylesheet
 * Styles for individual project pages
 */

/* ===== Project Banner ===== */
.project-banner {
    height: 50vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 7.5rem;
}

/* ===== Project Overview ===== */
.project-overview {
    padding: 5rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.project-overview .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

/* Top grid with image on left, details on right */
.overview-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.overview-image {
    position: relative;
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-height: 450px; /* Limit the height */
}

.featured-image {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.5s ease;
    object-fit: cover; /* Maintain aspect ratio */
}

.overview-image:hover .featured-image {
    transform: scale(1.03);
}

/* Project details styling */
.project-details {
    background-color: var(--light-color);
    border-radius: 0.8rem;
    padding: 3rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-details h3 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-align: center;
}

.detail-item {
    display: flex;
    margin-bottom: 1.5rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 700;
    width: 40%;
}

.detail-value {
    width: 60%;
}

/* Description below */
.overview-description {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.overview-description p {
    margin-bottom: 1.5rem;
}

.overview-description p:last-child {
    margin-bottom: 0;
}

/* Responsive styles */
@media (max-width: 992px) {
    .project-overview {
        padding: 4rem 0;
    }
    
    .overview-top-grid {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .project-overview {
        padding: 3rem 0;
    }
    
    .overview-top-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .overview-image {
        max-height: 350px;
    }
    
    .detail-item {
        flex-direction: column;
    }
    
    .detail-label,
    .detail-value {
        width: 100%;
    }
    
    .detail-value {
        margin-top: 0.5rem;
    }
}

/* ===== Project Gallery - Grid Style ===== */
.project-gallery {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.masonry-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.8rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4/3; /* Fixed aspect ratio for all cards */
}

.gallery-item a {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This will crop/scale the image to fill the container */
    object-position: center; /* Center the image within the container */
    display: block;
    transition: transform 0.5s ease;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
    pointer-events: none; /* Make sure clicks pass through to the link */
}

/* We no longer need these classes since all items have the same size */
.gallery-item.featured-wide,
.gallery-item.featured-tall {
    /* No special styling needed */
}

/* ===== Custom Lightbox Styles ===== */
.lb-outerContainer {
    border-radius: 8px;
}

.lb-dataContainer {
    border-radius: 0 0 8px 8px;
}

.lb-data .lb-caption {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.lb-data .lb-number {
    font-size: 14px;
    color: white;
}

.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.8;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1;
}

.lb-cancel {
    display: block;
}

.lb-closeContainer {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 9999;
}

.lb-close {
    width: 30px;
    height: 30px;
    background-size: contain;
    opacity: 0.8;
}

.lb-close:hover {
    opacity: 1;
}

/* ===== Custom Navigation Buttons ===== */
.custom-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    z-index: 10000;
    pointer-events: none;
}

.custom-lightbox-nav button {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    pointer-events: auto;
}

.custom-lightbox-nav button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.custom-lightbox-prev {
    left: 20px;
}

.custom-lightbox-next {
    right: 20px;
}

.custom-lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10000;
    pointer-events: auto;
}

.custom-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ===== Project Features ===== */
.project-features {
    padding: 5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.feature-card {
    background-color: var(--white-color);
    border-radius: 0.8rem;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 7rem;
    height: 7rem;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
}

.feature-icon i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* ===== Client Testimonial ===== */
.testimonial {
    padding: 5rem 0;
    background-color: var(--light-color);
}

.testimonial-content {
    max-width: 80rem;
    margin: 0 auto;
    text-align: center;
}

.testimonial-text {
    font-size: 2rem;
    font-style: italic;
    margin-bottom: 2rem;
    position: relative;
    padding: 0 4rem;
}

.testimonial-text:before,
.testimonial-text:after {
    content: '"';
    font-size: 6rem;
    color: var(--primary-color);
    opacity: 0.3;
    position: absolute;
    line-height: 1;
}

.testimonial-text:before {
    top: -1rem;
    left: 0;
}

.testimonial-text:after {
    bottom: -4rem;
    right: 0;
}

.client-name {
    font-weight: 700;
    color: var(--primary-color);
}

/* ===== Related Projects ===== */
.related-projects {
    padding: 5rem 0;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
}

.related-card {
    background-color: var(--white-color);
    border-radius: 0.8rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-10px);
}

.related-image {
    height: 200px;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    padding: 2rem;
    text-align: center;
}

.related-info h4 {
    margin-bottom: 0.5rem;
}

/* ===== Project CTA ===== */
.project-cta {
    padding: 8rem 0;
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
}

.project-cta h2 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
}

.project-cta p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    max-width: 70rem;
    margin-left: auto;
    margin-right: auto;
}
