/* ---
   Project Detail Page Styles for Mahadeva Arc
   Version: FINAL_v3
--- */

/* --- Project Hero Section --- */
.project-hero { height: 75vh; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; background-color: #000; }
.project-hero::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(17, 24, 39, 1) 0%, rgba(17, 24, 39, 0.2) 100%); z-index: 2; }
.project-hero-content { position: relative; z-index: 3; color: var(--text-light); }
.project-hero-content h1 { font-size: 5rem; margin: 0; }
.project-hero-content p { font-size: 1.5rem; color: var(--text-medium); margin-top: 0.5rem; }

/* --- Quick Facts Bar --- */
.quick-facts-bar { background-color: var(--bg-medium); padding: 1.5rem 5%; border-bottom: 1px solid #374151; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.fact-item { color: var(--text-medium); display: flex; align-items: center; gap: 1rem; justify-content: center; }
.fact-item svg { width: 32px; height: 32px; stroke: var(--accent-color); flex-shrink: 0; }
.fact-item .fact-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.fact-item .fact-value { font-size: 1.2rem; color: var(--text-light); font-weight: 500; margin-top: 0.25rem; }

/* --- Main Project Content --- */
.project-details .container { padding-top: 5rem; }
.back-to-portfolio { display: inline-block; margin-bottom: 3rem; padding: 0.8rem 1.5rem; border: 1px solid #4B5563; border-radius: 50px; color: var(--text-light); text-decoration: none; transition: all 0.3s ease; font-weight: 500; font-size: 0.9rem; }
.back-to-portfolio:hover { background-color: var(--accent-color); border-color: var(--accent-color); color: var(--bg-dark); }
.project-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 4rem; align-items: start; }
.project-section { margin-bottom: 4rem; }
.project-section h2 { text-align: left; font-size: 2.5rem; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--accent-color); display: inline-block; }
.project-description p { color: var(--text-medium); line-height: 1.9; margin-bottom: 1.5rem; }

/* --- Sticky Sidebar & Enquiry Form --- */
.project-sidebar { position: relative; }
.sidebar-sticky-content { position: -webkit-sticky; position: sticky; top: 120px; }
.sidebar-form-wrapper { background-color: var(--bg-medium); border: 1px solid #374151; border-top: 4px solid var(--accent-color); border-radius: 10px; padding: 2rem; margin-top: 2rem; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.sidebar-form-wrapper h4 { font-size: 1.8rem; text-align: center; margin-bottom: 0.5rem; }
.sidebar-form-wrapper p { font-size: 0.9rem; text-align: center; color: var(--text-medium); margin-bottom: 1.5rem; }
.sidebar-form-wrapper .form-group { margin-bottom: 1.5rem; } /* MODIFICATION: Increased margin */
.sidebar-form-wrapper input { padding: 1rem; }

/* --- Amenities Section --- */
.amenities-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.amenity { display: flex; align-items: center; gap: 1rem; background-color: var(--bg-medium); padding: 1.2rem; border-radius: 5px; }
.amenity svg { width: 32px; height: 32px; stroke: var(--accent-color); flex-shrink: 0; }
.amenity span { color: var(--text-light); font-size: 0.9rem; }

/* --- Floor Plans Section --- */
.floor-plan-tabs { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; border-bottom: 1px solid #374151; }
.tab-btn { background: transparent; border: none; color: var(--text-medium); padding: 1rem 1.5rem; cursor: pointer; font-size: 1rem; font-family: var(--body-font); position: relative; transition: color 0.3s ease; text-align: center; }
.tab-btn::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 2px; background-color: var(--accent-color); transform: scaleX(0); transition: transform 0.3s ease; }
.tab-btn.active { color: var(--text-light); }
.tab-btn.active::after { transform: scaleX(1); }
.plan-content[hidden] { display: none; }
.plan-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: center; background-color: var(--bg-medium); padding: 2rem; border-radius: 10px; }
.plan-layout > div:not(.clickable-lightbox-container) { display: flex; flex-direction: column; height: 100%; }
.plan-layout .clickable-lightbox-container { max-height: 450px; background-color: #fff; border-radius: 10px; display: flex; }
.plan-layout .expandable-image { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.plan-details { list-style: none; padding: 0; margin: 0; flex-grow: 1; }
.plan-details li { color: var(--text-medium); padding: 0.75rem 0; border-bottom: 1px solid #374151; word-wrap: break-word; }
.plan-details li:last-child { border-bottom: none; }
.plan-details li strong { color: var(--text-light); font-weight: 500; }
.pdf-download { margin-top: 1.5rem; padding: 0.8rem 1.5rem; font-size: 0.9rem; text-align: center; width: 100%; }

/* --- Gallery & Expandable Images --- */
.gallery-item, .clickable-lightbox-container { position: relative; overflow: hidden; cursor: pointer; }
.image-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(17, 24, 39, 0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.4s ease; }
.gallery-item:hover .image-overlay,
.clickable-lightbox-container:hover .image-overlay { opacity: 1; }
.overlay-text { color: var(--text-light); font-weight: 500; font-size: 1.1rem; transform: translateY(10px); transition: transform 0.4s ease; }
.gallery-item:hover .overlay-text,
.clickable-lightbox-container:hover .overlay-text { transform: translateY(0); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.05); }

/* --- Lightbox Styles for Scrolling --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: flex;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    overflow-y: auto;
    padding: 5vh 2vw;
}
.lightbox.show { opacity: 1; visibility: visible; }
.lightbox-content {
    position: relative;
    max-width: 90%;
    width: auto;
    margin: auto 0;
}
.lightbox-content img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.lightbox-close { position: absolute; top: -16px; right: -16px; cursor: pointer; border: none; background-color: var(--bg-dark); z-index: 3001; padding: 0; color: white; transition: transform 0.3s ease, color 0.3s ease; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.lightbox-close svg { width: 24px; height: 24px; }
.lightbox-close:hover { transform: rotate(90deg); color: var(--accent-color); }
.lightbox-prev, .lightbox-next { position: fixed; top: 50%; transform: translateY(-50%); cursor: pointer; border: none; background-color: rgba(17, 24, 39, 0.5); z-index: 3001; padding: 0; color: white; transition: all 0.3s ease; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev svg, .lightbox-next svg { width: 24px; height: 24px; }
.lightbox-prev:hover, .lightbox-next:hover { background-color: var(--accent-color); color: var(--bg-dark); }

/* --- Location Section --- */
.location-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: center; }
.map-container { height: 400px; border-radius: 10px; overflow: hidden; }
.map-container iframe { width: 100%; height: 100%; border: 0; }
.nearby-places ul { list-style: none; padding: 0; }
.nearby-places li { padding: 0.8rem 0; border-bottom: 1px solid #374151; }

/* --- Responsive for Project Page --- */
@media(max-width: 992px) {
    .project-layout, .location-layout, .plan-layout { 
        grid-template-columns: 1fr; 
        gap: 2.5rem;
    }
}
@media(max-width: 768px) {
    .project-hero h1 { font-size: 3rem; }
    .project-hero p { font-size: 1.2rem; }
    .sidebar-sticky-content { position: static; }
    .sidebar-form-wrapper { 
        margin-top: 4rem; 
        max-width: 100%;
        margin-left: auto; 
        margin-right: auto; 
    }
    .amenities-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

@media(max-width: 576px) {
    .quick-facts-bar {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 1rem;
    }
    .fact-item {
        justify-content: flex-start;
    }
    .project-section h2 {
        display: block;
        text-align: center;
        border-bottom: none;
    }
    .project-section h2::after {
        content: '';
        display: block;
        width: 80px;
        height: 1px;
        background-color: var(--accent-color);
        margin: 1rem auto 0;
    }
    .back-to-portfolio {
        display: block;
        text-align: center;
    }
    .plan-layout {
        padding: 1.5rem 1rem;
    }
    .sidebar-form-wrapper {
        padding: 1.5rem;
    }
}
