/* --- GLOBAL --- */
.text-gradient {
    background: linear-gradient(135deg, #595CFF 0%, #22d3ee 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* --- HERO SHOWREEL --- */
.portfolio-hero {
    position: relative; height: 80vh; min-height: 600px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #0f172a; color: white;
}
.hero-video-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0.4; mix-blend-mode: luminosity;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, #0f172a 0%, transparent 100%);
}
.hero-content {
    position: relative; z-index: 10; text-align: center; max-width: 800px;
}

/* --- FILTER BAR (STICKY) --- */
.filter-bar {
    position: sticky; top: 80px; z-index: 40;
    background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0; padding: 1.5rem 0;
    margin-bottom: 4rem; transition: all 0.3s;
}
.filter-btn {
    padding: 0.6rem 1.5rem; border-radius: 99px; font-size: 0.9rem; font-weight: 600;
    color: #64748b; border: 1px solid transparent; background: transparent;
    transition: all 0.3s ease; cursor: pointer; margin: 0 0.5rem;
}
.filter-btn:hover { color: #595CFF; background: #eff6ff; }
.filter-btn.active {
    background: #0f172a; color: white; border-color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

/* --- GALLERY GRID (MASONRY FEEL) --- */
.gallery-grid {
    display: grid; grid-template-columns: repeat(1, 1fr); gap: 2rem;
    padding-bottom: 4rem;
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

/* Project Card */
.project-card {
    position: relative; border-radius: 1.5rem; overflow: hidden;
    background: #f1f5f9; cursor: pointer; aspect-ratio: 4/3;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}
/* Scale effect on filtering */
.project-card.hidden { display: none; }
.project-card.anim-in { animation: popIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

.project-card:hover { transform: translateY(-10px); z-index: 10; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.2); }

.project-img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.7s ease; filter: saturate(0);
}
.project-card:hover .project-img { transform: scale(1.1); filter: saturate(1); }

.project-info {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 2rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white; transform: translateY(20px); opacity: 0; transition: all 0.4s ease;
}
.project-card:hover .project-info { transform: translateY(0); opacity: 1; }

.project-cat {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: #22d3ee; margin-bottom: 0.5rem; display: block;
}
.project-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 0.5rem; }

/* --- FEATURED SPOTLIGHT SECTION --- */
.featured-section {
    background: #0f172a; color: white; padding: 6rem 0; position: relative; overflow: hidden;
}
.featured-grid {
    display: grid; grid-template-columns: 1fr; gap: 4rem; align-items: center; position: relative; z-index: 10;
}
@media (min-width: 1024px) { .featured-grid { grid-template-columns: 1.5fr 1fr; } }

.featured-image-wrap {
    border-radius: 2rem; overflow: hidden; box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1); position: relative;
}
.featured-image { width: 100%; display: block; transition: transform 0.5s; }
.featured-image-wrap:hover .featured-image { transform: scale(1.05); }

/* --- 3D CTA (REUSED) --- */
.cta-3d-container { perspective: 1000px; padding: 6rem 1rem; }
.cta-3d-card {
    background: linear-gradient(135deg, #595CFF 0%, #22d3ee 100%);
    border-radius: 2.5rem; padding: 5rem 2rem; text-align: center; color: white;
    position: relative; overflow: hidden; transform-style: preserve-3d;
    transition: transform 0.1s ease-out; box-shadow: 0 25px 50px -12px rgba(89, 92, 255, 0.4);
}
.cta-content { transform: translateZ(60px); }
.cta-glow {
    position: absolute; width: 400px; height: 400px; background: rgba(255,255,255,0.3);
    border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%);
    filter: blur(80px); mix-blend-mode: overlay; transition: opacity 0.3s; opacity: 0;
}

/* --- ANIMATIONS --- */
@keyframes popIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.fade-up { opacity: 0; transform: translateY(30px); transition: all 0.6s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.portfolio-grid {
    scroll-margin-top: 180px; /* Prostor za Sticky Header + Filter Bar */
}