/* styles/components/services.css */

.services {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--background-secondary) 0%, var(--background) 100%);
}

.services .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.services-accordion {
  margin-top: 30px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--background-tertiary);
}

.service-item {
  border-top: 1px solid var(--border);
}

.service-item:first-child {
  border-top: none;
}

.service-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: transparent;
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  text-align: left;
}

.service-trigger:hover {
  background: rgba(255, 255, 255, 0.04);
}

.service-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.service-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 18px;
  flex: 0 0 auto;
}

.service-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.service-item.is-open .service-panel {
  max-height: 800px; /* достаточно для текста + картинки */
}

.service-content {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 18px;
  padding: 0 20px 20px 20px;
}

.service-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  height: 240px;
}

.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-text p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .service-content {
    grid-template-columns: 1fr;
  }

  .service-media {
    height: 200px;
  }
}
