/**
 * Soliphex Portfolio styles.
 * Namespaced under .soliphex-portfolio so the widget can live inside
 * any Elementor page without bleeding into the rest of the site.
 */

.soliphex-portfolio {
  --sx-bg: #06070d;
  --sx-surface: rgba(255, 255, 255, 0.04);
  --sx-surface-hover: rgba(255, 255, 255, 0.07);
  --sx-border: rgba(255, 255, 255, 0.08);
  --sx-border-strong: rgba(255, 255, 255, 0.18);
  --sx-text: #eef1ff;
  --sx-text-dim: #8a92b2;
  --sx-accent: #7c5cff;
  --sx-accent-2: #22d3ee;
  --sx-radius: 18px;

  position: relative;
  color: var(--sx-text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  padding: 40px 0;
}

.soliphex-portfolio * { box-sizing: border-box; }

/* Hero */
.soliphex-hero {
  padding: 20px 0 40px;
}
.soliphex-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sx-surface);
  border: 1px solid var(--sx-border);
  font-size: 12px;
  color: var(--sx-text-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.soliphex-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--sx-accent-2);
  box-shadow: 0 0 12px var(--sx-accent-2);
}
.soliphex-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  background: linear-gradient(120deg, #ffffff 0%, #c7c3ff 40%, #a7f3ff 70%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.soliphex-subtitle {
  color: var(--sx-text-dim);
  font-size: 17px;
  max-width: 640px;
  line-height: 1.6;
  margin: 0;
}

/* Filters */
.soliphex-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 28px;
}
.soliphex-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--sx-surface);
  border: 1px solid var(--sx-border);
  color: var(--sx-text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.soliphex-chip:hover {
  color: var(--sx-text);
  border-color: var(--sx-border-strong);
}
.soliphex-chip.is-active {
  color: #06070d;
  background: linear-gradient(120deg, #fff, #c7c3ff);
  border-color: transparent;
  font-weight: 600;
}

/* Grid */
.soliphex-grid {
  display: grid;
  gap: 20px;
}

/* Card */
.soliphex-card {
  position: relative;
  overflow: hidden;
  background: var(--sx-surface);
  border: 1px solid var(--sx-border);
  border-radius: var(--sx-radius);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), border-color 0.35s, background 0.35s;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
.soliphex-card:hover {
  transform: translateY(-4px);
  border-color: var(--sx-border-strong);
  background: var(--sx-surface-hover);
}

.soliphex-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--sx-border);
}
.soliphex-thumb img,
.soliphex-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.soliphex-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(6, 7, 13, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--sx-border-strong);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sx-text);
}
.soliphex-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 7, 13, 0.85) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.soliphex-card:hover .soliphex-overlay { opacity: 1; }
.soliphex-overlay-name { font-weight: 600; }
.soliphex-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: #06070d;
  font-size: 13px;
  font-weight: 600;
}
.soliphex-view-btn svg { width: 12px; height: 12px; }

.soliphex-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.soliphex-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.soliphex-title-row h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.soliphex-meta {
  font-size: 12px;
  color: var(--sx-text-dim);
  white-space: nowrap;
}
.soliphex-desc {
  color: var(--sx-text-dim);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.soliphex-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.soliphex-tag {
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.18);
  color: #c7c3ff;
  font-size: 11px;
  font-weight: 500;
}

/* Empty state */
.soliphex-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--sx-text-dim);
  border: 1px dashed var(--sx-border);
  border-radius: var(--sx-radius);
}

/* Hidden (for filter) */
.soliphex-card.is-hidden { display: none; }

/* Responsive fallback when Elementor columns aren't set */
@media (max-width: 900px) {
  .soliphex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px) {
  .soliphex-grid { grid-template-columns: 1fr !important; }
  .soliphex-hero { padding: 12px 0 24px; }
}

/* Site-level styles for non-Elementor pages */
.soliphex-site-wrap { max-width: 1200px; margin: 0 auto; padding: 40px 24px 80px; }

.soliphex-site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.soliphex-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.soliphex-logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: conic-gradient(from 180deg at 50% 50%, #7c5cff, #22d3ee, #f472b6, #7c5cff);
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.4);
}
.soliphex-nav-links { display: flex; gap: 24px; color: var(--sx-text-dim, #8a92b2); font-size: 14px; }
.soliphex-nav-links a:hover { color: #eef1ff; }

.soliphex-site-footer {
  margin-top: 80px;
  padding: 28px 24px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8a92b2;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Ambient page background */
body {
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(124, 92, 255, 0.25), transparent 60%),
    radial-gradient(800px 500px at 110% 10%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(244, 114, 182, 0.15), transparent 60%),
    linear-gradient(180deg, #06070d 0%, #0a0c16 100%);
  background-attachment: fixed;
}

@media (max-width: 640px) {
  .soliphex-nav-links { display: none; }
  .soliphex-site-wrap { padding: 24px 16px 60px; }
}
