/* =========================================================
   AUTOFUNNEL PAGE
   ========================================================= */

.autofunnel-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.autofunnel-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.autofunnel-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
}

.autofunnel-toggle {
  cursor: pointer;
}

.autofunnel-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.autofunnel-title h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.autofunnel-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.autofunnel-content {
  display: none;
  padding: 0 22px 22px;
  border-top: 1px solid var(--line);
}

.autofunnel-dropdown.open .autofunnel-content {
  display: block;
}

.autofunnel-item {
  padding-top: 20px;
}

/* =========================================================
   TASK CARD BASE
   ========================================================= */

.task-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

.task-image-wrap {
  width: 100%;
  min-width: 0;
  height: 320px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.task-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.task-content h4 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.task-text {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.task-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.22);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.task-button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

/* =========================================================
   AUTOFUNNEL V2
   ========================================================= */

.task-card-v2 {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}

.task-image-wrap-v2 {
  width: 100%;
  min-width: 0;
  height: 320px;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.task-image-v2 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task-card-v2 .task-content {
  width: 100%;
  align-items: flex-start;
}

.task-card-v2 .task-text {
  width: 100%;
  max-width: 100%;
  line-height: 1.6;
  box-sizing: border-box;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 960px) {
  .autofunnel-card-header {
    padding: 18px;
  }

  .autofunnel-content {
    padding: 0 18px 18px;
  }

  .autofunnel-item {
    padding-top: 18px;
  }

  .task-image-wrap,
  .task-image-wrap-v2 {
    height: 280px;
  }

  .task-content h4 {
    font-size: 22px;
  }
}

@media (max-width: 640px) {
  .autofunnel-card-header {
    padding: 16px;
    gap: 12px;
  }

  .autofunnel-title {
    gap: 12px;
  }

  .autofunnel-title h3 {
    font-size: 18px;
  }

  .autofunnel-content {
    padding: 0 16px 16px;
  }

  .autofunnel-item {
    padding-top: 16px;
  }

  .task-image-wrap,
  .task-image-wrap-v2 {
    height: 220px;
    border-radius: 20px;
  }

  .task-content {
    gap: 14px;
  }

  .task-content h4 {
    font-size: 20px;
  }

  .task-text {
    padding: 14px 15px;
    font-size: 13px;
    line-height: 1.6;
  }

  .task-button {
    width: 100%;
  }
}