/**
 * Lumea Meșterilor — All Services Catalog (colorful)
 */

.lm-asc {
  --lm-asc-bg: #f0f4fa;
  --lm-asc-surface: #ffffff;
  --lm-asc-border: #dde5f0;
  --lm-asc-text: #1a2433;
  --lm-asc-muted: #5f6d82;
  --lm-asc-accent: #0f6bdc;
  --lm-asc-accent-deep: #0a4fad;
  --lm-asc-accent-soft: #e8f2ff;
  --lm-asc-radius: 18px;
  --lm-asc-shadow: 0 12px 32px rgba(15, 35, 70, 0.08);
  color: var(--lm-asc-text);
  font-family: inherit;
}

.lm-asc__header {
  margin-bottom: 28px;
}

.lm-asc__title {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
  line-height: 1.15;
  font-weight: 700;
}

.lm-asc__lead {
  margin: 0;
  max-width: 760px;
  color: var(--lm-asc-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.lm-asc__layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* —— Icon badges —— */
.lm-asc__svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

.lm-asc__icon-badge {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 6px 16px rgba(15, 35, 70, 0.12);
}

.lm-asc__icon-badge--nav {
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.lm-asc__icon-badge--nav .lm-asc__svg {
  width: 24px;
  height: 24px;
}

.lm-asc__icon-badge--panel {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.lm-asc__icon-badge--panel .lm-asc__svg {
  width: 26px;
  height: 26px;
}

.lm-asc__icon-badge--group {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15, 35, 70, 0.1);
}

.lm-asc__icon-badge--group .lm-asc__svg {
  width: 20px;
  height: 20px;
}

.lm-asc__icon-badge--service {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  box-shadow: none;
}

.lm-asc__icon-badge--service .lm-asc__svg {
  width: 16px;
  height: 16px;
}

/* Direction palette */
.lm-asc__icon-badge--repair { background: linear-gradient(135deg, #ff8f4c, #ff5c35); }
.lm-asc__icon-badge--doors { background: linear-gradient(135deg, #4facfe, #00c2fb); }
.lm-asc__icon-badge--ceilings { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.lm-asc__icon-badge--balconies { background: linear-gradient(135deg, #34d399, #059669); }
.lm-asc__icon-badge--metal { background: linear-gradient(135deg, #94a3b8, #475569); }
.lm-asc__icon-badge--facades { background: linear-gradient(135deg, #f59e0b, #d97706); }

/* Group / service palette */
.lm-asc__icon-badge--apartment { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.lm-asc__icon-badge--house { background: linear-gradient(135deg, #f97316, #ea580c); }
.lm-asc__icon-badge--bathroom { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.lm-asc__icon-badge--kitchen { background: linear-gradient(135deg, #fb7185, #e11d48); }
.lm-asc__icon-badge--electric { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.lm-asc__icon-badge--plumbing { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.lm-asc__icon-badge--drywall { background: linear-gradient(135deg, #a3e635, #65a30d); }
.lm-asc__icon-badge--paint { background: linear-gradient(135deg, #c084fc, #9333ea); }
.lm-asc__icon-badge--floor { background: linear-gradient(135deg, #d97706, #92400e); }
.lm-asc__icon-badge--ceiling,
.lm-asc__icon-badge--stretch-ceiling { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.lm-asc__icon-badge--balcony { background: linear-gradient(135deg, #2dd4bf, #0d9488); }
.lm-asc__icon-badge--facade { background: linear-gradient(135deg, #f59e0b, #b45309); }
.lm-asc__icon-badge--default { background: linear-gradient(135deg, #94a3b8, #64748b); }

/* Service link dots */
.lm-asc__service-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--lm-asc-accent);
}

.lm-asc__service-link--apartment .lm-asc__service-dot { background: #2563eb; }
.lm-asc__service-link--house .lm-asc__service-dot { background: #ea580c; }
.lm-asc__service-link--bathroom .lm-asc__service-dot { background: #0284c7; }
.lm-asc__service-link--kitchen .lm-asc__service-dot { background: #e11d48; }
.lm-asc__service-link--electric .lm-asc__service-dot { background: #f59e0b; }
.lm-asc__service-link--plumbing .lm-asc__service-dot { background: #0891b2; }
.lm-asc__service-link--drywall .lm-asc__service-dot { background: #65a30d; }
.lm-asc__service-link--paint .lm-asc__service-dot { background: #9333ea; }
.lm-asc__service-link--floor .lm-asc__service-dot { background: #92400e; }
.lm-asc__service-link--ceiling .lm-asc__service-dot,
.lm-asc__service-link--stretch-ceiling .lm-asc__service-dot { background: #4f46e5; }
.lm-asc__service-link--balcony .lm-asc__service-dot { background: #0d9488; }
.lm-asc__service-link--doors .lm-asc__service-dot { background: #00c2fb; }
.lm-asc__service-link--metal .lm-asc__service-dot { background: #475569; }
.lm-asc__service-link--facade .lm-asc__service-dot { background: #d97706; }

/* —— Left nav —— */
.lm-asc__nav {
  position: sticky;
  top: 96px;
}

.lm-asc__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lm-asc__nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--lm-asc-border);
  border-radius: 16px;
  background: var(--lm-asc-surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.lm-asc__nav-btn:hover {
  border-color: rgba(15, 107, 220, 0.35);
  box-shadow: var(--lm-asc-shadow);
  transform: translateY(-1px);
}

.lm-asc__nav-btn.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--lm-asc-accent), var(--lm-asc-accent-deep));
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 107, 220, 0.28);
}

.lm-asc__nav-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.lm-asc__nav-text strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.lm-asc__nav-text small {
  color: var(--lm-asc-muted);
  font-size: 0.82rem;
}

.lm-asc__nav-btn.is-active .lm-asc__nav-text small {
  color: rgba(255, 255, 255, 0.82);
}

.lm-asc__nav-count {
  display: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.lm-asc__nav-btn.is-active .lm-asc__nav-count {
  display: inline-flex;
}

.lm-asc__nav-btn.is-active .lm-asc__icon-badge {
  background: rgba(255, 255, 255, 0.22) !important;
  box-shadow: none;
}

/* —— Panel —— */
.lm-asc__panels {
  min-width: 0;
}

.lm-asc__panel {
  background: var(--lm-asc-surface);
  border: 1px solid var(--lm-asc-border);
  border-radius: var(--lm-asc-radius);
  box-shadow: var(--lm-asc-shadow);
  overflow: hidden;
}

.lm-asc__panel-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--lm-asc-border);
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}

.lm-asc__panel-head h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
}

.lm-asc__panel-head p {
  margin: 0;
  color: var(--lm-asc-muted);
  font-size: 0.92rem;
}

.lm-asc__panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 36%);
  min-height: 440px;
}

/* —— Groups (subcategories) —— */
.lm-asc__groups {
  min-width: 0;
}

.lm-asc__group {
  border-bottom: 1px solid var(--lm-asc-border);
  transition: background 0.2s ease;
}

.lm-asc__group:last-child {
  border-bottom: none;
}

.lm-asc__group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
}

.lm-asc__group-link {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
  transition: background 0.2s ease, color 0.2s ease;
}

.lm-asc__group-label {
  flex: 1 1 auto;
  min-width: 0;
}

.lm-asc__group-arrow {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--lm-asc-muted);
  border-bottom: 2px solid var(--lm-asc-muted);
  transform: rotate(-45deg);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.lm-asc__group-link:hover,
.lm-asc__group.is-focused .lm-asc__group-link {
  color: var(--lm-asc-accent);
  background: rgba(15, 107, 220, 0.05);
}

.lm-asc__group.is-focused .lm-asc__group-arrow {
  opacity: 1;
  border-color: var(--lm-asc-accent);
}

.lm-asc__group-toggle {
  display: none;
}

/* —— Services rail —— */
.lm-asc__services-rail {
  position: relative;
  border-left: 1px solid var(--lm-asc-border);
  background: linear-gradient(180deg, #f6f9fd 0%, #eef3fa 100%);
  min-height: 100%;
}

.lm-asc__services {
  display: none;
  padding: 20px 18px;
}

.lm-asc__services.is-open {
  display: block;
}

.lm-asc__services-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--lm-asc-text);
  line-height: 1.3;
}

.lm-asc__services-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lm-asc__service-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--lm-asc-text);
  text-decoration: none;
  line-height: 1.35;
  font-size: 0.94rem;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.lm-asc__service-link:hover {
  background: #fff;
  color: var(--lm-asc-accent);
  box-shadow: 0 4px 14px rgba(15, 35, 70, 0.06);
}

.lm-asc__service-link .lm-asc__service-dot {
  margin-top: 6px;
}

/* Desktop hover */
@media (min-width: 1025px) {
  .lm-asc__group.has-children:hover,
  .lm-asc__group.has-children.is-focused {
    background: rgba(15, 107, 220, 0.03);
  }

  .lm-asc__services-rail .lm-asc__services {
    position: absolute;
    inset: 0;
    overflow: auto;
  }

  .lm-asc__nav-count {
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--lm-asc-muted);
    background: #eef3fa;
    padding: 4px 9px;
    border-radius: 999px;
  }

  .lm-asc__nav-btn.is-active .lm-asc__nav-count {
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.18);
  }

  .lm-asc__nav-text small {
    display: none;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .lm-asc__panel-head,
  .lm-asc__group-row {
    scroll-margin-top: 8px;
  }

  .lm-asc__layout {
    grid-template-columns: 1fr;
  }

  .lm-asc__nav {
    position: static;
  }

  .lm-asc__nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lm-asc__panel-body {
    grid-template-columns: 1fr;
  }

  .lm-asc__services-rail {
    display: none;
    border-left: none;
    border-top: none;
    min-height: 0;
  }

  .lm-asc__group-services-slot .lm-asc__services {
    display: none;
    margin: 0;
    padding: 0 16px 14px;
    background: linear-gradient(180deg, #f6f9fd 0%, #eef3fa 100%);
    border-top: 1px solid var(--lm-asc-border);
  }

  .lm-asc__group-services-slot .lm-asc__services.is-open {
    display: block;
  }

  .lm-asc__group-services-slot .lm-asc__services-kicker {
    padding-top: 14px;
  }

  .lm-asc__services-rail .lm-asc__services {
    position: static;
  }

  .lm-asc__group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: 12px;
    border: 1px solid var(--lm-asc-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
  }

  .lm-asc__group-toggle span {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--lm-asc-muted);
    border-bottom: 2px solid var(--lm-asc-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
  }

  .lm-asc__group-toggle[aria-expanded="true"] span {
    transform: rotate(-135deg);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .lm-asc__nav-list {
    grid-template-columns: 1fr;
  }

  .lm-asc__nav-btn {
    padding: 12px 14px;
  }

  .lm-asc__panel-head {
    padding: 16px 18px 12px;
  }

  .lm-asc__group-link {
    padding: 12px 16px;
    font-size: 0.96rem;
  }

  .lm-asc__services {
    padding: 14px 16px 16px;
  }
}

body.lm-asc-page .lm-catpage {
  display: none !important;
}
