/* ============================================
   PROJECT DETAIL PAGE STYLES
   ============================================ */

/* Page Section */
.page-progetto {
    min-height: 100vh;
}

/* Loading & Error States */
.loading-container,
.error-container {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.loading-container p {
    margin-top: 1rem;
    color: #666;
    font-size: 1.1rem;
}

.spinner-loader {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent, #6c63ff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-content i {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-content h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
    color: #333;
}

.error-content p {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Hero Section */
.project-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    padding: 80px 0 60px;
    overflow: hidden;
}

.project-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.project-hero .hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.2) 100%);
}

.project-hero .hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.back-link:hover {
    color: white;
}

.back-link i {
    transition: transform 0.3s ease;
}

.back-link:hover i {
    transform: translateX(-4px);
}

.project-category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: white;
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

.project-client {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
    display: none;
}

.project-client i {
    margin-right: 8px;
}

/* Hide tags section */
#projectTagsSection {
    display: none !important;
}

/* Hide results section */
#projectResultsSection {
    display: none !important;
}

/* Navigation button styles */
.nav-prev, .nav-next {
    opacity: 1;
    transition: opacity 0.3s;
}

.nav-prev:hover, .nav-next:hover {
    opacity: 0.7;
}

/* Project Details */
.project-details {
    padding: 60px 0;
    background: #f8f9fa;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

@media (max-width: 992px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
    
    .project-sidebar {
        order: -1;
    }
}

/* Main Content */
.project-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.project-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-section h2 i {
    color: var(--accent, #6c63ff);
}

.project-description {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
    white-space: pre-wrap;
}

/* ============================================
   PROJECT DETAIL PAGE - CLEAN & SIMPLE
   ============================================ */

/* Main Container - Single Column Layout */
.project-details {
    padding: 40px 0 60px;
    background: #f8f9fa;
    min-height: 80vh;
}

.project-details .container {
    max-width: none;
    margin: 0 auto;
    padding: 0 20px;
}

/* Project Card - Clean Design */
.project-details .project-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.project-details .project-section h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Description */
.project-description {
    color: #555;
    line-height: 1.8;
    font-size: 1.05rem;
    white-space: pre-wrap;
}

/* Gallery - Simple Grid */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.gallery-image {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.03);
}

.gallery-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Results Section */
.project-results {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 30px;
    color: white;
    margin-bottom: 24px;
    display:none
}

.project-results h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.results-content {
    color: rgba(255,255,255,0.9);
    line-height: 1.7;
}

/* Tags - Clean Style */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-list .tag {
    padding: 8px 16px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.3s ease;
}

.tags-list .tag:hover {
    background: #667eea;
    color: white;
}

/* Social Links */
.social-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-links-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f0f0f0;
    border-radius: 25px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-links-list a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.social-links-list a i {
    font-size: 1.2rem;
}

/* Navigation - Simple */
.project-navigation {
    padding: 30px 0;
    background: white;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    background: #f5f5f5;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background: #667eea;
    color: white;
}

.nav-all {
    background: #1a1a2e !important;
    color: white !important;
}

.nav-links a:hover {
    background: #f5f5f5;
    color: var(--accent, #6c63ff);
}

.nav-prev i {
    margin-right: 5px;
}

.nav-next i {
    margin-left: 5px;
}

.nav-all {
    background: var(--accent, #6c63ff);
    color: white !important;
}

.nav-all:hover {
    background: #5a52d5 !important;
    color: white !important;
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
    }
    
    .nav-links a {
        width: 100%;
        justify-content: center;
    }
    
    .nav-all {
        order: -1;
    }
    
    .project-hero {
        min-height: 40vh;
        padding: 60px 0 40px;
    }
    
    .project-hero h1 {
        font-size: 1.5rem;
    }
    
    .project-client {
        font-size: 1rem;
    }
    
    .project-details {
        padding: 40px 0;
    }
    
    .project-section,
    .project-card {
        padding: 1.5rem;
    }
    
    .project-section h2 {
        font-size: 1.2rem;
    }
    
    .project-section p {
        font-size: 0.9rem;
    }
    
    .project-card h3 {
        font-size: 1.1rem;
    }
    
    .project-card p {
        font-size: 0.85rem;
    }
    
    .social-links-list a {
        font-size: 0.9rem;
    }
}

/* Animation for page load */
.page-progetto #projectContent {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
