/* =============================================
   NIXBIT — SERVICES
   ============================================= */

/* ── SERVICES OVERVIEW ── */
.services-overview {
  padding: var(--section-pad);
  background: var(--bg-1);
  position: relative;
}
.services-overview::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-accent), transparent);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--bg-1);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background var(--transition);
  cursor: default;
}
.service-card:hover {
  background: var(--bg-2);
}

.service-card-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}
.service-card-icon {
  color: var(--accent);
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(112,97,242,0.1);
  border-radius: 10px;
  border: 1px solid var(--border-accent);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}
.service-learn {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0;
  transition: gap var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}
.service-learn:hover { gap: 10px; }

/* ── SERVICES OVERLAY ── */
.services-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.services-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.services-panel {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 1200px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.services-overlay.open .services-panel {
  transform: translateY(0);
}

.services-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
}

.services-panel-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.stab {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 8px 18px;
  border-radius: 8px;
  color: var(--text-muted);
  transition: var(--transition);
  border: 1px solid transparent;
}
.stab:hover { color: var(--text); background: var(--bg-2); }
.stab.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}

.services-close {
  font-size: 1.2rem;
  color: var(--text-muted);
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}
.services-close:hover { background: var(--bg-2); color: var(--text); }

.services-panel-body {
  overflow-y: auto;
  flex: 1;
  padding: 28px 32px;
}

.service-detail { display: none; }
.service-detail.active { display: block; }

/* ── SERVICE DETAIL (SD) ── */
.sd-hero {
  margin-bottom: 1.8rem;
}
.sd-hero h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text);
}
.sd-hero p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 560px;
  line-height: 1.65;
}

.sd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.sd-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.sd-item {
  background: var(--bg-2);
  padding: 32px;
  transition: background var(--transition);
}
.sd-item:hover { background: var(--bg-3); }

.sd-item-icon {
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 12px;
}
.sd-item h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.sd-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}
.sd-item p:last-child { margin-bottom: 0; }

/* ── LIGHT MODE ── */
html.light .service-card { background: #fff; }
html.light .service-card:hover { background: #f5f5f7; }
