/**
 * PROJECT TEMPLATES - Shared Styles
 * Premium dark theme for all inner page templates
 */

/* ================================================================
   BASE & SHARED STYLES
   ================================================================ */

.template-case-study-default,
.template-case-study-visual,
.template-case-study-deep,
.template-project-showcase {
    background: #0a0a0a;
    color: #ffffff;
    font-family: 'Instrument Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ================================================================
   BACK NAVIGATION
   ================================================================ */

.back-nav {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.82);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem 0;
}

.back-nav .container,
.back-nav .nav-container {
    display: flex !important;
    justify-content: center !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.back-link:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

.back-link svg {
    width: 18px;
    height: 18px;
}

/* ================================================================
   LOADING & ERROR STATES
   ================================================================ */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    gap: 1.5rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================================
   PROJECT SHOWCASE TEMPLATE (Aligned with Case Study)
   ================================================================ */

.template-project-showcase .project-header {
    padding: 90px 0 70px;
    position: relative;
    overflow: hidden;
}

.template-project-showcase .project-header::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(89, 166, 255, 0.06), transparent 70%);
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.template-project-showcase .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Category Badge (Replicated from Case Study) */
.template-project-showcase .category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
}

.template-project-showcase .category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
}

/* Typography Sync */
.template-project-showcase .project-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 1.5rem;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.template-project-showcase .project-description {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    margin: 0 0 2.5rem;
    max-width: 550px;
}

/* Hero Meta Pills (Case Study style) */
.template-project-showcase .hero-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.template-project-showcase .hero-pill {
    display: inline-flex;
    padding: 0.5rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
}

/* Hero CTAs (Premium White Pill style) */
.template-project-showcase .hero-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.template-project-showcase .primary-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

.template-project-showcase .primary-cta:hover {
    background: #e5e5e5;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.template-project-showcase .secondary-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.template-project-showcase .secondary-cta:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

/* Hero Image Sync */
.template-project-showcase .hero-image-wrapper {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.template-project-showcase .hero-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 1.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.template-project-showcase .hero-image-wrapper:hover .hero-image {
    transform: scale(1.03);
}

/* Main Content & Gallery Area */
.template-project-showcase .project-main-section {
    padding: 80px 0 120px;
}

.template-project-showcase .gallery-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 3.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.template-project-showcase .gallery-heading::after {
    content: '';
    height: 1px;
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
}

.template-project-showcase .gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
}

.template-project-showcase .gallery-item {
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.template-project-showcase .gallery-item:nth-child(3n+1) {
    grid-column: span 2;
}

.template-project-showcase .gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.template-project-showcase .gallery-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 70px 130px rgba(0, 0, 0, 0.6);
    border-color: rgba(89, 166, 255, 0.3);
}

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

/* Footer Section */
.template-project-showcase .project-footer {
    padding: 120px 0 160px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.template-project-showcase .btn.primary.large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 3.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    background: #ffffff;
    color: #000000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.template-project-showcase .btn.primary.large:hover {
    background: #e5e5e5;
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

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

@media (max-width: 1200px) {
    .template-project-showcase .hero-grid {
        gap: 3rem;
    }
}

@media (max-width: 1024px) {
    .template-project-showcase .hero-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .template-project-showcase .hero-text {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .template-project-showcase .project-description {
        margin-left: auto;
        margin-right: auto;
    }

    .template-project-showcase .hero-meta-pills,
    .template-project-showcase .hero-ctas {
        justify-content: center;
    }

    .template-project-showcase .hero-image-wrapper {
        order: -1;
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .template-project-showcase .project-header {
        padding: 60px 0 50px;
    }

    .template-project-showcase .project-title {
        font-size: 3rem;
    }

    .template-project-showcase .gallery-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .template-project-showcase .gallery-item:nth-child(3n+1) {
        grid-column: auto;
    }
}

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

    .template-project-showcase .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .template-project-showcase .primary-cta,
    .template-project-showcase .secondary-cta {
        width: 100%;
        justify-content: center;
    }
}