/* Блок "С чем работаем" */

.first-day {
  padding: 56px 0 72px;
  background: var(--bg-alt, #f9fafb);
  border-bottom: 1px solid rgba(148, 163, 184, 0.30);
  position: relative;
  z-index: 10;
}

@media (min-width: 900px) {
  .first-day {
    padding: 72px 0 88px;
  }
}

.first-day-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 32px;
  align-items: flex-start;
}

.first-day-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted2, #6b7280);
  margin-bottom: 12px;
}

.first-day-title {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text, #0f172a);
}

@media (min-width: 900px) {
  .first-day-title {
    font-size: 28px;
  }
}

.first-day-subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted, #4b5563);
}

/* ========================================
   РАСКРЫВАЮЩИЕСЯ КАРТОЧКИ
   ======================================== */

.work-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  overflow: visible;
}

@media (min-width: 900px) {
  .work-cases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* Карточка */

.work-case-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  overflow: visible;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  z-index: 1;
}

.work-case-card:hover {
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  border-color: rgba(14, 165, 233, 0.4);
}

.work-case-card.active {
  z-index: 100;
}

/* Цветные акценты */
.work-case-card:nth-child(1) { border-top: 3px solid #ef4444; }
.work-case-card:nth-child(2) { border-top: 3px solid #f59e0b; }
.work-case-card:nth-child(3) { border-top: 3px solid #8b5cf6; }
.work-case-card:nth-child(4) { border-top: 3px solid #0ea5e9; }
.work-case-card:nth-child(5) { border-top: 3px solid #22c55e; }
.work-case-card:nth-child(6) { border-top: 3px solid #64748b; }

/* Кликабельный заголовок */

.work-case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease;
}

.work-case-header:hover {
  background: rgba(148, 163, 184, 0.05);
}

.work-case-header:active {
  background: rgba(148, 163, 184, 0.1);
}

.work-case-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.work-case-icon {
  flex-shrink: 0;
  color: #0ea5e9;
  stroke-width: 2;
}

.work-case-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #0f172a);
  line-height: 1.3;
}

.work-case-chevron {
  flex-shrink: 0;
  color: #94a3b8;
  stroke-width: 2;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-case-card.active .work-case-chevron {
  transform: rotate(180deg);
}

/* Раскрывающийся контент */

.work-case-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-top: none;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transition: 
    grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
}

.work-case-card.active .work-case-body {
  grid-template-rows: 1fr;
  opacity: 1;
}

.work-case-body-inner {
  overflow: hidden;
  padding: 0 16px;
  transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.work-case-card.active .work-case-body-inner {
  padding: 0 16px 16px;
}

.work-case-description {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted, #4b5563);
}

.work-case-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
}

.work-case-list li {
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.work-case-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #0ea5e9;
  font-weight: 600;
}

/* ========================================
   ПРАВАЯ КАРТОЧКА
   ======================================== */

.first-day-side {
  display: flex;
  justify-content: flex-end;
}

@media (min-width: 900px) {
  .first-day-side {
    align-self: flex-start;
    position: sticky;
    top: 80px;
  }
}

.first-day-card {
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 18px;
  padding: 20px 20px 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.45);
  max-width: 360px;
}

.first-day-card-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #f9fafb;
}

.first-day-card-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #cbd5f5;
}

.first-day-card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: #e5e7eb;
}

.first-day-card-list li::before {
  content: "•";
  color: #38bdf8;
  margin-right: 6px;
}

.first-day-card .btn {
  width: 100%;
  justify-content: center;
}

.first-day-card .btn.btn-primary {
  background: #0ea5e9;
  border-color: #0ea5e9;
  color: #0f172a;
}

.first-day-card .btn.btn-primary:hover {
  background: #0284c7;
  border-color: #0284c7;
}

/* ========================================
   МОБИЛЬНАЯ ВЕРСИЯ
   ======================================== */

@media (max-width: 900px) {
  .first-day {
    padding: 40px 0 56px;
  }

  .first-day-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .first-day-title {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .first-day-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .work-cases-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .work-case-header {
    padding: 14px;
  }

  .work-case-title {
    font-size: 14px;
  }

  .work-case-body-inner {
    padding: 0 14px;
  }

  .work-case-card.active .work-case-body-inner {
    padding: 0 14px 14px;
  }

  .work-case-description {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .work-case-list {
    font-size: 11px;
    gap: 3px;
  }

  .work-case-icon {
    width: 20px;
    height: 20px;
  }

  .work-case-chevron {
    width: 18px;
    height: 18px;
  }

  /* Упрощаем карточку на мобилке */
  .first-day-side {
    justify-content: flex-start;
  }

  .first-day-card {
    max-width: 100%;
    padding: 16px;
  }

  .first-day-card-title {
    font-size: 14px;
  }

  .first-day-card-text {
    font-size: 13px;
  }

  .first-day-card-list {
    font-size: 12px;
    gap: 4px;
  }

  .first-day-card .btn {
    font-size: 14px;
    padding: 12px 16px;
  }
}

@media (max-width: 400px) {
  .first-day-title {
    font-size: 20px;
  }

  .work-case-card {
    border-top-width: 2px;
  }
}
