/* ===================================================
   UNIVERSAL PROJECT DETAIL TEMPLATE - STYLES
   Reusable CSS for all project pages
   =================================================== */

/* ===== 1. HERO SECTION STYLING ===== */
.project-hero {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.08), rgba(156, 163, 175, 0.08));
    padding: 5rem 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.project-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.project-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* METADATA ROW */
.project-metadata {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.meta-item,
.project-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.meta-item i,
.project-status i {
    font-size: 1.125rem;
    color: var(--primary-color);
}

.project-status {
    background: rgba(107, 114, 128, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    color: var(--primary-color);
}

/* CTA BUTTONS */
.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* ===== 2. SETUP SECTION (CONTEXT GRID) ===== */
.project-setup {
    padding: 5rem 20px;
    background: white;
}

.setup-container {
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.setup-column h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.setup-column p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.0625rem;
}

/* TECH STACK BADGES */
.tech-stack-badges {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(107, 114, 128, 0.1);
    color: var(--primary-color);
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

.tech-badge i {
    font-size: 1rem;
}

/* ===== 3. SHOWCASE SECTION (DEMO) ===== */
.project-showcase {
    padding: 5rem 20px;
    background: var(--light-bg);
}

.showcase-container {
    max-width: 1000px;
    margin: 0 auto;
}

.showcase-media {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: white;
}

.placeholder-media {
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.05), rgba(156, 163, 175, 0.05));
    color: var(--text-lighter);
    gap: 1rem;
}

.placeholder-media i {
    font-size: 3.5rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.placeholder-media p {
    font-size: 1.125rem;
    font-weight: 600;
}

.showcase-media img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.showcase-media img:hover {
    transform: scale(1.02);
}

.showcase-media iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.showcase-caption {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== IMAGE CAROUSEL ===== */
.carousel-container {
    position: relative;
    margin: 0 auto 2rem;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: white;
    max-width: 600px;
    margin: 0 auto;
}

.carousel-slide {
    display: none;
    width: 100%;
}

.carousel-slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.carousel-slide img:hover {
    transform: scale(1.02);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 10;
    border-radius: 0.375rem;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
}

.carousel-dot.active {
    background: white;
}

/* ===== 4. JOURNEY SECTION (TECHNICAL DEEP DIVE) ===== */
.project-journey {
    padding: 5rem 20px;
    background: white;
}

.journey-container {
    max-width: 1200px;
    margin: 0 auto;
}

.journey-section {
    margin-bottom: 4rem;
}

.journey-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.journey-section p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.0625rem;
    margin-bottom: 2rem;
}

/* ARCHITECTURE DIAGRAM */
.architecture-diagram {
    width: 100%;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.architecture-diagram img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BEHIND THE SCENES GRID */
.behind-scenes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.scene-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.scene-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.scene-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.scene-card img:hover {
    transform: scale(1.02);
}

.scene-card p {
    padding: 1.5rem;
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    background: var(--light-bg);
    margin: 0;
}

/* CODE BLOCK */
.code-block {
    background: #1e293b;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 2rem;
    box-shadow: var(--shadow-md);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-lang {
    color: #94a3b8;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.code-copy {
    color: #94a3b8;
    cursor: pointer;
    transition: var(--transition);
}

.code-copy:hover {
    color: #cbd5e1;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== LIGHTBOX MODAL ===== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 0.5rem;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--grey-light);
}

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

/* ===== 5. CREW SECTION (COLLABORATION) ===== */
.project-crew {
    padding: 5rem 20px;
    background: var(--light-bg);
}

.crew-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.crew-container h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.crew-container > p {
    color: var(--text-light);
    font-size: 1.0625rem;
    margin-bottom: 3rem;
}

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

.collaborator-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

.collaborator-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.collaborator-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.collaborator-role {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.collaborator-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.collaborator-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.125rem;
    transition: var(--transition);
}

.collaborator-links a:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== 6. RESOLUTION SECTION (KEY INSIGHTS) ===== */
.project-resolution {
    padding: 5rem 20px;
    background: white;
}

.resolution-container {
    max-width: 1200px;
    margin: 0 auto;
}

.resolution-container h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    text-align: center;
}

.resolution-container > p {
    text-align: center;
    color: var(--text-light);
    font-size: 1.0625rem;
    margin-bottom: 3rem;
}

/* INSIGHTS METRICS GRID */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.insight-card {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.08), rgba(156, 163, 175, 0.08));
    padding: 2.5rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid rgba(107, 114, 128, 0.2);
    transition: var(--transition);
}

.insight-card:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(156, 163, 175, 0.15));
}

.insight-metric {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.insight-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* KEY LEARNINGS */
.key-learnings {
    background: var(--light-bg);
    padding: 2.5rem;
    border-radius: 1rem;
}

.key-learnings h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.key-learnings ul {
    list-style-position: inside;
    color: var(--text-light);
    line-height: 2;
}

.key-learnings li {
    margin-bottom: 0.75rem;
    font-size: 1.0625rem;
}

/* ===== 7. OUTRO SECTION (FOOTER NAVIGATION) ===== */
.project-outro {
    padding: 5rem 20px;
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.05), rgba(156, 163, 175, 0.05));
}

.outro-container {
    max-width: 1200px;
    margin: 0 auto;
}

.outro-download {
    text-align: center;
    margin-bottom: 4rem;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
    white-space: normal;
    max-width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* PREVIOUS/NEXT PROJECT NAVIGATION */
.project-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.nav-project {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: var(--transition);
}

.nav-project:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.nav-project.prev-project {
    text-align: left;
}

.nav-project.next-project {
    text-align: right;
}

.nav-label {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-title {
    color: var(--text-dark);
    font-weight: 700;
    font-size: 1.125rem;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .project-hero {
        padding: 3rem 20px;
    }

    .project-title {
        font-size: 2rem;
    }

    .project-subtitle {
        font-size: 1.0625rem;
    }

    .project-metadata {
        gap: 1.5rem;
    }

    .hero-cta {
        gap: 1rem;
    }

    .setup-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .showcase-media {
        height: 300px;
    }

    .behind-scenes-grid {
        grid-template-columns: 1fr;
    }

    .project-navigation {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .nav-project.next-project {
        text-align: left;
    }

    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .journey-section h2 {
        font-size: 1.5rem;
    }

    .project-setup,
    .project-showcase,
    .project-journey,
    .project-crew,
    .project-resolution,
    .project-outro {
        padding: 3rem 20px;
    }
}

@media (max-width: 480px) {
    .project-title {
        font-size: 1.5rem;
    }

    .project-subtitle {
        font-size: 0.95rem;
    }

    .project-metadata {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .showcase-media {
        height: 200px;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .insight-metric {
        font-size: 2rem;
    }

    .collaborators-grid {
        grid-template-columns: 1fr;
    }

    .code-block {
        font-size: 0.85rem;
    }

    .code-block pre {
        padding: 1rem;
    }

    .architecture-diagram {
        height: 250px;
    }
}
