 * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
            line-height: 1.6;
            color: #2c3e50;
            background: #f8fafc;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        /* Hero Section */
        .hero {
            background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
            color: white;
            padding: 80px 0;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        
        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
        }
        
        .hero-content {
            position: relative;
            z-index: 1;
        }
        
        .hero h1 {
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 20px;
            line-height: 1.2;
        }
        
        .hero .subtitle {
            font-size: 1.2rem;
            margin-bottom: 30px;
            opacity: 0.9;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .hero-stats {
            display: flex;
            justify-content: center;
            gap: 40px;
            margin-top: 40px;
        }
        
        .stat {
            text-align: center;
        }
        
        .stat-number {
            font-size: 2rem;
            font-weight: 700;
            display: block;
        }
        
        .stat-label {
            font-size: 0.9rem;
            opacity: 0.8;
        }
        
        /* Filter Section */
        .filters {
            background: white;
            padding: 30px 0;
            border-bottom: 1px solid #e5e7eb;
            position: sticky;
            top: 0;
            z-index: 100;
        }
        
        .filter-container {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .filter-btn {
            background: #f3f4f6;
            border: 2px solid transparent;
            padding: 10px 20px;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
            color: #374151;
        }
        
        .filter-btn:hover,
        .filter-btn.active {
            background: #4f46e5;
            color: white;
            border-color: #4f46e5;
        }
        
        /* Portfolio Grid */
        .portfolio {
            padding: 60px 0;
            background: #f8fafc;
        }
        
        .portfolio-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
            gap: 40px;
        }
        
        .portfolio-grid > .portfolio-link {
  display: block;       /* ja ho tens, ho reafirmem */
  height: 100%;
}
        
        .portfolio-item {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            position: relative;
             height: 100%;
  display: flex;
  flex-direction: column;
        }
        
        .portfolio-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        }
        
        .portfolio-image {
            width: 100%;
            height: 220px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            position: relative;
            overflow: hidden;
        }
        
        .portfolio-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .project-type {
            position: absolute;
            top: 15px;
            right: 15px;
            background: rgba(255, 255, 255, 0.95);
            color: #4f46e5;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
        }
        
        .portfolio-content {
            padding: 25px;
              display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
        }
        
        .portfolio-title {
            font-size: 1.3rem;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 10px;
        }
        
        .portfolio-category {
            color: #6b7280;
            font-size: 0.9rem;
            margin-bottom: 15px;
        }
        
        .portfolio-description {
            color: #374151;
            margin-bottom: 20px;
            line-height: 1.6;
        }
        
        .results {
            background: #f8fafc;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 20px;
        }
        
        .results h4 {
            color: #1f2937;
            font-size: 0.9rem;
            margin-bottom: 8px;
        }
        
        .result-metrics {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
        }
        
        .metric {
            flex: 1;
            min-width: 80px;
        }
        
        .metric-value {
            color: #10b981;
            font-weight: 700;
            font-size: 1.1rem;
        }
        
        .metric-label {
            color: #6b7280;
            font-size: 0.8rem;
        }
        
        .portfolio-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
             margin-top: auto;
            margin-bottom: 20px;
        }
        
        .tag {
            background: #e0e7ff;
            color: #4f46e5;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.8rem;
        }
        
        .portfolio-link {
            color: #4f46e5;
            text-decoration: none;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        
        .portfolio-link:hover {
            text-decoration: underline;
        }
        
        /* Before/After Section */
        .before-after {
            padding: 80px 0;
            background: white;
        }
        
        .before-after h2 {
            text-align: center;
            font-size: 2.5rem;
            color: #1f2937;
            margin-bottom: 20px;
        }
        
        .before-after-intro {
            text-align: center;
            color: #6b7280;
            margin-bottom: 50px;
            max-width: 600px;
            margin-left: auto;
            margin-right: auto;
        }
        
        .comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

        
        .comparison-item {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    position: relative;
}

.comparison-item.before {
    border: 2px solid #fca5a5;
}

.comparison-item.after {
    border: 2px solid #86efac;
}
        
        .comparison-item h3 {
            margin-bottom: 20px;
            font-size: 1.3rem;
        }
        
        .comparison-item.before h3 {
            color: #dc2626;
        }
        
        .comparison-item.after h3 {
            color: #10b981;
        }
        
.comparison-image {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 2px solid #e5e7eb;
}
        
        .comparison-metrics {
            display: grid;
            gap: 10px;
        }
        
   .comparison-metric {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
}
        
        .comparison-metric.improved {
            background: #f0fdf4;
            border-left: 3px solid #10b981;
        }
        
        .comparison-metric.warning {
            background: #fef2f2;
            border-left: 3px solid #dc2626;
        }
        
        /* CTA Section */
        .cta {
            background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
            color: white;
            padding: 60px 0;
            text-align: center;
        }
        
        .cta h2 {
            font-size: 2.2rem;
            margin-bottom: 20px;
        }
        
        .cta p {
            font-size: 1.1rem;
            margin-bottom: 30px;
            opacity: 0.9;
        }
        
        .cta-button {
            background: #4f46e5;
            color: white;
            border: none;
            padding: 15px 40px;
            border-radius: 50px;
            font-weight: 600;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-block;
        }
        
        .cta-button:hover {
            background: #4338ca;
            transform: translateY(-2px);
        }
        
        /* Sobrescriure l'estil per als enllaços del portfolio */
a.portfolio-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.portfolio-link:hover {
    color: inherit;
    text-decoration: none;
}


.portfolio-item.hidden {
    display: none !important;
}

.portfolio-link.hidden { display: none !important; }

        
        /* Responsive */
        @media (max-width: 768px) {
            .hero h1 {
                font-size: 2.2rem;
            }
            
            .hero-stats {
                flex-direction: column;
                gap: 20px;
            }
            
            .filter-container {
                justify-content: center;
            }
            
            .portfolio-grid {
                grid-template-columns: 1fr;
            }
            
            .comparison {
                grid-template-columns: 1fr;
            }
            
            .result-metrics {
                justify-content: center;
            }
            
            .container {
                padding: 0 15px;
            }
        }
        
        /* JavaScript functionality styles */
        .portfolio-item.hidden {
            display: none;
        }
        
        .fade-in {
            animation: fadeIn 0.5s ease-in;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }