/* ============================================
   PROGETTO (Project Detail) — Page-specific styles
   ============================================ */

/* Project Hero */
.project-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.project-hero-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

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

.project-hero-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44, 62, 44, 0.85) 0%, rgba(44, 62, 44, 0.3) 60%, transparent 100%);
}

.project-hero-content {
    position: relative;
    z-index: 1;
    padding: 3rem 5%;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    color: white;
}

.project-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-hero-tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-hero-tags span {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    font-size: 0.85rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Project Overview */
.project-overview {
    padding: 5rem 5%;
    background: var(--cream);
}

.project-overview-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 4rem;
    align-items: start;
}

.project-description h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1.5rem;
    color: var(--earth-dark);
    text-align: center;
}

.project-description p {
    color: var(--earth-medium);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
}

/* Metadata Sidebar */
.project-meta {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-light);
    position: sticky;
    top: 100px;
}

.project-meta h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--earth-dark);
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.meta-item:last-child {
    border-bottom: none;
}

.meta-label {
    color: var(--earth-medium);
    font-weight: 500;
}

.meta-value {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
}

/* Before/After Section */
.project-comparison {
    padding: 5rem 5%;
    background: var(--sand);
}

.project-comparison h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 1rem;
    color: var(--earth-dark);
}

.project-comparison > p {
    text-align: center;
    color: var(--earth-medium);
    margin-bottom: 3rem;
}

.project-slider-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Project Gallery */
.project-gallery-section {
    padding: 5rem 5%;
    background: var(--sand);
}

.project-gallery-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 1rem;
    color: var(--earth-dark);
}

.project-gallery-section > p {
    text-align: center;
    color: var(--earth-medium);
    margin-bottom: 3rem;
}

.project-gallery {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 260px);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: zoom-in;
    margin: 0;
    box-shadow: 0 6px 20px rgba(44, 62, 44, 0.12);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover,
.gallery-item:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(44, 62, 44, 0.2);
    outline: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
    transform: scale(1.06);
}

.gallery-item--large {
    grid-row: span 2;
}

@media (max-width: 768px) {
    .project-gallery {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(3, 240px);
    }
    .gallery-item--large {
        grid-row: span 1;
    }
    .project-gallery-section {
        padding: 4rem 1.25rem;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 20, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.lightbox.is-open {
    display: flex;
    animation: lightboxFade 0.25s ease;
}

@keyframes lightboxFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-image {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 2rem;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Process Timeline */
.project-process {
    padding: 5rem 5%;
    background: var(--cream);
}

.project-process h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--earth-dark);
}

.process-timeline {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.process-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--earth-medium);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
}

.step-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--earth-dark);
}

.step-content p {
    color: var(--earth-medium);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Prev/Next Navigation */
.project-nav {
    padding: 3rem 5%;
    background: var(--sand);
    border-top: 1px solid var(--border-light);
}

.project-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.project-nav a {
    color: var(--earth-medium);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-nav a:hover {
    color: var(--terracotta);
}

.project-nav-back {
    padding: 0.6rem 1.25rem;
    background: var(--cream);
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

/* CTA */
.project-cta {
    padding: 5rem 5%;
    background: var(--cream);
    text-align: center;
}

.project-cta h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: var(--earth-dark);
}

.project-cta p {
    color: var(--earth-medium);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .project-overview-grid {
        grid-template-columns: 1fr;
    }

    .project-meta {
        position: static;
    }
}

@media (max-width: 768px) {
    .project-hero {
        min-height: 300px;
    }

    .project-hero-content {
        padding: 2rem 1.25rem;
    }

    .project-overview,
    .project-comparison,
    .project-process,
    .project-cta {
        padding: 4rem 1.25rem;
    }

    .project-nav-inner {
        flex-direction: column;
    }
}
