/* =====================================================
   Rastlaus Portfolio Manager v2.0 — Frontend CSS
   ===================================================== */

:root {
  --rpm-pink: #e0175a;
  --rpm-pink-glow: rgba(224,23,90,0.35);
  --rpm-bg: #0d0d0d;
  --rpm-card: #111;
  --rpm-border: rgba(255,255,255,0.06);
  --rpm-text: #fff;
  --rpm-muted: rgba(255,255,255,0.55);
  --rpm-radius: 8px;
  --rpm-ease: 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* ── Wrap ── */
.rpm-portfolio {
  background: var(--rpm-bg);
  padding: 60px 20px 80px;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  color: var(--rpm-text);
}

/* ── Filters ── */
.rpm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 40px;
}

.rpm-filter {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--rpm-muted);
  padding: 8px 22px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}
.rpm-filter:hover { border-color: var(--rpm-pink); color: #fff; }
.rpm-filter.active { background: var(--rpm-pink); border-color: var(--rpm-pink); color: #fff; }

/* ── Grid ── */
.rpm-grid {
  display: grid;
  gap: 12px;
}
.rpm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rpm-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rpm-cols-4 { grid-template-columns: repeat(4, 1fr); }
.rpm-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Card ── */
.rpm-card {
  background: var(--rpm-card);
  border-radius: var(--rpm-radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--rpm-ease), box-shadow var(--rpm-ease);
  position: relative;
}
.rpm-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0,0,0,0.7);
}
.rpm-card.rpm-hidden { display: none !important; }

/* Thumbnail */
.rpm-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #1a1a1a;
}
.rpm-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--rpm-ease), opacity var(--rpm-ease);
}
.rpm-card:hover .rpm-card-thumb img {
  transform: scale(1.06);
  opacity: 0.7;
}

/* Placeholder */
.rpm-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #333;
}

/* Overlay */
.rpm-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.15) 55%, transparent 100%);
  opacity: 0;
  transition: opacity var(--rpm-ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.rpm-card:hover .rpm-overlay { opacity: 1; }

/* Play button */
.rpm-play {
  width: 54px; height: 54px;
  background: var(--rpm-pink);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px var(--rpm-pink-glow);
  transform: scale(0.75);
  transition: transform var(--rpm-ease);
  flex-shrink: 0;
}
.rpm-card:hover .rpm-play { transform: scale(1); }
.rpm-play svg { width: 20px; height: 20px; margin-left: 3px; }

/* Hover info — title + category (Lovable-style) */
.rpm-hover-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px;
  text-align: left;
}
.rpm-hover-info h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px;
  line-height: 1.3;
}
.rpm-hover-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rpm-hover-meta span { font-size: 11px; color: var(--rpm-muted); }
.rpm-hover-cat {
  background: var(--rpm-pink);
  color: #fff !important;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* Duration badge */
.rpm-duration {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

/* Card footer (below thumb) */
.rpm-card-info { padding: 12px 14px 14px; }
.rpm-card-title {
  font-size: 13px; font-weight: 700;
  color: var(--rpm-text); margin: 0 0 3px; line-height: 1.3;
}
.rpm-card-client { font-size: 12px; color: var(--rpm-muted); }

/* ── Lightbox ── */
.rpm-lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.rpm-lightbox.open { display: flex; }

.rpm-lb-wrap {
  position: relative;
  width: 100%; max-width: 1040px;
  animation: rpm-in .22s ease;
}
@keyframes rpm-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.rpm-lb-close {
  position: absolute; top: -46px; right: 0;
  background: none; border: none;
  color: #fff; font-size: 28px;
  cursor: pointer; opacity: 0.65;
  transition: opacity 0.2s; line-height: 1;
}
.rpm-lb-close:hover { opacity: 1; }

.rpm-lb-video {
  position: relative; aspect-ratio: 16/9;
  background: #000; border-radius: 8px; overflow: hidden;
}
.rpm-lb-video iframe { width: 100%; height: 100%; border: none; }

.rpm-lb-info { padding: 18px 4px 0; }
.rpm-lb-info h3 { font-size: 20px; font-weight: 700; color: #fff; margin: 0 0 8px; }
#rpm-lb-meta { font-size: 13px; color: var(--rpm-muted); margin-bottom: 8px; }
#rpm-lb-desc { font-size: 14px; color: var(--rpm-muted); line-height: 1.7; margin: 0; max-height: 72px; overflow: hidden; }

/* ── Single project page ── */
.rpm-single {
  background: var(--rpm-bg); color: var(--rpm-text);
  min-height: 100vh; padding: 60px 24px;
  max-width: 1100px; margin: 0 auto;
}
.rpm-single-video {
  position: relative; aspect-ratio: 16/9;
  background: #000; border-radius: var(--rpm-radius);
  overflow: hidden; margin-bottom: 36px;
}
.rpm-single-video iframe { width: 100%; height: 100%; border: none; }
.rpm-single-title { font-size: 34px; font-weight: 800; margin-bottom: 14px; }
.rpm-single-meta { display: flex; gap: 20px; margin-bottom: 20px; font-size: 14px; color: var(--rpm-muted); }
.rpm-single-meta strong { color: var(--rpm-pink); }
.rpm-single-desc { font-size: 16px; line-height: 1.8; color: rgba(255,255,255,0.78); max-width: 720px; }
.rpm-back { display: inline-block; margin-top: 36px; color: var(--rpm-pink); font-weight: 600; text-decoration: none; font-size: 14px; }
.rpm-back:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .rpm-cols-5 { grid-template-columns: repeat(3, 1fr); }
  .rpm-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .rpm-cols-4, .rpm-cols-3, .rpm-cols-5 { grid-template-columns: repeat(2, 1fr); }
  .rpm-lb-info h3 { font-size: 16px; }
}
@media (max-width: 480px) {
  .rpm-cols-4, .rpm-cols-3, .rpm-cols-2, .rpm-cols-5 { grid-template-columns: 1fr; }
  .rpm-filters { gap: 6px; }
  .rpm-filter { padding: 6px 14px; font-size: 12px; }
}

/* ── Featured badge ── */
.rpm-featured-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: rgba(0,0,0,0.7);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  z-index: 2;
}
